Claude Code: 10 Agent Team Examples You Can Copy

· 6 min read

Overview

Building multi-agent teams from scratch requires deciding on agent roles, coordination patterns, prompt structures, and handoff logic simultaneously. That is a lot of design decisions before you write a single line of working code. Starting from proven templates eliminates the blank-page problem and gives you a functional baseline to customize.

These ten agent team configurations cover the most common business automation scenarios. Each example includes the full agent setup — roles, instructions, tool assignments, and coordination pattern — so you can deploy them directly or adapt them to your specific requirements.

Every example uses the Claude Agent SDK and follows established multi-agent coordination patterns. The teams are organized by complexity, starting with simple two-agent configurations and building up to sophisticated multi-stage pipelines.

When to use it

Use these templates as starting points when:

Do not use these templates as-is for production without customizing the prompts and tools for your specific domain, data sources, and quality requirements.

Getting started

1. Content Research Team (Parallel Workers)

Three agents research a topic simultaneously from different angles, then a synthesizer combines their findings.

import { Agent } from "@anthropic-ai/agent-sdk";

const academicResearcher = new Agent({
  name: "academic-researcher",
  model: "claude-sonnet-4-20250514",
  instructions: `Research the given topic using academic and technical sources.
    Focus on peer-reviewed findings, established frameworks, and expert consensus.
    Return 3-5 key findings with source references.`,
  tools: [academicSearchTool],
});

const industryResearcher = new Agent({
  name: "industry-researcher",
  model: "claude-sonnet-4-20250514",
  instructions: `Research the given topic from an industry and market perspective.
    Focus on market data, company case studies, and practitioner insights.
    Return 3-5 key findings with source references.`,
  tools: [webSearchTool, marketDataTool],
});

const trendResearcher = new Agent({
  name: "trend-researcher",
  model: "claude-sonnet-4-20250514",
  instructions: `Research emerging trends and future outlook for the given topic.
    Focus on recent developments, expert predictions, and technology shifts.
    Return 3-5 key findings with source references.`,
  tools: [newsSearchTool, socialTrendTool],
});

// Run all three in parallel
const [academic, industry, trends] = await Promise.all([
  academicResearcher.run(topic, { maxTurns: 8 }),
  industryResearcher.run(topic, { maxTurns: 8 }),
  trendResearcher.run(topic, { maxTurns: 8 }),
]);

2. Code Review Pipeline (Sequential Pipeline)

Three agents review code in sequence, each catching different categories of issues.

const securityReviewer = new Agent({
  name: "security-reviewer",
  model: "claude-sonnet-4-20250514",
  instructions: `Review code for security vulnerabilities. Check for:
    - SQL injection, XSS, CSRF risks
    - Insecure authentication patterns
    - Exposed secrets or credentials
    - Missing input validation
    Output a JSON array of findings with severity (critical/high/medium/low).`,
  tools: [codeReadTool, dependencyCheckTool],
});

const performanceReviewer = new Agent({
  name: "performance-reviewer",
  model: "claude-sonnet-4-20250514",
  instructions: `Review code for performance issues. Check for:
    - N+1 query patterns
    - Missing indexes or inefficient queries
    - Memory leaks and unbounded data structures
    - Blocking operations in async contexts
    Output a JSON array of findings with impact rating.`,
  tools: [codeReadTool, queryAnalyzerTool],
});

const maintainabilityReviewer = new Agent({
  name: "maintainability-reviewer",
  model: "claude-sonnet-4-20250514",
  instructions: `Review code for maintainability. Check for:
    - Unclear naming or missing documentation
    - Overly complex functions (high cyclomatic complexity)
    - Duplicated logic that should be extracted
    - Missing error handling
    Output a JSON array of findings with actionable suggestions.`,
  tools: [codeReadTool],
});

3. Customer Support Triage (Router Pattern)

A triage agent classifies incoming requests and routes them to specialized handlers.

