Crews
A Crew is a group of Agents executing one or more Tasks in a coordinated manner.
Represents a collaborative group of Agents and the Tasks they must complete.
Source code in fsdk/anote-sdk.py
__init__(agents=None, tasks=None, verbose=False)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
agents |
list of Agent
|
Agents that will collaborate on Tasks. |
None
|
tasks |
list of Task
|
Tasks to be completed by these Agents. |
None
|
verbose |
bool
|
If True, logs more details during execution. |
False
|
Source code in fsdk/anote-sdk.py
kickoff(inputs=None)
Starts or orchestrates the tasks in some manner. Customize as needed for your logic (sequential, parallel, hierarchical, etc.).
Source code in fsdk/anote-sdk.py
Crews Fields
- agents: All the Agents that will collaborate (list of Agent objects).
- tasks: The tasks to be completed by these Agents (list of Task objects).
- verbose: If
True
, logs show more details during execution.
Example 1:
from anote_agents import Crew
crew = Crew(
agents=[venue_coordinator, logistics_manager],
tasks=[venue_task, logistics_task],
verbose=True
)
Crew Composition
Crews can be composed of:
-
Multiple Agents (e.g., marketing agent, finance agent, research agent)
-
One or more Tasks (e.g., "Conduct market research," "Prepare financial analysis")
The execution flow of a crew can look like the following:
-
Initialization: The Crew binds each Task to the correct Agent.
-
Kickoff: Passes input data (if any) into tasks that contain placeholders.
-
Orchestration: Tasks may run sequentially or in parallel, depending on workflow.
-
Results: The Crew collects outputs from each Task.
Example 2:
from anote_agents import Crew
team_crew = Crew(
agents=[marketing_agent, finance_agent],
tasks=[research_task, analysis_task],
verbose=True
)
# Kick off the tasks
results = team_crew.kickoff(inputs={"industry": "Renewable Energy"})
Key Benefits
-
Centralized management for complex multi-agent workflows.
-
Clear separation of responsibilities among Agents.
-
Reusability of Agents and Tasks across different Crews if desired.