Anthropic planner, generator, evaluator pattern
Copy Anthropic's three-agent pattern: planner writes the spec, generator builds, evaluator grades.
Published here · 2 sources · Resume reading
A single coding agent that "just keeps going" still drops context and ships pretty shells with broken core interactions. Anthropic's Labs post (published 2026-03-24) describes a three-agent architecture: planner, generator and evaluator. Structured artifacts hand off context between sessions. [1]
Related reading: What is an AI agent?, Five rules for building an AI agent that works and Run five checks before merging AI-written code. Browse the AI agents topic.
Split the job into three roles
The post's final design is a three-agent architecture (planner, generator and evaluator) for rich full-stack apps over multi-hour autonomous sessions. It builds on earlier long-running agent lessons: decompose the build into tractable chunks, and use structured artifacts to hand off context between sessions. [1]
Earlier in the same work, a generator and evaluator pair (inspired by GANs) turned subjective design taste into gradable criteria. The evaluator used the Playwright MCP to interact with the live page before scoring each criterion and writing a critique. Feedback flowed back to the generator for the next iteration (about 5 to 15 iterations per generation in that frontend loop). [1]
Give the generator sprints and a stack contract
For full-stack coding, the generator works in sprints, picking up one feature at a time from the spec. Each sprint in the write-up implemented the app with a React, Vite, FastAPI and SQLite (later PostgreSQL) stack. The generator self-evaluates at the end of each sprint before handing off to QA, and it has git for version control. [1]
The planner expands a short product prompt into a full spec. That handoff is the contract the generator is graded against. [1]
Let the evaluator drive the live app
Applications from earlier long-running setups often looked impressive but still had real bugs in use. The evaluator used the Playwright MCP to click through the app and catch those gaps. In the Digital Audio Workstation example, first-round QA called out display-only core features (clips that could not be dragged, missing instrument panels, missing visual effect editors) even when design fidelity looked strong. [1]
That is the saveable rule: grade the running product against the spec, not the generator's claim that a feature exists.
Read the published cost table as one example
For the prompt "Build a fully featured DAW in the browser using the Web Audio API," the post says the run was still lengthy and expensive, at about 4 hours and $124 in token costs. The published V2 cost table: [1]
- Planner: 4.7 min, $0.46
- Build (Round 1): 2 hr 7 min, $71.08
- QA (Round 1): 8.8 min, $3.24
- Build (Round 2): 1 hr 2 min, $36.89
- QA (Round 2): 6.8 min, $3.09
- Build (Round 3): 10.9 min, $5.88
- QA (Round 3): 9.6 min, $4.06
- Total V2 run: 3 hr 50 min, $124.70
Those numbers are Anthropic's measured example for that prompt, not a promise for your stack. Start with Anthropic's earlier guidance too: find the simplest solution, and only increase complexity when needed. [1][2]
Your setup should leave a planner artifact, sprint commits and an evaluator critique that names failing interactions by feature, not by vibe.
Send this to the teammate whose agent runs for hours and still ships display-only features.
Keep this guide
Filed under AI agents, Claude Code
Questions about this guide
What is the planner generator evaluator pattern?
Anthropic's March 2026 research post describes a three-agent architecture: a planner expands the product brief, a generator builds the app in sprints, and an evaluator grades the live result (with Playwright MCP in their setup).
How is this different from Building effective agents?
Building effective agents (Dec 2024) covers workflows versus agents and composable patterns. The March 2026 Labs post is a later write-up on long-running app builds with file handoffs and an adversarial evaluator loop.
What did their example cost?
For one browser DAW prompt, the post lists Total V2 run 3 hr 50 min and $124.70 in token costs, with Planner 4.7 min ($0.46), Build Round 1 2 hr 7 min ($71.08) and QA Round 1 8.8 min ($3.24).
Do I need three separate models?
The post is about three roles with structured artifacts between sessions. Use separate prompts and handoff files even if one product account runs each role.
Sources
- Anthropic: Building effective agents (2024-12-19)anthropic.com