Basic Coordination
Demonstrates a simple two-member team working together on one task.
"""
Basic Coordination
=============================
Demonstrates a simple two-member team working together on one task.
"""
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.team import Team
# ---------------------------------------------------------------------------
# Create Members
# ---------------------------------------------------------------------------
planner = Agent(
name="Planner",
role="You plan tasks and split work into clear, ordered steps.",
model=OpenAIResponses(id="gpt-5-mini"),
)
writer = Agent(
name="Writer",
role="You draft concise, readable summaries from the team discussion.",
model=OpenAIResponses(id="gpt-5-mini"),
)
# ---------------------------------------------------------------------------
# Create Team
# ---------------------------------------------------------------------------
team = Team(
model=OpenAIResponses(id="gpt-5-mini"),
name="Planning Team",
members=[planner, writer],
instructions=[
"Coordinate with the two members to answer the user question.",
"First plan the response, then generate a clear final summary.",
],
markdown=True,
show_members_responses=True,
)
# ---------------------------------------------------------------------------
# Run Team
# ---------------------------------------------------------------------------
if __name__ == "__main__":
team.print_response(
"Create a three-step outline for launching a small coding side project.",
stream=True,
)Run the Example
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activateInstall dependencies
uv pip install -U agno openaiExport your OpenAI API key
export OPENAI_API_KEY="your_openai_api_key_here"Run the example
Save the code above as basic_coordination.py, then run:
python basic_coordination.pyFull source: cookbook/03_teams/01_quickstart/01_basic_coordination.py