Multi-agent systems
Compose specialized agents into systems that decompose complex problems, isolate context, and coordinate naturally. The Autonomous Agent component provides four built-in coordination capabilities: each agent declares which patterns it participates in, and the framework wires the corresponding tools into the agent’s tool loop automatically.
Overview
When to Use This Pattern
-
Your problem benefits from specialist agents with focused contexts rather than one generalist with a diluted context.
-
Subtasks are independent enough to run in parallel.
-
You need triage or routing where a classifier hands off to the right specialist.
-
You want peer agents that collaborate, debate, or review each other’s work.
-
You want moderated turn-taking conversations such as panel reviews or negotiations.
Coordination patterns
Four coordination patterns cover the design space, each implemented by a capability:
-
Sequential / handoff. Control transfers between agents. Use
canHandoffTo(…)on aTaskAcceptancecapability. Examples: triage routing, escalation chains. -
Delegative / fan-out and fan-in. A coordinator dispatches subtasks to isolated workers. Use the
Delegationcapability. Examples: research with multiple specialists, parallel analysis. -
Collaborative / team. Peer agents share a task list and message each other. Use the
TeamLeadershipcapability. Examples: dev teams that self-coordinate, brainstorm groups. -
Moderated conversation. A moderator orchestrates turn-taking participants in scripted or directed mode. Use the
Moderationcapability. Examples: peer reviews, negotiations, debates.
See Coordination patterns for the conceptual background and Coordination capabilities for the API details.
Akka Components Involved
-
Autonomous Agents declare coordination capabilities that the framework wires into the agent’s tool loop.
-
HTTP Endpoints trigger top-level agents and surface task results.
-
Entities and Views can be exposed as function tools or queried through
ComponentClient.
Sample Projects
The autonomous-agent-playground includes one sample per coordination pattern:
-
research: delegation. Coordinator delegates to a researcher and an analyst, then synthesizes a brief. -
support: handoff. Triage classifies a request and hands off to a billing or technical specialist. -
consulting: composed delegation and handoff in one coordinator. -
peerreview: moderation in scripted mode (panel of specialist reviewers). -
negotiation: moderation in directed mode (multi-round buyer/seller). -
debate: moderation with two adversarial participants. -
devteam: team. A team lead decomposes a project; developer agents claim tasks from a shared list and message peers.
Workflow-supervised alternative
For request-based Agents coordinated through a Workflow supervisor, see Orchestrating multiple agents. The supervisor pattern keeps coordination logic outside the model in deterministic workflow steps, which suits cases where you want explicit step ordering, retry policies per step, and external compensation.
Choose the workflow approach when you want explicit, deterministic ordering. Choose Autonomous Agent capabilities when you want the model to decide what happens next based on the work in flight.