CertSafari
    Anthropic Claude Certified Architect – Professional (CCAR-P) - December 7 onwards· Lessons

    Domain 1 · Lesson 6/39

    Choosing a Claude deployment surface and agent runtime

    Deployment Surface and Agent Runtime Selection

    18 min read
    3% of exam
    9 sources
    Published 18 Nov 2026
    Docs as of 18 Nov 2026

    What you will be able to do

    • Choose between the Claude API, Amazon Bedrock, Vertex AI and Microsoft Foundry when a design has a data-residency requirement, and say how each surface pins inference to a geography and what that costs
    • Check whether a model and a feature are offered on a surface before committing a design to it
    • Compare a Messages API loop, the self-hosted Agent SDK or headless Claude Code, and Claude Managed Agents by who operates the loop, the tools and the stored state
    • Rule a runtime in or out against Zero Data Retention and HIPAA requirements
    • Design session persistence, sandboxing and warm-up for an Agent SDK service you host yourself

    Key concept

    Runtime custody — Each runtime decides who stores the conversation history, the sandbox state and the outputs, and who runs the tools. That custody decision, more than the model, decides which compliance regimes the design can meet and which hosting work your team owns.

    1.Deployment surfaces and where inference runs

    A deployment surface is the endpoint your requests to Claude reach. The choice settles three things before anyone writes a prompt: which geography runs inference, which models and features you can call, and whose bill and rate limits the traffic counts against. There are four surfaces: the first-party Claude API, Amazon Bedrock, Google Cloud (which the exam calls Vertex AI), and Microsoft Foundry. Each one uses a different mechanism to keep inference in one region.

    The first-party Claude API sets geography for each request. The inference_geo parameter takes "global", the default, or "us". A workspace can also restrict the allowed values with allowed_inference_geos and set a fallback with default_inference_geo. Data at rest is a separate setting called workspace geo. It is fixed when the workspace is created, and us is the only value currently offered. Choosing "us" costs 1.1x the standard rate on Claude 4.6 and later models. Global routing exists to give you better performance and availability, so a residency pin trades away some of both.

    A Messages API request pinned to US inferencepython
    client = anthropic.Anthropic()
    
    response = client.messages.create(
        model="claude-opus-5-5",
        max_tokens=1024,
        inference_geo="us",
        messages=[
            {"role": "user", "content": "Summarize the key points of this document."}
        ],
    )

    Residency controls depend on the model, not only on the surface. If you send inference_geo to Claude Opus 4.5, Haiku 4.5 or any earlier model, the API returns a 400 error. A design that pins geography on an older model fails on its first request.

    Google Cloud offers Claude in two ways, and their residency options differ. In the Anthropic-managed offering, Anthropic operates the Claude API inside your Google Cloud project. Its location is global, and it is the offering that accepts inference_geo. In the Google-managed offering, Google operates Claude as part of its Agent Platform. Code reaches it through the AnthropicVertex SDK client, and you find it in Model Garden. This is the surface the exam means by Vertex AI. The Google-managed offering provides global, multi-region and regional endpoints, and Google Cloud, not Anthropic, sets its rate limits.

    On Amazon Bedrock, the model ID you call decides where requests go. The global endpoint routes dynamically across every available region. A regional endpoint resolves to a single AWS region. To spread traffic across several regions inside one geography, you call an inference profile instead of the base model ID. The profile ID is the base model ID with a geography prefix in front of it. Take a European bank that must keep inference in the EU. It calls the model through the eu-prefixed profile, not the global one. Before it finalizes the design, it checks that the model it wants has an EU profile at all. Coverage varies by model: Opus 4.6 and Sonnet 4.6 have an eu profile, but Fable 5.2 and Mythos 5.2 have only global and us.

    Microsoft Foundry pins geography when you create the deployment. For a deployment hosted on Azure, the Region scope setting is either Global or Data Zone. Data Zone creates a US Data Zone Standard deployment and costs the same 1.1x as US-only inference on the Claude API.

    How each surface keeps inference in a geography, and what that costs
    SurfaceResidency mechanismPricing effect
    Claude API (first-party)inference_geo "us" per request, or workspace allowed_inference_geos1.1x for "us" on Claude 4.6 and later
    Claude Models on Google Cloud (Anthropic managed)inference_geo1.1x for "us"
    Claude in Microsoft FoundryUS Data Zone Standard deployment type1.1x
    Bedrock and Claude Models on Google Cloud (Google managed)Partner-operated regional or geography endpointsThe platform's own regional pricing

    Checkpoint 1 of 8· Fill the gap

    A healthcare startup must keep model inference on US-based infrastructure. It calls the first-party Claude API with a Claude 4.6-or-later model. Which value completes the request?

    client = anthropic.Anthropic()
    
    response = client.messages.create(
        model="claude-opus-5-5",
        max_tokens=1024,
        inference_geo= ? ,
        messages=[
            {"role": "user", "content": "Summarize the key points of this document."}
        ],
    )

    Checkpoint 2 of 8· Exam question

    A European bank will call Claude through Amazon Bedrock and must keep inference traffic routed within the EU geography. Which two actions belong in the design? Choose two.(Select 2)

    0 of 2 selected

    Sources12345

    2.Agent runtimes and who operates what

    The deployment surface decides where inference runs. The agent runtime decides who runs everything around it: the loop that calls the model, the tools that run commands, and the store that holds session history. There are four runtimes, and each splits that work differently between your team and Anthropic.

    Agent runtimes compared by who operates the loop and where it runs
    RuntimeWho runs the loop and toolsWhere it runs
    Messages API through a Client SDKYou write the tool loop, or use the beta tool runnerYour own service
    Agent SDKA library that runs the Claude Code binary, with built-in tools, permissions, sessions and hooksA process you operate
    Claude Code CLI (headless with -p)Claude Code's own loopYour terminal, script or CI job
    Claude Managed AgentsAnthropic's hosted harnessAn Anthropic-managed cloud sandbox, or a self-hosted sandbox

    A Messages API loop gives you the most control and the most work. Every tool executor, retry and piece of state handling is code your team writes. That pays off when the loop itself is the product. It is the wrong choice when a team wants file and shell tools that already work.

    The Agent SDK and headless Claude Code reuse a finished harness, but you host it. The SDK embeds Claude Code's agent in a Python or TypeScript application that runs in your own process. Headless mode runs the same agent from a single command. A headless run cannot start background commands or background subagents, and a command that reaches its timeout stops. Use it for bounded jobs, not long watches. The --bare flag skips local settings, so a CI job gets only the configuration passed on its command line.

    A headless Claude Code run with only the Read tool auto-approvedbash
    claude --bare -p "Summarize README.md" --allowedTools "Read"

    Claude Managed Agents moves the harness and its infrastructure to Anthropic. You define an agent once: its model, system prompt, tools, MCP servers and skills. You then start sessions in an environment. Claude runs tools on its own and streams results back as server-sent events, and you can steer or interrupt it while it works. Managed Agents is built for tasks that run for minutes or hours, for scheduled cron runs, and for teams that want no agent loop or sandbox of their own. Before you choose it, check the surface. Managed Agents is listed on the Claude API, Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed), and every request needs the managed-agents-2026-04-01 beta header. A team committed to a partner-operated surface such as Bedrock needs a runtime it hosts itself.

    Checkpoint 3 of 8· Check yourself

    A team on the first-party Claude API needs agents that work on tasks for several hours, using file and shell tools. The team does not want to run an agent loop, a sandbox or tool-execution infrastructure of its own. Which runtime fits?

    Sources678

    3.Data custody and compliance eligibility

    Where session data is stored decides whether a runtime can meet Zero Data Retention (ZDR) requirements, while HIPAA is a flat exclusion. Managed Agents is stateful by design. Its sessions resume after pauses because Anthropic keeps their conversation history, sandbox state and outputs on its servers, so standard Managed Agents is not eligible for ZDR. Self-hosted Claude Managed Agents is the one documented ZDR exception, because there you store that data yourself. HIPAA has no such exception. Managed Agents is not currently eligible for a HIPAA Business Associate Agreement on any deployment, and that covers every sub-feature, including a fully self-hosted service. Custody can earn a ZDR exception but nothing comparable is documented for HIPAA, so when you meet a new Managed Agents case, ask who stores the data to settle ZDR and treat HIPAA as ruled out.

    Two kinds of self-hosting are easy to confuse. A self-hosted sandbox moves tool execution onto your infrastructure, which helps with compliance and data-residency requirements, but Anthropic's service still keeps the event history. Self-hosted Claude Managed Agents runs the whole service on your infrastructure, and that is what moves the stored data into your custody. You can delete sessions and uploaded files through the API at any time. Deleting data after it was retained does not make the runtime ZDR-eligible.

    When compliance rules out Anthropic-held state but the team still wants a ready-made harness, the Agent SDK fits. Take a healthcare startup that needs ZDR for all agent traffic and does not want to write its own loop. It runs the SDK in containers it operates. It stores transcripts through a SessionStore adapter on its own database and runs the tool shell in its own sandbox. That way it keeps the built-in tools and also holds custody of the data. A Messages API loop would also keep data in-house, but the team would have to rebuild the file and shell tools it wanted to reuse.

    Self-hosting the SDK moves sandboxing and credential handling onto your team too. When choosing a sandbox, weigh who runs it: a sandbox-as-a-service provider, or software you run yourself. Weigh its networking as well. Regulated environments need custom egress rules, outbound proxies and private VPC peering. Keep tool credentials out of the agent's environment: a proxy adds them after the request leaves the container. In a multi-tenant deployment, apply egress rules per tenant at that proxy, so that a compromised tenant cannot use another tenant's outbound policy. Who may call the agent is a separate question, covered under authentication and authorization posture.

    Checkpoint 4 of 8· Check yourself

    Under its contract, a hospital network needs HIPAA Business Associate Agreement coverage for an agent that reads patient files and runs shell commands. The team wants built-in file and shell tools and does not want to write its own agent loop. Which design fits?

    Checkpoint 5 of 8· Exam question

    A healthcare startup's platform architect must ship an autonomous coding-and-document agent. Compliance requires Zero Data Retention for all agent traffic, and the team wants to reuse an existing agent harness with built-in file and shell tools instead of writing its own loop. Which runtime choice fits these constraints?

    Sources79

    4.Session state and cold starts for a self-hosted Agent SDK

    A self-hosted SDK keeps its state on local disk unless you set up somewhere else for it. Each session writes to three places, and on Kubernetes, all three disappear when a container scales to zero.

    Where Agent SDK session state lives by default
    StateDefault location
    Session transcripts~/.claude/projects/, or projects/ under CLAUDE_CONFIG_DIR if set
    CLAUDE.md memory files~/.claude/CLAUDE.md (user tier) and the session's working directory (project tier)
    Working-directory artifactsThe session's working directory

    SessionStore saves the conversation, but not the notes. If you configure a SessionStore backed by an object store, a key-value store or a database, a returning user can resume their session by ID in any container. SessionStore copies transcripts only. CLAUDE.md files and other working-directory artifacts need a shared volume, or a sync that restores them when a new container starts. Pointing CLAUDE_CONFIG_DIR at another path inside the same container does not help, because that path disappears with the container. Routing a user back to "their" container fails for the same reason: after scale-to-zero, that container no longer exists.

    Resuming a saved session from an external SessionStoretypescript
    import { query, type SessionStore } from "@anthropic-ai/claude-agent-sdk";
    
    declare const userInput: string;
    declare const sessionId: string;          // looked up from your database by user
    declare const sessionStore: SessionStore; // an object store, key-value store, database, or your own adapter
    
    for await (const message of query({
      prompt: userInput,
      options: { resume: sessionId, sessionStore },
    })) {
      // ...
    }

    The store is a mirror, and writes to it can fail quietly. The subprocess writes to local disk first and then forwards each batch to the store. If a batch cannot be delivered, the SDK drops it, emits a mirror_error system message and carries on. If the store must be durable, alert on that message.

    **A session has no lifetime limit, and maxTurns does not provide one.** maxTurns (max_turns in Python) only caps how many turns the agent takes before it stops. It is a runaway guard, not a timeout. Holding a session open through a user's idle time only uses up memory, so recycle long-running subprocesses.

    Cold-start time is the latency a hosting pattern has to budget for. Cold start is how long it takes from asking for a sandbox to that sandbox being ready to accept the first request, so every second of it lands on whoever sends that request. Ephemeral patterns, which suit bursty workloads, need sub-second starts. Long-running patterns, where a session stays up, tolerate a slower start. Billing follows the same split: per-second pricing suits bursty ephemeral workloads, while flat hourly pricing suits long-running sessions. Warming attacks the start-time problem by doing the slow work before a request arrives. In TypeScript, startup() pre-warms subprocesses ahead of incoming traffic, and prewarm() does the same when you won't know a session's working directory until its first request. Managed Agents removes this work entirely, because its sessions keep persistent filesystems and history. The cost is that Anthropic holds that data, as the custody rules above describe.

    Checkpoint 6 of 8· Fill the gap

    After a Kubernetes pod scales to zero, a returning user's next request lands on a new container. The transcript is in an external SessionStore. Which option makes the SDK continue the user's saved session instead of starting a new one?

    import { query, type SessionStore } from "@anthropic-ai/claude-agent-sdk";
    
    declare const userInput: string;
    declare const sessionId: string;          // looked up from your database by user
    declare const sessionStore: SessionStore; // an object store, key-value store, database, or your own adapter
    
    for await (const message of query({
      prompt: userInput,
      options: {  ? : sessionId, sessionStore },
    })) {
      // ...
    }

    Checkpoint 7 of 8· Check yourself

    In a self-hosted Agent SDK deployment, a returning user resumes from a SessionStore on a fresh container. The conversation comes back, but the project-tier CLAUDE.md notes from their earlier work are missing. What fixes this?

    Checkpoint 8 of 8· Exam question

    An Agent SDK service runs on Kubernetes. Containers scale to zero when users go idle, and returning users report that the agent has lost both the conversation and the project notes it kept in CLAUDE.md. Which two changes address this? Choose two.(Select 2)

    0 of 2 selected

    Sources9

    Sources

    (9)

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

    1. 1.
      “To call these models, pass an inference profile instead of the base model ID.”
      ↩︎ Deployment surfaces and where inference runs
    2. 2.
      “To route across multiple regions within a geography, use an inference profile (US, EU, JP, or AU).”
      ↩︎ Deployment surfaces and where inference runs
      “Regional endpoints carry a 10 percent pricing premium over global endpoints.”
      ↩︎ Exam trap 1
      “Regional endpoints carry a 10 percent pricing premium over global endpoints.”
      ↩︎ Prediction
    3. 3.
      “Requests with inference_geo on Claude Opus 4.5, Claude Sonnet 4.5 (deprecated), Claude Haiku 4.5, or earlier models return a 400 error.”
      ↩︎ Deployment surfaces and where inference runs
      “Partner-operated platforms, Claude Models on Google Cloud (Google managed) and Bedrock, have their own regional pricing.”
      ↩︎ Deployment surfaces and where inference runs
    4. 5.
      “Data Zone creates a US Data Zone Standard deployment, which keeps inference within the United States.”
      ↩︎ Deployment surfaces and where inference runs
    5. 7.
      “Instead of building your own agent loop, tool execution, and runtime, you get a fully managed environment”
      ↩︎ Agent runtimes and who operates what
      “Not eligible for HIPAA. Applies to all Managed Agents sub-features.”
      ↩︎ Data custody and compliance eligibility
      “The exception for Zero Data Retention is self-hosted Claude Managed Agents, where you store that data yourself”
      ↩︎ Data custody and compliance eligibility
      “The Managed Agents service keeps the event history, and you can fetch it in full.”
      ↩︎ Data custody and compliance eligibility
      “sessions are long-running, resume cleanly after pauses, and store conversation history, sandbox state, and outputs server-side”
      ↩︎ Key concept
      “Because of this, Managed Agents is not currently eligible for Zero Data Retention or HIPAA Business Associate Agreement (BAA) coverage.”
      ↩︎ Exam trap 2
      “Minimal infrastructure: No need to build your own agent loop, sandbox, or tool execution layer”
      ↩︎ Checkpoint
    6. 8.
      “A command that reaches its timeout stops instead of moving to the background.”
      ↩︎ Agent runtimes and who operates what
    7. 9.
      “Who runs the sandbox: a sandbox-as-a-service provider operates the infrastructure for you, while self-hosted options give you software to run on your own.”
      ↩︎ Data custody and compliance eligibility
      “Route outbound calls through a proxy that injects API keys after the request leaves the container.”
      ↩︎ Data custody and compliance eligibility
      “Mount a shared volume or sync those separately.”
      ↩︎ Session state and cold starts for a self-hosted Agent SDK
      “Alert on these if store durability matters.”
      ↩︎ Session state and cold starts for a self-hosted Agent SDK
      “Ephemeral patterns need sub-second starts. Long-running patterns tolerate more.”
      ↩︎ Session state and cold starts for a self-hosted Agent SDK
      “Per-second pricing suits bursty ephemeral workloads. Hourly suits long-running sessions.”
      ↩︎ Session state and cold starts for a self-hosted Agent SDK
      “Call startup() to pre-warm subprocesses ahead of incoming traffic.”
      ↩︎ Session state and cold starts for a self-hosted Agent SDK
      “Transcripts only: SessionStore mirrors transcripts, not CLAUDE.md memory files or other working-directory artifacts.”
      ↩︎ Exam trap 3
      “Set maxTurns in TypeScript or max_turns in Python to bound how many turns the agent takes before stopping.”
      ↩︎ Exam trap 4
      “SessionStore mirrors transcripts, not CLAUDE.md memory files or other working-directory artifacts. Mount a shared volume or sync those separately.”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise Anthropic Claude Certified Architect – Professional (CCAR-P) - December 7 onwards in quiz mode.

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