Build
Composition
Lower-level graphs when AgentTeam is not the shape you need.
Use the builders when you want a custom graph instead of the team facade.
Orchestrator graph
python
from convax_adk import Agent, MultiAgentRuntime, build_orchestrator_graph, resolve_model
model = resolve_model()
research = Agent(
name="research",
description="Research a topic and return findings",
system_prompt="You are a research specialist.",
model=model,
)
writer = Agent(
name="writer",
description="Write a polished draft from research notes",
system_prompt="You are a writing specialist.",
model=model,
)
graph = build_orchestrator_graph([research, writer], model=model)
runtime = MultiAgentRuntime(graph, default_config={"configurable": {"thread_id": "1"}})
print(MultiAgentRuntime.final_text(runtime.invoke("Research X and draft a summary")))Each Agent.model is preserved. Specialists are not forced onto the orchestrator model.
Shared-state nested agents
python
from langgraph.graph import END, START, StateGraph
from convax_adk import Agent, AgentState, add_shared_subagent
builder = StateGraph(AgentState)
add_shared_subagent(builder, "triage", Agent(...))
add_shared_subagent(builder, "research", Agent(...))
builder.add_edge(START, "triage")
builder.add_edge("triage", "research")
builder.add_edge("research", END)
graph = builder.compile()
for item in graph.stream(inputs, stream_mode="updates", subgraphs=True):
...Other builders
| API | Behavior |
|---|---|
build_router_graph | Classify → one specialist → end |
build_sequential_graph | Specialists run in order, piping outputs |
mapped_subagent_node | Different parent/child schemas; config forwarded |