Related ToolsClaudeClaude CodeClaude For Desktop

Anthropic Publishes Guide to Three Core Workflow Patterns for AI Agents

Anthropic
Image: Anthropic

Most teams building with AI agents overcomplicate things from day one. Anthropic's latest guide on the Claude blog makes a case for starting simple and only adding workflow complexity when you can measure the improvement.

The guide covers three core patterns for structuring how AI agents work together, and the most useful advice might be what not to build.

Sequential: The Default Starting Point

Sequential workflows chain agents in a fixed order: one finishes, the next picks up. Think content moderation pipelines where text gets extracted, classified, run through rules, then routed. Or a draft-review-polish cycle for marketing copy.

Anthropic's key recommendation here is blunt: try doing everything with a single agent first. If one agent with a good prompt handles the job, you have solved the problem without added complexity. Only split into a chain when a single agent genuinely cannot manage the full task.

Parallel: When Speed Is the Bottleneck

Parallel workflows fan out independent tasks across multiple agents running simultaneously, then merge the results. The classic example is code review, where separate agents check for security vulnerabilities, performance issues, and style violations at the same time instead of sequentially.

The guide stresses a detail most teams skip: design your aggregation strategy before building the parallel system. How will you combine results from multiple agents? Majority vote? Averaged confidence scores? Weighted by agent specialty? If you do not have a clear answer, parallel execution will create more problems than it solves.

This pattern works well for document analysis (extracting themes, checking sentiment, and verifying facts simultaneously) and automated evaluations that need to assess multiple quality dimensions.

Evaluator-Optimizer: The Refinement Loop

This pairs a generator agent with an evaluator agent in an iterative cycle. The generator produces output, the evaluator scores it against defined criteria, and the generator revises based on feedback. The loop continues until quality thresholds are met.

Practical applications include API documentation generation, customer communications, and SQL query writing, all tasks where first drafts are consistently not good enough but the quality gap is measurable.

The critical warning: set maximum iteration counts and specific quality thresholds before starting. Without hard stopping criteria, these loops burn through API credits fast with diminishing returns after the first few rounds.

The Actual Advice Worth Following

The patterns are not mutually exclusive. You can nest an evaluator-optimizer loop inside a sequential pipeline, or run parallel evaluations within an optimizer cycle. But the guide's central argument is restraint: default to sequential, move to parallel only when latency is the real bottleneck and tasks are truly independent, and add evaluator-optimizer loops only when you can prove the quality improvement justifies the cost.

This is a five-minute read aimed at developers building on Claude's API, but the patterns apply regardless of which model you are using. The underlying white paper, "Building effective AI agents: architecture patterns and implementation frameworks," goes deeper for teams ready to implement.