Multi-Agent Teams
Agent as Tool
Section titled “Agent as Tool”Any agent can be used as a tool by another agent:
@agent( name="coordinator", model="openai/gpt-4o", tools=[researcher.as_tool(), writer.as_tool()], pattern="plan_and_execute",)async def coordinator(ctx): """Coordinate research and writing.""" return NoneAgentTeam
Section titled “AgentTeam”Compose multiple agents with orchestration patterns:
Supervisor
Section titled “Supervisor”from astromesh_adk import AgentTeam
team = AgentTeam( name="content-team", pattern="supervisor", supervisor=coordinator, workers=[researcher, writer],)result = await team.run("Write about AI in healthcare")Pipeline
Section titled “Pipeline”team = AgentTeam( name="doc-pipeline", pattern="pipeline", agents=[extractor, summarizer, translator],)team = AgentTeam( name="sales", pattern="swarm", agents=[qualifier, negotiator, closer], entry_agent=qualifier,)Parallel Fan-Out
Section titled “Parallel Fan-Out”team = AgentTeam( name="research", pattern="parallel", agents=[market_analyst, tech_analyst, competitor_analyst],)