Roles: supervisor + workers
Supervisor: reads user intent, decides which worker to invoke, aggregates results. Workers: narrow specialists, don't talk to each other directly.
Advertisement
Wiring in ADK Java
public class SupervisorAgent extends LlmAgent {
private final Map workers = Map.of(
"research", researchAgent,
"code", codeAgent,
"summarize", summaryAgent
);
@Override
public List getTools() {
return workers.entrySet().stream()
.map(e -> AgentAsTool.wrap(e.getKey(), e.getValue()))
.toList();
}
} Advertisement
Why workers as tools
Wrapping workers as tools lets the supervisor's model reason about them the same way it reasons about a search or calculator. No special orchestration logic — the runtime handles dispatch.