Orchestration

SwarmClaw uses LangGraph for multi-agent orchestration. An orchestrator agent routes tasks to specialized sub-agents automatically.

How It Works

  1. You send a message to an orchestrator agent
  2. The orchestrator analyzes the request and decides which sub-agent(s) to invoke
  3. Sub-agents execute their tasks and return results
  4. The orchestrator synthesizes and responds

Setting Up an Orchestrator

1. Create Sub-Agents

Create the specialized agents first. For example:

  • Code Writer — writes code (provider: Anthropic, model: claude-sonnet)
  • Code Reviewer — reviews code for bugs (provider: OpenAI, model: gpt-4o)
  • Doc Writer — writes documentation (provider: Ollama, model: llama3)

2. Create the Orchestrator

Create a new agent and toggle Is Orchestrator on. Then:

  • Select sub-agents from the multi-select
  • Set a system prompt describing when to route to each agent
  • Choose a provider (not Claude CLI — orchestrators need LangGraph)

3. Start a Session

Create a new session with the orchestrator agent. Messages are automatically routed to the appropriate sub-agent based on content.

Provider Requirements

Orchestrators require a LangGraph-compatible provider:

  • Anthropic (recommended)
  • OpenAI
  • Ollama
  • Custom (OpenAI-compatible)

Claude CLI is not supported for orchestration because it doesn't have the LangGraph/Zod structured output layer needed for routing decisions.

Orchestrator Engine

In Settings, you can configure a separate provider/model for the orchestration routing layer. This is the LLM that decides which sub-agent handles a request. It doesn't need to be the same provider as the sub-agents.

Limitations

  • Sub-agents execute sequentially (no parallel fan-out yet)
  • Orchestrators cannot be nested (an orchestrator can't have another orchestrator as a sub-agent)
  • Claude CLI agents can be sub-agents but not orchestrators