Agent.sub_agents
Agent(...).build()Google-ADK-shaped entry. Declare specialists on a root Agent, then build the team.
Agent development kit · v0.1.0
Convax ADK is the kit for multi-agent products. Declare a root Agent with sub_agents, then .build(). Specialists stay real compiled graphs — tools, handoffs, skills, and coding tools included.
pip install convax-adkPython >=3.11from convax_adk import Agent, resolve_model
travel = Agent(
name="travel_expert",
description="Handle ALL flight status questions.",
system_prompt="Always call get_flight_status.",
tools=[get_flight_status],
)
weather = Agent(
name="weather_expert",
description="Handle ALL weather questions.",
system_prompt="Answer weather briefly.",
)
root = Agent(
name="travel_desk",
description="Routes travel specialists.",
system_prompt="Coordinate travel_expert and weather_expert.",
model=resolve_model(),
sub_agents=[travel, weather],
)
app = root.build(thread_id="1")
print(app.chat("Is UA422 on time?"))create_subagent returns the create_agent graph directly. Specialists stay real subgraphs.
AdkSettings is code you own. Env is for secrets and deploy defaults, not product policy.
Travel desk and coding team ship with live specialist/tool-selection evals.
Composition
Start with Agent.sub_agents. Drop to tools mode, agents mode, routers, or shared subgraphs when the product needs that shape.
Agent(...).build()Google-ADK-shaped entry. Declare specialists on a root Agent, then build the team.
mode="tools"Orchestrator routes through tools. Each specialist returns a result. Default starting point.
mode="agents"Specialists are real graph nodes. return_to_parent decides who keeps the last word.
build_router_graphClassify once, send work to a single specialist, then end.
build_sequential_graphPipe specialists in order when the next agent must consume the previous output.
add_shared_subagentTrue nested subgraph on shared messages when agents must see the same thread.
Examples & evals
Canonical examples live under examples/. Top-level evals/ scores specialist routing and leaf tool selection with a live model.
examples/travel_deskAgent.sub_agents, tools mode, leaf tools, progressive skills, usage tracking.
python -m examples.travel_desk.mainexamples/coding_teamAgents mode, BuiltInPlanner, coding tools, reviewer-only submit_review, skills, retry.
python -m examples.coding_team.mainProduction primitives
Skills, memory, compaction, retry, and usage are first-class — the same stack Convax uses in calendar, voice, and story teams.
agentskills.io SKILL.md folders. Catalog at compile time, full body only when the agent calls load_skill.
Short-term checkpoints per thread_id. Long-term store per user_id. SQLite, Mongo, or in-process.
BuiltInPlanner with reasoning_effort, or PlanReActPlanner tags when a model has no native thinking.
Summarize older turns when the window fills. Keep recent messages verbatim.
Exponential backoff on model and tool failures. Token traces by model, including reasoning tokens.
Sandboxed list_dir, ranged read_file, write_file, str_replace, and optional workspace shell.
Architecture
Agent with sub_agents is the Google-shaped entry. AgentTeam / from_root compile tools mode and agents mode through one path. Middleware and memory attach from AdkSettings — not from hidden globals.
See the architecture →Agent / AgentTeam / TeamApp
sub_agents → from_root / .build()
tools → build_orchestrator_graph
agents → build_agent_team_graph
compile_agent / create_subagent
compaction · retry · memory · skills
examples/ + evals/ validate the public API.
Install the kit, declare sub_agents, and you have an orchestrator that routes with real specialists — then prove it with the live evals.