Which Requirement Binds? Picking the Claude Surface and Agent Runtime Under Constraints
Four teams, one product, four different platform answers. Find the requirement that binds (residency, compliance, availability or ownership), pick the surface and the runtime, and name what you accept.
What you will learn
- Name the four requirements that decide the platform: residency, compliance, availability and ownership
- Find the one requirement that binds for a team, then pick the surface and the runtime
- Name the trade-off every pick accepts: latency, feature lag, hosting, session state, sandboxing, data custody
- Reject an option that claims every requirement is met, and spot a wrong entry point
Before you start
- Claude on third-party platforms (Bedrock, Foundry, Google Cloud)
- What an agent loop is
A team lead says: just put it on whatever is easiest. But four requirements pull on that choice: where the data may go, whose contract must cover it, which features are really there, and who will run the thing. Two decisions come out of it, the surface and the runtime. A good architect finds the one requirement that binds before picking either.
Where it runs, and who runs it
Think of a restaurant. The surface is where the calls run, like which building the kitchen is in. The runtime is who runs the agent loop, like who cooks and who cleans up. Every pick on either side costs something, so a good answer names the trade-off it accepts.
Four surfaces
- Anthropic API. Anthropic runs it, and new models and features arrive there first.
- Amazon Bedrock, operated by AWS, and Microsoft Foundry, the route on Azure. They sit in clouds a team may already use.
- Claude Models on Google Cloud (Google managed). Older material calls this Vertex AI.
Feature availability varies by platform, so check each platform's page. Other routes exist too (Claude Platform on AWS, for example); confirm those in the docs. More on the cloud routes in Claude on third-party platforms.
Three runtimes
- Messages API loop. The plainest. You write the loop yourself and keep the session state.
- Self-hosted Agent SDK (or headless Claude Code). The agent loop runs in your own process or pipeline. You host it and you sandbox it.
- Claude Managed Agents, in beta. Anthropic runs the loop, the session and the sandbox. See Claude Managed Agents hosting.
The surface limits the runtime: a hosted runtime isn't offered on every surface.
Four requirements pull, one binds
| Requirement | Asks | Moves |
|---|---|---|
| Data residency | Where may the data be processed? | Pins the surface |
| Compliance | Whose contract and audit trail must cover it? | Pins the surface |
| Model and feature availability | Is the model, and every feature you need, really there? | Can rule a surface out |
| Operational ownership | Who can host the loop, sandbox it and keep it running? | Mostly picks the runtime |
Several can apply at once. Find the one that binds, and it picks first.
Every pick gives something up
There are six costs to name, in three pairs:
- Latency and feature lag. A hosted loop sits further from your own systems, and a cloud route can get a feature later.
- Hosting and session state. Who keeps the loop running, and who stores the conversation and its steps.
- Sandboxing and data custody. Where the agent's commands run, and who holds the data while it's processed.
The rules in code
The project makes no model call, so there is no stand-in and no API key. rules.py holds the decision. The team facts are scenario data; the feature gaps for the Google-managed offering come from the Claude docs' API overview, and the README asks you to confirm each platform's page:
"""Find the binding requirement, then pick the surface and the runtime."""
CLOUD_SURFACE = {
"aws": "Amazon Bedrock",
"azure": "Microsoft Foundry",
"gcp": "Claude Models on Google Cloud (Google managed)",
}
MISSING = {CLOUD_SURFACE["gcp"]: {"batches", "managed agents"}}
COST = {
"Anthropic API": "calls leave your cloud boundary",
"Amazon Bedrock": "features vary by platform",
"Microsoft Foundry": "features vary by platform",
"Messages API loop": "you host the loop and its session state",
"Agent SDK, self-hosted": "you host and sandbox the runtime",
"Managed Agents (BETA)": "beta, and the sandbox is Anthropic's",
}
def lacks(team):
home = CLOUD_SURFACE.get(team["home"])
return MISSING.get(home, set()) & team["needs"]
def bind(team):
if team["pinned"]:
return team["why"]
return "availability" if lacks(team) else "ownership"
def runtime(team):
if team["work"] != "agent":
return "Messages API loop"
if team["ops"]:
return "Agent SDK, self-hosted"
return "Managed Agents (BETA)"
def pick(team):
surface = "Anthropic API"
if team["pinned"]:
surface = CLOUD_SURFACE[team["pinned"]]
return bind(team), surface, runtime(team)
def entry_ok(proposed, team):
return team["engineers"] or proposed not in ("headless Claude Code",)
def review(picks):
named = [COST[p] for p in picks if p in COST]
return "ok" if named else "REJECT: no trade-off named"
bindreturns the pinned requirement first (residency or compliance). Otherwise it asks whether a needed feature is missing, and falls back to ownership.runtimekeeps a plain team on the Messages API loop. An agent team that can host takes the self-hosted Agent SDK; without that, Managed Agents.picktakes the cloud the team is pinned to, or the Anthropic API, and adds the runtime.reviewrejects any option that names no trade-off.
The four teams, from teams.py:
TEAMS = [
team("Returns chat", ops=False, work="agent"),
team("Warehouse routing", pinned="aws", why="residency"),
team("Invoice matching", pinned="azure", why="compliance", work="agent"),
team("Field notes", home="gcp", needs=("batches",)),
]
CAMPAIGN = team("Campaign copy", ops=False, work="call", engineers=False)
Four teams, four answers
The decision sheet that run_all.py printed:
team binds surface runtime
Returns chat ownership Anthropic API Managed Agents (BETA)
accepts: calls leave your cloud boundary; beta, and the sandbox is Anthropic's
Warehouse routing residency Amazon Bedrock Messages API loop
accepts: features vary by platform; you host the loop and its session state
Invoice matching compliance Microsoft Foundry Agent SDK, self-hosted
accepts: features vary by platform; you host and sandbox the runtime
Field notes availability Anthropic API Messages API loop
accepts: calls leave your cloud boundary; you host the loop and its session state
not Claude Models on Google Cloud (Google managed) - lacks batches
- Returns chat has no one to host a loop, so ownership binds: the Anthropic API with Managed Agents, in beta. It accepts that calls leave its cloud boundary and the sandbox is Anthropic's.
- Warehouse routing must keep its calls in the company AWS account, so residency binds: Amazon Bedrock with a Messages API loop.
- Invoice matching needs its audit trail under the Azure contract, so compliance binds: Microsoft Foundry with a self-hosted Agent SDK. It hosts and sandboxes the runtime.
- Field notes lives on Google Cloud but needs batches. The Google-managed route lacks batches, so availability binds and the pick is the Anthropic API.
Same product, four teams, four different answers.
Two traps
The wrong entry point
The campaign copy team drafts marketing emails, and no engineers sit on the team. Someone suggests headless Claude Code, because it worked well for developers. But it's a coding tool that needs people who can run and maintain it. What this team needs is a plain Messages API loop, one call per draft:
entry point
Campaign copy proposed headless Claude Code: WRONG ENTRY POINT (no engineers)
Campaign copy proposed Messages API loop: fits
The entry point can be wrong before the surface or the runtime even matter.
The option with no cost
Imagine an option that says yes to everything: any cloud, a hosted loop, residency met, compliance met, every feature there, nobody hosts anything, and the cost is none. review rejects it, because it names no trade-off. A real option says what it accepts:
option review
any cloud + hosted loop, nothing to give up: REJECT: no trade-off named
Amazon Bedrock + Messages API loop: ok
If an option has no cost, a requirement was ignored.
Quick recap
| Move | What you do |
|---|---|
| Bind | Find the requirement that decides: residency, compliance, availability or ownership |
| Surface | Where the calls run: the pinned cloud, or the Anthropic API |
| Runtime | Who runs the loop: Messages API loop, self-hosted Agent SDK, or Managed Agents |
| Accept | Name the trade-off you take on |
The full side-by-side of build stacks comes in choosing the Claude build stack. The project files for this lesson are in the community, free to join.
Try it yourself
Add a fifth team to teams.py: it lives on AWS, is not pinned, needs no special feature, and runs an agent with an ops team. Predict what bind, pick and the accepts line will say. Then pin it to "aws" for residency and see which line changes.
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
The Claude Messages API: Your First Call, Field by Field
One request in, one Message out. The four fields of a Messages API call (model, max_tokens, system, messages), how to read content blocks, stop_reason and usage, and why every turn resends the history.
Claude Tool Use: How tool_use and tool_result Work in the Messages API
Follow one order question through Claude's tool round trip: define a tool, read the tool_use block, run your own function and send a matching tool_result back, including parallel calls and is_error.
Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
Every Claude client SDK wraps the same REST request: a POST to /v1/messages with a JSON body. See it built by hand, through the Python and TypeScript SDKs, as typed errors, and as async calls that wait together.
Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
Configure the Anthropic SDK client (timeout, max_retries, with_options, async, pagination), see which errors it retries by itself, then repair a retry wrapper so a 429, a 529, a 400 and a timeout each get the move the docs support.
