Updated Understanding Agents (markdown)

João Moura
2023-11-14 10:55:02 -03:00
parent c7460f4c2d
commit 554331a0a9

@@ -1,12 +1,10 @@
# Understanding Agents
# What is an Agent?
Agents are the core of the CrewAI framework, representing individual AI entities with distinct roles, capabilities, and goals. Each agent is designed to act autonomously while being able to collaborate with other agents in the crew. This page will guide you through the basic principles of agents in CrewAI, their properties, and how they interact within the system.
## What is an Agent?
In CrewAI, an agent is an autonomous unit programmed to perform tasks, make decisions, and communicate with other agents. Think of an agent as a member of a team, with specific skills and a particular job to do. Agents can have different roles like 'Researcher', 'Writer', or 'Customer Support', each contributing to the overall goal of the crew.
## Key Properties of an Agent
# Key Properties of an Agent
- **Role**: Defines the agent's function within the crew. It determines the kind of tasks the agent is best suited for.
- **Goal**: The individual objective that the agent aims to achieve. It guides the agent's decision-making process.
@@ -14,14 +12,14 @@ In CrewAI, an agent is an autonomous unit programmed to perform tasks, make deci
- **Tools**: A set of capabilities or functions that the agent can use to perform tasks. Tools can be shared or exclusive to specific agents.
- **Delegation**: Agents can delegate tasks to one another, ensuring that each task is handled by the most suitable agent.
## Agent Lifecycle
# Agent Lifecycle
1. **Initialization**: An agent is created with a defined role, goal, backstory, and set of tools.
2. **Task Assignment**: The agent is assigned tasks either directly or through the crew's process management.
3. **Execution**: The agent performs the task using its available tools and in accordance with its role and goal.
4. **Collaboration**: Throughout the execution, the agent can communicate with other agents to delegate, inquire, or assist.
## Creating an Agent
# Creating an Agent
To create an agent, you would typically initialize an instance of the `Agent` class with the desired properties. Here's a conceptual example:
@@ -36,8 +34,8 @@ agent = Agent(
)
```
## Agent Interaction
# Agent Interaction
Agents can interact with each other using the CrewAI's built-in delegation and communication mechanisms. This allows for dynamic task management and problem-solving within the crew.
## Conclusion
# Conclusion
Agents are the building blocks of the CrewAI framework. By understanding how to define and interact with agents, you can create sophisticated AI systems that leverage the power of collaborative intelligence.