Agentic Design Patterns Reference — Claude Cert Academy

Common patterns for building reliable, efficient agentic systems with Claude. Each pattern describes the structure, when to use it, and how to implement it.

Pattern 1: Orchestrator-Worker

One orchestrator agent coordinates multiple specialized worker agents. Workers run in parallel and report results back.

# Orchestrator dispatches parallel workers
results = await asyncio.gather(
    worker("analyze security", code),
    worker("check style", code),
    worker("review logic", code),
)
summary = aggregate(results)

Pattern 2: Critic-Generator

One agent generates output; a second agent critiques it. Repeat until quality threshold is met.

for _ in range(max_iterations):
    output = generator.run(task)
    critique = critic.evaluate(output, rubric)
    if critique.score >= THRESHOLD:
        return output
    task = f"{task}\n\nPrevious attempt feedback: {critique.feedback}"

Pattern 3: Pipeline (Sequential Chain)

Output of each agent becomes input to the next. Each step is specialized.

Pattern 4: Human-in-the-Loop

Agent pauses at defined checkpoints and waits for human approval before continuing.

Always include a human-in-the-loop gate before irreversible actions in production. The cost of one extra confirmation is lower than the cost of one bad action.

Pattern 5: Leaderless Swarm

Multiple identical workers pull tasks from a shared queue. No central coordinator.

Pattern 6: Validator Wrapper

A thin validation layer wraps every agent call to check output format and quality.

def agent_with_validation(prompt, schema, max_retries=3):
    for attempt in range(max_retries):
        result = agent.run(prompt)
        error = validate(result, schema)
        if not error:
            return result
        prompt = f"{prompt}\n\nPrevious output had errors: {error}. Fix and retry."
    raise ValidationError("Max retries exceeded")

Context Management Strategies

Tool Design Principles

Failure Mode Checklist

Continue to Claude Cert Academy