Skip to content

CrewAI Agent

The CrewAI Agent component creates a member of a team of AI agents. Each member has a role (for example, “market analyst”), a goal and some background that tells it how to work. You connect it to a team, the Hierarchical Crew, or to a task, the Sequential Task, which is where it gets work.

Use it when a job is better split among several specialists than handled by a single assistant: each agent focuses on its part and the team puts the result together.

When to use it

  • Build a writing team with a researcher, a writer and a reviewer.
  • Have one analyst query data with tools and another write up the conclusions.
  • Give a team led by a manager several specialists to hand work to.
  • Split into separate agents functions that need different tools.

Configuration

FieldWhat it does
RoleThe agent’s role in the team, for example “Sales analyst”.
GoalWhat the agent tries to achieve, for example “Spot the fastest-growing products each month”.
BackstoryThe agent’s background: experience, way of working, tone. It helps the agent behave consistently with its role.
Allow DelegationLets the agent hand part of its work to other agents in the team. Default: on.
ConnectionWhat to connect
ModelAn AI model component, which does the agent’s thinking.
ToolsThe tools the agent can use, for example a web search or a database query. You can connect several.

The text fields also accept a connection, so the role or the goal can come from another component.

Advanced options

FieldWhat it does
MemoryThe agent remembers what has happened during the team’s work. Default: on.
VerboseKeeps a more detailed record of what the agent does. Default: off.
Allow Code ExecutionLets the agent run code. Default: off. Leave it off unless you need it.
kwargsAdditional agent settings as name-value pairs. Usually left empty.

Output

Agent: the defined agent. Connect it to the Agents or Manager input of a Hierarchical Crew, or to the Agent input of a Sequential Task.

Example

Comercial Ribera wants a weekly competitor report. It creates two agents: one with Role “Market researcher”, a web search tool and the goal of gathering the news of three competitors; another with Role “Report writer” and the goal of turning those notes into a one-page summary for management. It connects them to two tasks in order and to a Sequential Crew.

Good practices

  • Write specific roles and goals: an agent with a clear goal works better than a generic one.
  • Give each agent only the tools it needs for its part.