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],)Guardrails in teams
Section titled “Guardrails in teams”The guardrails of the supervisor (or entry) agent apply to the team run; a block returns a RunResult with blocked=True.
Confirmation in teams
Section titled “Confirmation in teams”requires_approval and mode="propose" tools work in local runs (see Creating Tools). In a team, or with other.as_tool(), the confirming “si” is read by the run that talks to the person, never by a member or sub-agent, and a member cannot propose. Remote children (bind()/connect()/remote()) declare origen: "agente" on every call, so the remote node never accepts the parent model’s “si” as human confirmation; the person confirms by talking to the remote agent directly.