const triageAgent = new Agent({
  name: "triage",
  model: "claude-sonnet-4-20250514",
  instructions: `Classify the customer inquiry and route to the appropriate specialist:
    - Billing issues: billing-specialist
    - Technical problems: tech-support
    - Product questions: product-expert
    - Account changes: account-manager
    If unclear, ask one clarifying question before routing.`,
  handoffs: [
    { agent: billingSpecialist, condition: "Billing or payment related" },
    { agent: techSupport, condition: "Technical issues or bugs" },
    { agent: productExpert, condition: "Product features or usage" },
    { agent: accountManager, condition: "Account changes or upgrades" },
  ],
});

4. Data Analysis Team (Fork-Join)

Parallel analysts examine different aspects of a dataset, then a synthesizer produces a unified report.

const statisticalAnalyst = new Agent({
  name: "statistical-analyst",
  model: "claude-sonnet-4-20250514",
  instructions: `Perform statistical analysis on the provided dataset.
    Calculate distributions, correlations, and significance tests.
    Identify outliers and anomalies. Return structured findings.`,
  tools: [dataQueryTool, statisticsTool],
});

const trendAnalyst = new Agent({
  name: "trend-analyst",
  model: "claude-sonnet-4-20250514",
  instructions: `Analyze temporal patterns in the dataset.
    Identify trends, seasonality, and change points.
    Compare current period to historical baselines.`,
  tools: [dataQueryTool, timeSeriesTools],
});

const reportSynthesizer = new Agent({
  name: "report-synthesizer",
  model: "claude-sonnet-4-20250514",
  instructions: `Combine statistical and trend analyses into a single
    executive report. Highlight the 3 most important findings.
    Include specific numbers and actionable recommendations.`,
  tools: [chartGeneratorTool, reportFormatterTool],
});

5. Competitive Analysis Team

const competitorProfiler = new Agent({
  name: "competitor-profiler",
  model: "claude-sonnet-4-20250514",
  instructions: `Build a profile of each competitor: products, pricing,
    market position, recent launches, and stated strategy.`,
  tools: [webSearchTool, companyDataTool],
});

const swotAnalyst = new Agent({
  name: "swot-analyst",
  model: "claude-sonnet-4-20250514",
  instructions: `Given competitor profiles and our company context,
    produce a SWOT analysis for each competitor relationship.
    Focus on actionable insights, not generic observations.`,
  tools: [comparisonTool],
});

6-10: Additional Patterns

The remaining five patterns follow the same structure — specialized agents with focused tools coordinated through established patterns:

Each follows the same principles: single-responsibility agents, typed tools, explicit coordination, and structured output at every stage.

Integration with agent teams

These ten examples map to four core coordination patterns. Choose based on your data flow requirements:

Parallel Workers (Examples 1, 4): Use when multiple independent analyses of the same input improve quality. Best for research, analysis, and review tasks where diverse perspectives add value.

Sequential Pipeline (Examples 2, 7, 8, 9): Use when each stage transforms or enriches the output of the previous stage. Best for processing workflows where order matters.

Router (Example 3): Use when inputs need classification before processing. Best for support, triage, and request handling systems.

Fork-Join (Examples 4, 5, 10): Use when you need parallel processing followed by synthesis. Best for analysis tasks that benefit from multiple perspectives combined into a unified output.

Best practices and common pitfalls

  1. Start with two agents, not five. Every additional agent adds coordination overhead. Begin with the minimum viable team and add agents only when you have evidence that the current team cannot handle a specific capability.

  2. Give each agent a distinct output format. When agents in a team produce inconsistent output structures, the synthesis or handoff step becomes fragile. Define the expected output shape in each agent's instructions.

  3. Test each agent in isolation before assembling the team. If an individual agent produces poor results, the team configuration will not fix it. Verify each agent's quality independently before connecting them.

  4. Make handoff conditions mutually exclusive. In router patterns, overlapping conditions cause unpredictable routing. If "billing questions about technical features" could match two handlers, define an explicit priority order.

  5. Measure team performance against a single-agent baseline. Multi-agent systems are not always better. Run the same tasks through a single well-prompted agent and compare quality, latency, and cost before committing to the multi-agent architecture.

Skip the setup — generate agent teams instantly →