Claude Managed Agents vs OpenAI Agents API vs AgentCore
3 ways to have someone else run your AI agent's loop and sandbox: Anthropic's Claude Managed Agents, OpenAI's Agents API and AWS's AgentCore harness. They differ less in features than in 4 things: which models you can use, what an idle hour costs, where the session's data is kept, and how hard it is to leave. The same small job on each, the runtime bill worked out, and which to pick.
Tecyfy · Published · 10 min read

Claude Managed Agents, the OpenAI Agents API and the AgentCore harness all do the same job: you describe an agent, send it a task, and someone else runs the loop that calls the model, runs the tools in a sandbox and keeps the session's state. The difference is whose loop it is. Anthropic's runs Claude only, OpenAI's runs OpenAI models only, and AWS's runs on AgentCore in the AWS Region you pick with models from Bedrock, OpenAI, Gemini or any LiteLLM-compatible provider.
That one difference decides most of the rest: which models you can switch to, where the conversation is stored, and how much rewriting a move would take. The runtime fees, which get the most attention, are the smallest part of the bill.
Who runs what
| Claude Managed Agents | OpenAI Agents API | AgentCore harness | |
|---|---|---|---|
| Whose loop | Anthropic's harness | OpenAI's Codex harness | AWS's, built on Strands Agents |
| Models | Claude 4.5 and later | OpenAI's | Bedrock (Claude among them), OpenAI, Gemini, LiteLLM; switchable mid-session |
| Where it runs | Anthropic's servers | OpenAI's servers | AgentCore in AWS, in the Region you pick |
| Sandbox | Anthropic cloud container, or one you host | OpenAI-hosted (1, 4 or 16 GB), one you host, or none | A microVM per session, or your own ARM64 container image |
| Runtime fee | $0.08 per session-hour, running time only | Container rates, active turns only | Per second: CPU used and memory held |
| Web search | $10 per 1,000 | $10 per 1,000 | $7 per 1,000 |
| Zero Data Retention | No | No; data residency in the US only | Stays in AgentCore in your Region; managed memory can use your own KMS key |
| Status | Beta | Public beta since 10 September 2026 | Generally available, 16 Regions |
If the loop should be your own code, none of the 3 harnesses fits; that is AgentCore Runtime without the harness, or a library such as the Claude Agent SDK. LangGraph vs CrewAI vs the Claude Agent SDK compares those.
The same job on each
A small job shows how alike the 3 have become: an agent with a shell that profiles a CSV file. Each needs an agent defined once, then a session per task.
On Claude Managed Agents the sandbox is a separate object, an environment, and the session joins the two:
from anthropic import Anthropic
client = Anthropic()
agent = client.beta.agents.create(
name="CSV profiler",
model="claude-sonnet-5-5",
system="You profile data files. Report row counts, nulls per column and odd values.",
tools=[{"type": "agent_toolset_20260401"}],
)
env = client.beta.environments.create(
name="profiler-env",
config={"type": "cloud", "networking": {"type": "limited", "allowed_hosts": ["data.example.com"]}},
)
session = client.beta.sessions.create(agent=agent.id, environment_id=env.id)
# then stream the session's events and send a user.message with the task
On the OpenAI Agents API the sandbox is chosen when the session starts:
from openai import OpenAI
client = OpenAI()
agent = client.beta.agents.create(
model="gpt-6.1-sol",
instructions="You profile data files. Report row counts, nulls per column and odd values.",
)
session = client.beta.agents.sessions.create(
agent_id=agent.id,
environment={"type": "openai_hosted"},
input="Download https://data.example.com/orders.csv and profile it.",
)
On AgentCore the harness is an AWS resource with an IAM execution role, created once with aws bedrock-agentcore-control create-harness --harness-name CsvProfiler --execution-role-arn <role>, and each call names a session ID of at least 33 characters:
import uuid
import boto3
client = boto3.client("bedrock-agentcore", region_name="us-west-2")
response = client.invoke_harness(
harnessArn="arn:aws:bedrock-agentcore:us-west-2:123456789012:harness/CsvProfiler-XyZ1234567",
runtimeSessionId=str(uuid.uuid4()),
messages=[{"role": "user", "content": [{"text": "Download https://data.example.com/orders.csv and profile it."}]}],
)
for event in response["stream"]:
if "contentBlockDelta" in event:
print(event["contentBlockDelta"]["delta"].get("text", ""), end="")
With no model set, the harness uses Claude Sonnet on Amazon Bedrock. Sending the same session ID again continues the conversation in the same environment.
What an hour of runtime costs
Each platform meters its sandbox differently, and the difference shows when an agent waits. Take a session that is open for 1 hour: it works for 20 minutes, then waits 40 minutes for a person to reply. Model tokens are left out for now.
| How it is metered | This session | |
|---|---|---|
| Claude Managed Agents | $0.08 per session-hour while running; idle time is free | 20 minutes running: about $0.027 |
| OpenAI Agents API, default 4 GB sandbox | $0.12 per 20-minute session, active turns only since 9 October 2026 | 20 minutes of active turns, billed by the minute: $0.12 |
| AgentCore harness, v1 | $0.0895 per vCPU-hour of CPU used, $0.00945 per GB-hour of memory held, per second | Assume 2 GB held for 1 hour 15 minutes (the default 15-minute idle timeout runs after the last call) and 5 minutes of 1 busy vCPU: about $0.031 |
AgentCore's CPU line is cheap because CPU is not billed while the agent waits on a model or a tool, as long as no background process uses CPU, as long as no background process uses CPU, but its memory is billed the whole time the microVM is up, including the idle timeout. A shorter idleRuntimeSessionTimeout trims that, at the cost of more cold starts. The newer v2 platform reclaims idle memory after 120 seconds and bills $0.1276 per vCPU-hour and $0.0169 per GB-hour.
Now add the tokens. If the same task reads 500,000 input tokens and writes 30,000 output tokens on a model priced at $2 and $10 per million, as Claude Sonnet 5.5 and GPT-6.1 Sol are on their own APIs, it costs $1.30 with no caching. That is 10 to 50 times any of the runtime fees above. The model and the cache hit rate decide the bill; what an AI agent costs per month works the sum for a whole month, and the agent cost simulator runs a task on every current model.
2 smaller lines are easy to miss on AgentCore. The harness turns on managed Memory unless you switch it off, and Memory is billed at its own rates, explained in Amazon Bedrock AgentCore explained. CloudWatch also bills for the traces every invocation sends.
Where the conversation is kept
All 3 keep the session so it can continue, which is why the 2 makers' platforms are not eligible for Zero Data Retention.
- Claude Managed Agents stores the history, the sandbox state and the outputs on Anthropic's servers, and is not eligible for Zero Data Retention or a HIPAA BAA. A self-hosted sandbox keeps your files on your machine, but the conversation and every tool result still go to Anthropic, because that is how the model reads them. On Claude 4.6 and later models, On Claude 4.6 and later models, US-only inference is available at 1.1 times the token price.
- The OpenAI Agents API keeps session state on OpenAI's servers, offers data residency in the United States only and does not support Zero Data Retention. A self-hosted sandbox moves the commands, not the harness or the model calls.
- The AgentCore harness keeps sessions, memory and files in AgentCore in the Region you pick, and its managed memory can be encrypted with your own KMS key, set when the harness is created. The model call goes wherever the model lives: a Bedrock model stays in AWS, while an OpenAI or Gemini model sends each prompt to that provider with a key AgentCore keeps in its token vault.
For a team whose data may not leave its AWS account, that last row settles the choice before price comes up.
How hard it is to leave
Each platform makes the agent a stored object you configure, so moving means rebuilding the configuration, not the prompts or tools. The real lock-in is the model.
Claude Managed Agents and the OpenAI Agents API tie you to their maker's models. To change model family you change platform, and session history does not carry over. The AgentCore harness can switch model provider between 2 turns of the same session with the context intact, so a price or quality test is a configuration change. When configuration is not enough, AWS lets you export a harness to Strands Agents code and run it on AgentCore Runtime yourself.
The ties run the other way for AWS. A harness is built from IAM roles, ECR images and AgentCore resources, so leaving AWS means rewriting the deployment. The harness also offers no choice of framework and no graph or workflow patterns: for those you write the loop and host it on Runtime.
OpenAI's harness inside AWS
There is a fourth option for AWS shops that want OpenAI's loop. Amazon Bedrock Managed Agents, powered by OpenAI, in preview, runs the Codex harness and OpenAI model inference inside Amazon Bedrock, with AgentCore Runtime or your own compute running the tools and AWS IAM for access. The agent runtime and the model calls stay inside AWS. OpenAI's own page warns that the shared concepts do not mean identical API contracts or features, so check AWS's documentation before porting Agents API code.
Anthropic's harness has a partial equivalent: Claude Managed Agents runs on Claude Platform on AWS, with some differences in features, though not on Amazon Bedrock itself.
Which to pick
Choose by the constraint you cannot move, not by the feature list, because the features have converged.
- Your data must stay in your AWS account, or you want to switch models: the AgentCore harness. It is also the only one of the 3 that is generally available.
- You build on Claude and want the least plumbing: Claude Managed Agents. Idle time is free, so agents that wait hours for a person cost nothing while they wait. Claude Managed Agents covers its setup, budgets and defaults.
- You build on OpenAI models or are leaving the Assistants API: the Agents API. OpenAI Agents API maps each Assistants object to its successor.
- You need Zero Data Retention with a maker's API: none of the hosted harnesses. Run the loop yourself on the Messages API or Responses API with a library.
Whichever you choose, set a limit before the first real task. Claude sessions take a spending budget at creation and AgentCore takes maxIterations, timeoutSeconds and maxTokens. On OpenAI, the usage a session reports is best effort and not the bill, so keep your own count of turns and tokens. AI agent budget limits covers why each AgentAgentA model that uses tools in a loop, deciding each next step from what the last one returned, until the task is done. needs one, and AgentCore Gateway covers putting all of an AgentCore agent's tools and models behind one endpoint.
Questions
- What is the difference between Claude Managed Agents, the OpenAI Agents API and AgentCore?
- All 3 run an AI agent's loop and its sandbox for you, so you send tasks instead of hosting the agent. Claude Managed Agents runs Anthropic's harness with Claude models on Anthropic's servers. The OpenAI Agents API runs OpenAI's Codex harness with OpenAI models on OpenAI's servers. The AgentCore harness runs AWS's harness, built on Strands Agents, in your AWS account, with models from Amazon Bedrock, OpenAI, Google Gemini or any LiteLLM-compatible provider.
- Which hosted agent platform is cheapest?
- For the runtime itself, all 3 cost cents an hour. Claude Managed Agents charges $0.08 per session-hour, only while the session runs. OpenAI's hosted sandbox costs $0.12 per 20 minutes at the default 4 GB size, billed by the minute with a 5-minute minimum, during active turns only. AgentCore bills per second for the CPU the microVM uses and the memory it holds, about $0.03 for a 1-hour, 2 GB session that computes for 5 minutes. In our example task, the model tokens cost 10 to 50 times the runtime fee, so the model you pick decides the bill.
- Can I use Claude models with AgentCore?
- Yes. The AgentCore harness defaults to Claude Sonnet on Amazon Bedrock and can use any Claude model Bedrock serves. That gives you Claude in a managed loop inside AWS, but the loop is AWS's Strands-based harness, not Anthropic's. Claude Managed Agents itself is not offered on Amazon Bedrock; it runs on the Claude API, Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed).
- Do Claude Managed Agents and the OpenAI Agents API support Zero Data Retention?
- No. Both keep the session's state on the maker's servers so a session can continue later, and neither is eligible for Zero Data Retention. The OpenAI Agents API offers data residency in the United States only. AgentCore keeps session data in AWS in the Region you pick, and its managed memory can use your own KMS key.
- Can I run the OpenAI Agents API on AWS?
- Through Amazon Bedrock Managed Agents, powered by OpenAI, which is in preview. It runs OpenAI's harness and model inference in Amazon Bedrock, with AgentCore Runtime or your own compute running the tools, and authenticates with AWS IAM. Shared concepts do not mean identical API contracts or features, so check AWS's documentation before porting Agents API code.
- Are these hosted agent platforms production ready?
- The AgentCore harness is generally available in 16 AWS Regions. Claude Managed Agents is in beta behind the managed-agents-2026-04-01 header, the OpenAI Agents API has been in public beta since 10 September 2026, and Bedrock Managed Agents is in preview. A beta's fields can change between releases, so pin versions and test after each update.
Sources
Where each fact comes from
- 1Claude Managed Agents overview
- 2Get started with Claude Managed Agents
- 3Define your agent
- 4Pricing: Claude Managed Agents pricing
- 5Start a session
- 6Observability and usage
- 7Choosing an environment
- 8Agents API
- 9OpenAI-hosted sandboxes
- 10Configuring Agents
- 11Changelog
- 12Pricing
- 13Bedrock Managed Agents
- 14Amazon Bedrock Managed Agents, powered by OpenAI (Preview)
- 15AgentCore harness
- 16AgentCore harness vs. Runtime
- 17Get started (AgentCore harness)
- 18Models and instructions (AgentCore harness)
- 19Harness operations: costs and limits
- 20Memory (AgentCore harness)
- 21Configure lifecycle settings
- 22Data protection in Amazon Bedrock AgentCore
- 23Supported AWS Regions
- 24Amazon Bedrock AgentCore pricing