CertSafari
    Anthropic Claude Certified Developer – Foundations (CCDV-F) - December 7 onwards· Lessons

    Domain 1 · Lesson 1/24

    Choosing an agent architecture and runtime

    Architecture and Runtime Selection

    19 min read
    5.67% of exam
    5 sources
    Published 18 Nov 2026
    Docs as of 18 Nov 2026

    What you will be able to do

    • Decide whether a business requirement calls for a single call, a fixed workflow or an autonomous agent, given its error tolerance
    • Match a task to prompt chaining, routing, parallelization, orchestrator-workers or evaluator-optimizer
    • Decide when to split work across an orchestrator and subagents, and what that costs
    • Choose between the Client SDK, the Agent SDK and Claude Managed Agents, and between a managed and a self-hosted sandbox, under audit and compliance constraints

    Key concept

    Workflow versus agent — In a workflow, your code fixes the path that model calls and tools follow. In an agent, the model decides its own next step and which tool to use. Every architecture decision here comes down to how much of that path you hand to the model, and what that costs in predictability, tokens and auditability.

    1.Workflow or agent: how much control to hand the model

    Before choosing a runtime, decide who controls the path of the work. A workflow sends model calls and tools down code paths you wrote in advance. An agent lets the model direct its own process: it picks the next tool, reads the result and decides what to do next, until it judges the task complete. Anthropic files both under "agentic systems". The difference matters because it decides who owns each decision, and so who answers for it when it goes wrong.

    Start with the simplest design that works, and add complexity only when the simpler design falls short. Often that means building no agentic system at all: a single model call improved with retrieval and in-context examples handles many applications. Agentic systems trade latency and cost for better task performance, and that trade only pays off on some tasks.

    When more structure is warranted, the requirement tells you which side to pick. Workflows give predictability and consistency on well-defined tasks. Agents fit when you need flexibility and model-driven decisions at scale. On the API side, the same split shows up as a product choice. The Messages API is for teams that want custom agent loops and fine-grained control. Claude Managed Agents provides a ready-made harness for long-running, asynchronous work.

    Frameworks deserve the same caution. They simplify the low-level work of calling models, parsing tools and chaining calls. But they add layers of abstraction that hide the actual prompts and responses, which makes failures harder to debug, and they make it tempting to add complexity that isn't needed. Many patterns take only a few lines against the API directly. If you do adopt a framework, know what it does underneath, because wrong assumptions about the internals are a common source of errors.

    Checkpoint 1 of 9· Check yourself

    A team needs to automate a well-defined task. The steps are the same every time, and compliance reviewers require consistent, predictable results. A single optimized model call is not enough. Which design fits these requirements best?

    Sources12

    2.The five workflow patterns and what each one fits

    Five patterns cover most agentic systems in production. Each is built from an LLM given retrieval, tools and memory, and each fits a different shape of task. Learn each one by the situation it fits, because on the exam the situation is the only clue you get.

    Workflow patterns and the task shape each one fits
    PatternHow it worksUse it when
    Prompt chainingA fixed sequence of calls, each processing the previous output, with optional programmatic gates between stepsThe task splits cleanly into fixed subtasks; you accept extra latency for higher accuracy
    RoutingClassify the input, then send it to a specialized follow-up prompt, toolset or modelDistinct input categories are better handled separately and can be classified accurately
    Parallelization: sectioningIndependent subtasks, split in code, run in parallel and are aggregated programmaticallySubtasks are independent, or each consideration deserves focused attention
    Parallelization: votingThe same task runs several times to get diverse outputsMultiple attempts are needed for higher-confidence results
    Orchestrator-workersA central LLM breaks the task down at runtime, delegates to workers and synthesizes their resultsYou can't predict the subtasks in advance, such as multi-file code changes
    Evaluator-optimizerOne call generates, another evaluates and gives feedback, in a loopClear evaluation criteria exist and iterative refinement gives measurable value

    Routing fits support desks well. Separating the categories lets each one get its own prompt, so tuning for refund requests doesn't degrade answers to technical questions. The same classify-then-dispatch step can also choose a model tier: easy or common questions go to a smaller, cheaper model such as Claude Haiku 4.5, and hard or unusual ones go to a more capable model such as Claude Sonnet 4.5. Routing is a front door that sorts traffic. It doesn't split one ticket into parts, run a fixed sequence on every ticket, or take a vote.

    Orchestrator-workers and sectioning are easy to confuse because they look alike: work fans out to several model calls, and the results come back together. The difference is who decides the split. In sectioning, your code defines the subtasks before any input arrives. In orchestrator-workers, the subtasks are not defined in advance: the orchestrator decides them from the specific input. Neither feature separates them: both can run workers in parallel, and both combine the outputs. Voting differs from both. It runs the *same* task several times, where the other two hand out different parts.

    Evaluator-optimizer fits when two conditions hold. Responses get demonstrably better when a human articulates feedback, and a model can give that kind of feedback itself. Literary translation is the typical case. Without clear evaluation criteria, the loop has nothing to improve toward.

    Checkpoint 2 of 9· Match them up

    Each scenario below fits one workflow pattern best. Match each pattern to its scenario.

    Tap a term, then the definition that fits it.

    Checkpoint 3 of 9· Exam question

    A support desk receives tickets that are either simple password or billing questions, or complex technical incidents. The team wants simple tickets answered cheaply and complex ones handled by a stronger model with different instructions. Which pattern applies?

    Checkpoint 4 of 9· Exam question

    What distinguishes the orchestrator-workers pattern from a parallelization workflow that uses sectioning?

    Sources13

    3.Matching the architecture to error tolerance and audit needs

    Error tolerance is the requirement that most often rules out an open-ended agent. Each step in an autonomous loop is a model decision, and the errors multiply. At 95 percent accuracy per step, a 25-step run finishes with no mistakes only about 28 percent of the time (0.95 to the power 25). When the business can tolerate almost no wrong actions, as with refunds, the fix is architectural: use fewer steps, fix the path in code, and add a validation gate before the irreversible action.

    Prompt chaining provides exactly that gate. You can add programmatic checks between steps to confirm the process is still on track. Agents can also pause for human feedback at checkpoints. Where you do keep a loop, add stopping conditions such as a maximum number of iterations, to keep control. More turns don't make a loop more accurate. They give it more steps to get wrong. An instruction in the system prompt to "be careful" doesn't enforce anything. Duplicate subagents that repeat each step multiply token spend and add more points of failure. Enforcing these rules in code is covered under deterministic guardrails.

    Audit constraints shape the runtime choice as well. In Claude Managed Agents, sessions are stateful resources: the service keeps each session's event history, you can fetch it in full, and transcripts persist until you delete them. That gives you a complete record of every user turn, tool result and status update to review later. The same persistence matters for data handling, which the runtime section below takes up.

    Checkpoint 5 of 9· Check yourself

    Your refund agent runs an autonomous loop of about 25 model-driven steps, and now and then it issues a refund it shouldn't. Refunds can't be reversed, and the business tolerates almost no wrong ones. Which change best addresses the requirement?

    Checkpoint 6 of 9· Exam question

    An agent takes up to 25 autonomous steps to complete a refund workflow, and testing shows each step is right about 95 percent of the time. The business tolerates almost no wrong refunds. What is the most appropriate architectural response?

    Sources12

    4.When to split work across an orchestrator and subagents

    A multi-agent system runs several model instances, each with its own conversation context, coordinated through code. The usual pattern is orchestrator-subagent: a lead agent spawns specialized subagents for specific subtasks and manages them. It is the simplest way to coordinate multiple agents, but it doesn't come free, and teams have spent months building multi-agent systems only to find that better prompting on a single agent did as well.

    Multiple agents reliably beat one agent in three situations:

    • Context pollution. A subtask produces a lot of output the main task doesn't need, such as a 2,000-token order history pulled in while the agent diagnoses a technical fault. A subagent can process the full history and hand back a 50–100-token summary.
    • Parallel exploration. A lead agent splits a research question into independent facets and gives each to its own subagent.
    • Specialization. One agent has too many tools (often 20+), tools spanning unrelated domains, or performance on existing tasks drops when tools are added. Smaller agents with focused toolsets do better.

    Outside those three situations, coordination costs usually outweigh the benefits. Multi-agent implementations typically use 3–10x more tokens than a single agent on the same task. The extra comes from context duplicated across agents, coordination messages, and summaries at each handoff. Pipelines that put planning, execution, review and iteration in separate agents also lose context at every handoff. Every added agent is another point of failure and another prompt to maintain. Over-delegation in a running system is a diagnosis topic, covered under agent pattern diagnosis.

    Claude Managed Agents gives the lead agent three ways to share out work. It can delegate to subagents and read what each one reports. A subagent's thread persists, so the lead can send follow-up messages and the subagent keeps its earlier turns. It can write a dynamic workflow: a program the server runs in the background, which runs many agents in phases and combines their results. The lead can't send follow-ups to a run's threads, and the server archives each one when the run ends. Or it can consult an advisor model for guidance at key moments, such as planning or a final review, while doing the work itself.

    These limits constrain the decomposition you can build. Delegation goes only one level deep: listing an agent that itself has multiagent set fails with a 400 error. A session can have at most 25 child threads at a time, idle ones included. Each predefined_agents list can name up to 20 unique agents. Inline agents (defined on the fly by the lead agent or by a workflow) are on by default, so to allow only agents you have reviewed, disable them explicitly:

    An agent restricted to listed agents only: one predefined subagent plus copies of itself, and a pinned version 2 agent for workflowsjson
    {
      "multiagent": {
        "type": "multiagent_20261001",
        "subagents": {
          "type": "enabled",
          "inline_agents": { "type": "disabled" },
          "predefined_agents": ["agent_01J8XkN5uT3vHpLqRfWdY2", { "type": "self" }]
        },
        "workflows": {
          "type": "enabled",
          "inline_agents": { "type": "disabled" },
          "predefined_agents": [
            { "type": "agent", "id": "agent_01Lm4cV8yQ2tNs7XbKdR5h", "version": 2 }
          ]
        }
      }
    }

    Context is isolated between agents, but the environment is shared. Each agent runs in its own session thread with its own conversation history, yet all of them share one sandbox, filesystem and set of vault credentials. MCP servers are scoped to each agent, so you can keep a GitHub server away from the lead by declaring it only on a researcher subagent. An inline agent has no definition of its own and inherits the lead's MCP servers, so declaring fewer servers can't restrict it.

    Checkpoint 7 of 9· Fill the gap

    This lead agent may delegate only to reviewed agents, so inline agents are off. It still needs to hand work to copies of itself. Which entry type completes its subagents list?

    {
      "multiagent": {
        "type": "multiagent_20261001",
        "subagents": {
          "type": "enabled",
          "inline_agents": { "type": "disabled" },
          "predefined_agents": ["agent_01J8XkN5uT3vHpLqRfWdY2", { "type": " ? " }]
        },
        "workflows": {
          "type": "enabled",
          "inline_agents": { "type": "disabled" },
          "predefined_agents": [
            { "type": "agent", "id": "agent_01Lm4cV8yQ2tNs7XbKdR5h", "version": 2 }
          ]
        }
      }
    }

    Checkpoint 8 of 9· Check yourself

    Security review requires that only a reviewed researcher subagent can reach the GitHub MCP server in a Managed Agents session. Every other agent, including any agent the lead spawns on the fly, must be kept away from it. What setup meets this?

    Sources43

    5.Choosing where the agent runs: your harness or a managed runtime

    Once the architecture is set, choose who runs the loop and where tools execute. The choices run from writing everything yourself to having Anthropic host the whole harness.

    Runtime options and what each one leaves to you
    OptionWho runs the loopWhere it runsWins when
    Client SDK (Messages API)You write the tool loop, or use the beta tool runnerYour codeYou need custom agent loops and fine-grained control
    Agent SDKA library that runs the Claude Code binary, with built-in tools, permissions, sessions and hooksIn a process you operate, from Python or TypeScriptYou want Claude Code's agent embedded in your own application or existing infrastructure
    Claude Code CLIClaude Code in the terminalA developer's terminalInteractive development or one-off tasks
    Managed AgentsA hosted agent harness that runs the agent loopAn Anthropic-managed cloud sandbox, or a self-hosted sandbox on your own infrastructureLong-running, asynchronous or scheduled work without building your own loop, sandbox or tool layer

    Match the runtime to the task. A nightly CI job that runs for a few minutes against a checked-out repository already has a host and a lifecycle, so running the Agent SDK in a process you operate fits it. What it adds there is hooks and permissions, configured as covered in Agent SDK construction and hooks. Managed Agents earns its place on tasks that run for minutes or hours with many tool calls, on stateful sessions with persistent filesystems and conversation history across interactions, and on recurring runs on a cron schedule. It provides built-in Bash, file operations, web search and fetch (optionally limited to an allowlist or blocklist of domains), and MCP servers, plus prompt caching and compaction.

    The statefulness that makes Managed Agents convenient also limits where you can use it. Sessions store conversation history, sandbox state and outputs on the server, so Managed Agents is not eligible for Zero Data Retention or HIPAA BAA coverage. Zero Data Retention has one exception: self-hosted Claude Managed Agents, where the whole service runs on your own infrastructure and you store that data yourself. A self-hosted sandbox, where only the execution environment is yours, is meant for compliance and data-residency requirements. You keep control of retained data: you can delete sessions, and separately delete uploaded files, at any time through the API.

    Checkpoint 9 of 9· Match them up

    Four teams each have one requirement that decides where their agent runs. Match each runtime option to the requirement it fits best.

    Tap a term, then the definition that fits it.

    Sources52

    Sources

    (5)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.”
      ↩︎ Workflow or agent: how much control to hand the model
      “Agentic systems often trade latency and cost for better task performance, and you should consider when this tradeoff makes sense.”
      ↩︎ Workflow or agent: how much control to hand the model
      “they often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug.”
      ↩︎ Workflow or agent: how much control to hand the model
      “Routing classifies an input and directs it to a specialized followup task.”
      ↩︎ The five workflow patterns and what each one fits
      “Routing easy/common questions to smaller, cost-efficient models like Claude Haiku 4.5 and hard/unusual questions to more capable models”
      ↩︎ The five workflow patterns and what each one fits
      “Voting: Running the same task multiple times to get diverse outputs.”
      ↩︎ The five workflow patterns and what each one fits
      “This workflow is particularly effective when we have clear evaluation criteria, and when iterative refinement provides measurable value.”
      ↩︎ The five workflow patterns and what each one fits
      “on any intermediate steps to ensure that the process is still on track.”
      ↩︎ Matching the architecture to error tolerance and audit needs
      “Agents can then pause for human feedback at checkpoints or when encountering blockers.”
      ↩︎ Matching the architecture to error tolerance and audit needs
      “include stopping conditions (such as a maximum number of iterations) to maintain control.”
      ↩︎ Matching the architecture to error tolerance and audit needs
      “Workflows are systems where LLMs and tools are orchestrated through predefined code paths.”
      ↩︎ Key concept
      “subtasks aren't pre-defined, but determined by the orchestrator based on the specific input”
      ↩︎ Exam trap 1
      “workflows offer predictability and consistency for well-defined tasks, whereas agents are the better option when flexibility and model-driven decision-making are needed at scale”
      ↩︎ Exam trap 2
      “workflows offer predictability and consistency for well-defined tasks, whereas agents are the better option when flexibility and model-driven decision-making are needed at scale”
      ↩︎ Checkpoint
      “the key difference from parallelization is its flexibility—subtasks aren't pre-defined, but determined by the orchestrator based on the specific input.”
      ↩︎ Checkpoint
      “You can add programmatic checks (see "gate” in the diagram below) on any intermediate steps to ensure that the process is still on track.”
      ↩︎ Checkpoint
    2. 2.
      “Custom agent loops and fine-grained control”
      ↩︎ Workflow or agent: how much control to hand the model
      “The Managed Agents service keeps the event history, and you can fetch it in full.”
      ↩︎ Matching the architecture to error tolerance and audit needs
      “Sessions are stateful resources; transcripts persist until you delete them.”
      ↩︎ Matching the architecture to error tolerance and audit needs
      “Long-running execution: Tasks that run for minutes or hours with multiple tool calls”
      ↩︎ Choosing where the agent runs: your harness or a managed runtime
      “Self-hosted execution: Sandboxes on infrastructure you control for compliance or data-residency requirements”
      ↩︎ Choosing where the agent runs: your harness or a managed runtime
      “you can delete sessions, and separately delete any files you uploaded, at any time through the API.”
      ↩︎ Choosing where the agent runs: your harness or a managed runtime
      “Managed Agents is not currently eligible for Zero Data Retention or HIPAA Business Associate Agreement (BAA) coverage.”
      ↩︎ Exam trap 5
      “Not eligible for HIPAA. Applies to all Managed Agents sub-features.”
      ↩︎ Prediction
    3. 3.
      “Specialization: Route to agents with domain-focused system prompts and tools, such as a security agent or a documentation agent”
      ↩︎ The five workflow patterns and what each one fits
      “Parallelization: Fan out independent subtasks simultaneously (searching multiple sources, analyzing separate files) and have the agent synthesize the results.”
      ↩︎ The five workflow patterns and what each one fits
      “With subagents, it delegates tasks itself and reads what each subagent reports.”
      ↩︎ When to split work across an orchestrator and subagents
      “The agent writes a workflow: a program that runs many agents in phases and combines their results.”
      ↩︎ When to split work across an orchestrator and subagents
      “Delegation is one level deep, and a session can have at most 25 child threads at a time, idle ones included.”
      ↩︎ When to split work across an orchestrator and subagents
      “Inline agents are on by default under both settings.”
      ↩︎ When to split work across an orchestrator and subagents
      “All agents share the same sandbox, filesystem, and vault credentials, but each agent runs in its own session thread”
      ↩︎ When to split work across an orchestrator and subagents
      “To limit an agent’s access, declare only the servers it needs in its agent definition. You can’t limit an inline agent this way.”
      ↩︎ Exam trap 4
      “An inline agent has no agent definition, so it uses the MCP servers and tools of the agent that the session runs.”
      ↩︎ Checkpoint
    4. 4.
      “A multi-agent system is an architecture where multiple LLM instances run with separate conversation contexts, coordinated through code.”
      ↩︎ When to split work across an orchestrator and subagents
      “when context pollution degrades performance, when tasks can run in parallel, and when specialization improves tool selection or task focus.”
      ↩︎ When to split work across an orchestrator and subagents
      “An agent with too many tools (often 20+) struggles to select the appropriate one.”
      ↩︎ When to split work across an orchestrator and subagents
      “they suffered from lost context at each handoff and spent more tokens coordinating than executing”
      ↩︎ When to split work across an orchestrator and subagents
      “In our testing, multi-agent implementations typically use 3-10x more tokens than single-agent approaches for equivalent tasks.”
      ↩︎ Exam trap 3
      “The primary benefit of parallelization is thoroughness, not speed.”
      ↩︎ Prediction
    5. 5.
      “A hosted agent harness that runs the agent loop, with sessions in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure.”
      ↩︎ Choosing where the agent runs: your harness or a managed runtime

    Ready to test yourself?

    Practise Anthropic Claude Certified Developer – Foundations (CCDV-F) - December 7 onwards in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.