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.

Workers stay narrow

Resist the urge to give workers overlapping capabilities. If two workers can do the same thing, the supervisor's decision becomes noisier.

Cost visibility

Emit metrics per worker call: agent.worker.calls{worker=research}. This tells you which specialists actually earn their keep.