ACAgentic Craft

Intermediate~14 minHazelJS

Supervisor and Specialists

A supervisor delegates to specialist agents with narrow tools via createSupervisor / AgentGraph.

Authors
editorial-team
Published
Last reviewed

Problem

A single agent prompt cannot hold all domain expertise and tools safely.

Context

Multi-domain operations with clear specialist boundaries.

Forces and constraints

  • Specialists need narrow ToolRegistries
  • Supervisor must not become a god agent
  • Handoffs need shared goal context

Recommended design

createSupervisor({ agents: [...] }) or graph with supervisor node. Specialists get curated skills; supervisor routes and optionally merges. Pair with bounded autonomy per specialist.

Minimal pseudocode

const supervisor = createSupervisor({
  agents: [billing, shipping, identity],
});
await runtime.execute(supervisor, goal, { maxSteps: 16 });

Failure modes

  • Supervisor retains all specialist tools
  • No escalation path to humans

Security considerations

  • Per-specialist capabilities
  • HITL on specialist writes

Observability signals

  • Delegation edges on timeline

Evaluation approach

Routing accuracy + specialist golden suites

Trade-offs

  • Operational complexity vs monolith simplicity

Sources

Related patterns