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
| Field | What it does |
|---|---|
| Role | The agent’s role in the team, for example “Sales analyst”. |
| Goal | What the agent tries to achieve, for example “Spot the fastest-growing products each month”. |
| Backstory | The agent’s background: experience, way of working, tone. It helps the agent behave consistently with its role. |
| Allow Delegation | Lets the agent hand part of its work to other agents in the team. Default: on. |
| Connection | What to connect |
|---|---|
| Model | An AI model component, which does the agent’s thinking. |
| Tools | The 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
| Field | What it does |
|---|---|
| Memory | The agent remembers what has happened during the team’s work. Default: on. |
| Verbose | Keeps a more detailed record of what the agent does. Default: off. |
| Allow Code Execution | Lets the agent run code. Default: off. Leave it off unless you need it. |
| kwargs | Additional 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.