AI agents
Orchestrator, workers and evaluator: patterns for AI agents
Orchestrator-workers is a pattern where a central model breaks a task down, hands the pieces to workers and combines their results. In evaluator-optimizer, one model generates and another evaluates, in a loop, until the result meets the criteria. Anthropic recommends the simplest solution that works, with more complexity only when needed.
Updated
What is the orchestrator-workers pattern?
A central model, the orchestrator, breaks the task down as it goes, delegates the pieces to worker models and synthesizes their results. It fits complex tasks where you can't predict the subtasks in advance, such as code changes that touch several files.
What is evaluator-optimizer?
One model call generates a response and another evaluates it and gives feedback, in a loop. The pattern works well when the evaluation criteria are clear. The example in the Anthropic article is literary translation, where the evaluator catches nuances the first translation missed.
Workflow or agent?
- Workflow: models and tools follow code paths set in advance.
- Agent: the model directs its own process and chooses which tools to use.
- Anthropic recommends the simplest solution possible, adding complexity only when needed.
When is a multi-agent system not worth it?
- When the agents would need to share a lot of context, or the steps depend on each other.
- On many coding tasks, which have fewer truly parallel parts than research.
- When the task's value doesn't justify the tokens, since a multi-agent system uses far more of them than a chat.
Where does the human come in?
The agent can pause for feedback at checkpoints or when it hits a blocker, and stopping conditions such as a maximum number of iterations keep things under control. For high-impact actions, OWASP recommends that a person approves them before they run.
Frequently asked questions
Why is the evaluator separate from the model that writes?
In evaluator-optimizer, one call generates and another evaluates against clear criteria, and the feedback goes back into the loop. Anthropic also uses a model that grades against a rubric, checked against human evaluation.
How do you evaluate an agent?
With tasks that have defined inputs and success criteria, run several times. Grading combines code, models and people. Anthropic recommends starting from real failures and reading the transcripts.
Is orchestrator-workers the same as Claude Code subagents?
They are close. In Claude Code, the main conversation delegates tasks to subagents with their own context, which return a summary. Anthropic's research system has a lead agent and parallel subagents.
What is parallelization?
Models working on a task at the same time, with their outputs combined in code. They either split the task into independent pieces or run the same task several times to compare the answers.
How many agents does a task need?
As many as its complexity calls for. Anthropic scales effort to the query: a simple fact-finding question gets a single agent, broad research gets several.
Sources
Related articles
Claude Code subagents: what they are and when to use them
A Claude Code subagent is a separate assistant with its own context window, its own system prompt and only the tools you allow it. Claude hands it a task, the subagent works on its own and sends back just a summary, so long logs and search results stay out of your main conversation.ReadHuman in the loop: when a person approves what an AI agent does
Human in the loop means a person approves an AI agent's high-impact actions before they happen. Everything else runs on its own with minimal tools and permissions, and authorization lives in the downstream systems, outside the model's judgment. That is how OWASP recommends keeping an agent with too much power in check.Read
Case studies
Related services
Want agents on your company's processes?
Tell us which job you want done end to end. We will work out together whether one agent is enough or the job needs an orchestrator, workers and an evaluator.
Write to us