How CrewAI defines agents
In CrewAI, an agent is defined by four attributes. Role is a label describing what the agent does — 'Research Analyst' or 'Content Writer' — which is included in its system prompt to shape its reasoning orientation. Goal is a statement of what the agent is trying to achieve, used to guide its decision-making within assigned tasks. Backstory provides additional context about the agent's simulated expertise and perspective, which affects the tone and depth of its outputs. Tools are the functions the agent can invoke — web search, file reading, code execution, or custom integrations — that extend its capabilities beyond language generation. Together these attributes define an agent that has a stable identity and scope within the crew.
Task assignment and execution
CrewAI agents execute tasks assigned by the crew's process — either sequentially (each agent completes its task before the next begins) or hierarchically (a manager agent delegates to worker agents and reviews their outputs). Each task specifies what needs to be done and which agent is responsible for it, optionally providing context from previous tasks. The agent receives the task description, its own role and goal, available tools, and any relevant context, then reasons toward a completion. Results from one agent's task can be fed as context into subsequent agents' tasks, allowing outputs to build on each other through the workflow.
When the agent abstraction helps
The role-based agent abstraction in CrewAI is most useful when a workflow genuinely benefits from specialized perspectives — when different steps require different reasoning orientations that a single generic agent does not maintain consistently. A research-oriented agent and an editing-oriented agent will approach the same text differently in ways that affect quality. The abstraction adds overhead — role descriptions add tokens, and the framework manages state between agents — that is not worth paying for workflows that can be completed effectively with a single agent or a simple chain. The value is in multi-step workflows where specialization improves the quality of intermediate and final outputs.