OpenAI Containers vs AWS AgentCore
OpenAI Containers are a tool inside OpenAI's model API: the model runs Python or shell commands in a box that expires after 20 minutes without use. AWS AgentCore is an agent platform inside your AWS account: it hosts your agent code in a microVM per session, next to managed Code Interpreter and Browser tools.
The companies and products
OpenAI Containers
OpenAI Containers are the sandboxes OpenAI runs for its own model tools: Code Interpreter, Hosted Shell and the Agents API's hosted sandbox.
This is a different kind of product from boat: a tool inside OpenAI's model API, not a machine you rent. You create a container through the API or let a Responses call make one, and the model runs Python or shell commands in it on a fixed Debian 12 image without sudo, until it expires after 20 minutes without use. It is built for apps that already call OpenAI models and want them to run code, read files and make charts without running any servers.
AWS AgentCore
Amazon Bedrock AgentCore is a set of AWS services to deploy and run AI agents: a Runtime that hosts your agent code, plus built-in Code Interpreter and Browser tools.
AgentCore is not a sandbox product first. It is a hyperscaler's agent platform: you push a container image or code, and each Runtime session gets its own Firecracker microVM that you reach through AgentCore APIs. Around it sit managed tools (Code Interpreter, Browser) and services for memory, identity, gateways and evaluations, and an Instances compute type runs longer sessions on EC2 in your own account. It is built for teams who already build on AWS and want agents to stay inside their account, IAM and VPC.
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “356th cheapest of 367” means 355 of the other 366 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | OpenAI Containers: price rank | AWS AgentCore: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month A coding agent needs root, Docker and a disk that stays; OpenAI containers have no sudo and expire after 20 idle minutes, AgentCore stops after 8 hours, and boat ranks 3rd with a full VM. | 356th of 367, with limits $17,371 a month | 100th of 367, with limits $888 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on one machine all month outlasts both: an OpenAI container must be touched every 20 minutes, and AgentCore needs the Instances type on EC2 in your account. | 341st of 366, with limits $13,140 a month | 64th of 366, with limits $1,300 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Both are built for short code runs: AWS AgentCore ranks 7th here and bills only CPU actually used, while OpenAI Containers fit best when the model already runs in an OpenAI API call. | 194th of 345, with limits $6,000 a month | 7th cheapest of 345 $114 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month Neither OpenAI nor AgentCore opens ports to your users, so they cannot click a preview link; boat ranks 1st here with HTTPS URLs on up to 50 ports per sandbox. | 361st of 361, with limits $3,780 a month | 210th of 361, with limits $506 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month | 191st of 360, with limits $30,000 a month | 125th of 360, with limits $8,075 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 360th of 364, with limits $5,760 a month | 33rd cheapest of 364 $650 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CI jobs need Docker and open internet; OpenAI containers start with no internet and no Docker, AgentCore documents no Docker or /dev/kvm, and boat gives root with both. | 345th of 377, with limits $1,728 a month | 52nd cheapest of 377 $399 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box you SSH into and keep all month is not what either is for: neither has SSH, and both lose installed packages after a stop. | 362nd of 368, with limits $1,051 a month | 228th of 368, with limits $52 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month OpenAI and AgentCore both drive a browser for computer use; boat streams a full Linux desktop at 60fps for agents that use other apps too. | 351st of 369, with limits $5,280 a month | 104th of 369, with limits $202 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month AWS AgentCore ranks 4th here with a managed Chromium that has live view and session replay; OpenAI's hosted browser is tied to its Agents API beta. | 328th of 367, with limits $1,440 a month | 4th cheapest of 367 $144 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 328th of 346, with limits $1,755 a month | 27th cheapest of 346 $287 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 311th of 338, with limits $35,100 a month | 165th of 338, with limits $5,458 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 308th of 360, with limits $870 a month | 62nd of 360, with limits $294 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month | Can't run it | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | OpenAI Containers | AWS AgentCore | boat |
|---|---|---|---|
| What it is | A sandbox tool the model uses inside OpenAI's API | An AWS agent platform: hosted agent sessions plus managed Code Interpreter and Browser tools | A cloud VM per agent that you create, keep, stop and reach from outside |
| Isolation | A fully sandboxed virtual machine; hypervisor not named | Firecracker microVM per Runtime session; Code Interpreter and Browser in a containerized environment | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Machine size | Picked by memory: 1, 4, 16 or 64 GB; vCPU not published (Agents API sandboxes: 1, 2 or 4 vCPU) | 2 vCPU / 8 GB per microVM session, not adjustable; bigger EC2 types only on Instances | 4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB |
| Session length | Expires after 20 minutes without use; Agents API sandboxes after an hour without activity | Up to 8 hours per microVM lifecycle, stopped after 15 idle minutes by default; up to 14 days on Instances | No session cap on paid plans; you set the time to live |
| Files after a stop | Data is discarded when the container expires; Agents API keeps only files in /workspace/outputs | Only one storage mount under /mnt, up to 1 GB, in preview; EBS volumes on Instances; the rest resets | The whole disk, saved every minute and on stop; a stopped sandbox costs nothing |
| Root, Docker and /dev/kvm | Commands do not run with sudo; no Docker or /dev/kvm documented | Root inside the microVM; Docker and /dev/kvm not documented | Root, systemd, Docker and /dev/kvm on every machine |
| Image | Fixed Debian 12 image; you upload files or skills into each container | Your own arm64 container image on microVMs; x86_64 or arm64 on Instances | Named snapshots of a set-up machine, reused as templates |
| Snapshots and fork | No snapshots or fork | No user snapshots or fork of a session | Automatic snapshots every minute; fork a running sandbox with its disk |
| Inbound access | None; you reach the container only through the API | No open ports or SSH; sessions are reached only through AgentCore APIs with IAM or JWT | SSH, HTTPS URLs for up to 50 ports, raw TCP |
| Outbound network | Code Interpreter and Hosted Shell: off until an admin sets an org domain allowlist; Agents API sandboxes: on by default, can be limited to 1 to 100 hosts | Open internet, or VPC mode with security groups, PrivateLink and a NAT gateway for a fixed outbound IP | Open internet on every plan; no provider-side allowlist |
| Browser and desktop | Hosted browser for the Agents API computer_use tool | Managed Chromium with live view, session recording and replay, profiles and proxies; no full desktop | Full Linux desktop streamed at 60fps, with Chromium, computer use and an embeddable stream |
| Coding agents | Agents API (beta) drives a managed Codex harness from outside, with steering, events and webhooks | AWS's managed harness built on Strands Agents, or your own agent code in any framework | Claude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API |
| Keeping API keys out of the sandbox | domain_secrets: a sidecar adds the real header for approved domains, the model sees a placeholder | AgentCore Identity stores OAuth tokens and API keys and hands them to your agent code | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| GPUs and regions | No GPUs; Code Interpreter processing in the US or Europe, Agents API in the US only | NVIDIA G-series and Inferentia2 on Instances; 17 commercial AWS regions plus GovCloud | No GPUs; EU only (Germany, Finland, France) |
Every feature Battleships tracks (43)
| Feature | OpenAI Containers | AWS AgentCore | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | No | Not published | Yes |
| Nested virtualization | No | No | Yes |
| Root | No | Yes | Yes |
| Systemd | Not published | No | Yes |
| Desktop GUI | Yes | No | Yes |
| Browser | Yes | Yes | Yes |
| Computer-use API | Yes | Yes | Yes |
| SSH | No | No | Yes |
| Persistent disk | No | Yes | Yes |
| Pause/resume | No | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | No | No | Yes |
| Live fork (no pause) | No | No | Yes |
| Memory fork | No | No | No |
| Custom image (Docker or snapshot) | No | Yes | Yes |
| ≥24 h sessions | Yes | No | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | Yes | No |
| HTTPS preview URLs | No | No | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | No | Yes |
| Secret proxy for any API | Yes | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | No | Yes | No |
| GPU | No | Yes | No |
| Windows | No | No | No |
| Arm64 | No | Yes | No |
| Self-hosting | Yes | No | No |
| BYOC | No | Yes | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Yes | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Yes | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable measurement for either: OpenAI Containers and AWS AgentCore are not in the public hpc-sandbox-benchmarks run, and OpenAI does not publish the vCPU behind each container size. boat did 26.69 runs per second on the Node.js build-and-test loop at 4 vCPU / 8 GB.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. OpenAI Containers and AWS AgentCore have no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | OpenAI Containers, a month | AWS AgentCore, a month | boat, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $228 · API pay as you go · with limits | $26 · Pay-as-you-go (Instances) · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $1,051 · API pay as you go · with limits | $107 · Pay-as-you-go (Instances) · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $11,405 · API pay as you go · with limits | $1,286 · Pay-as-you-go (Instances) · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $1,620 · API pay as you go · with limits | $423 · Pay-as-you-go · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $6,000 · API pay as you go · with limits | $1,615 · Pay-as-you-go (Instances) | $2,000 · $2000/mo · with limits |
OpenAI Containers: OpenAI bills each container session by the minute for the memory size you pick, with a 5-minute minimum, and model tokens are billed on top. There is no plan fee.
AWS AgentCore: Runtime microVMs, Code Interpreter and Browser bill per second for CPU actually used and for peak memory. The 4 vCPU shape in these scenarios is the Instances type: the EC2 on-demand price plus a 12% management fee, with EBS storage and data transfer on top.
AWS AgentCore: Plans start at $20 a month, and the whole fee is usage credit spent per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
OpenAI Containers fit none of the five scenarios: there is no persistent disk or Docker, Code Interpreter and Hosted Shell start with no internet, the vCPU per size is not published, and OpenAI does not confirm 300 or 1,000 containers at once. AWS AgentCore fits only the 1,000 short jobs; in the others, files outside the storage mount reset after a stop, the disk price beyond that is unknown, and the always-on agent hits the 14-day cap on Instances. boat fits every scenario but the burst, where the $2,000 plan queues starts above 90 per minute.
| Scenario | OpenAI Containers | AWS AgentCore | boat |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
|
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use OpenAI Containers when
your app already calls OpenAI models and the model only needs to run short pieces of code or shell commands on files you give it.
- Built into the model call. If your app already calls OpenAI models, one tool line in a request gives the model a place to run code.
- Locked-down network by default. Code Interpreter and Hosted Shell reach nothing until an admin allows domains, and secrets for them stay hidden from the model.
- Nothing to deploy. OpenAI creates the container, runs the code and lets it expire, so there is no agent image, account setup or cleanup.
Use AWS AgentCore when
your agents must stay inside your AWS account and VPC, need a GPU, or are short code and browser tasks that fit the managed tools.
- It lives inside your AWS account. Teams built on AWS keep agents behind their own IAM, VPC, security groups and PrivateLink, in 17 commercial regions.
- GPUs and two-week sessions on Instances. Agents that need a GPU or a session of up to 14 days can run on EC2 in your account.
- Managed tools that bill for what they use. Code Interpreter and Browser charge for CPU actually used, and Browser adds live view, session replay and saved profiles.
Where boat fits
Both of these keep the agent on a short leash: OpenAI's box expires after 20 idle minutes, and AgentCore's microVM stops after 8 hours with 2 vCPU. If your agent does real work on a machine for hours or days, with installs, Docker, a dev server and files that must stay, boat gives it a whole VM it keeps.
A whole machine with root
OpenAI runs commands without sudo, and neither OpenAI nor AgentCore documents Docker or /dev/kvm. The workarounds are a sandbox you host yourself for OpenAI's Agents API, or AgentCore Instances on EC2 you run and pay for.
A disk that stays, with fork
An OpenAI container discards everything when it expires, and AgentCore keeps only a 1 GB storage mount in preview. Every resume repeats the clone and the installs; boat saves the whole disk every minute and can fork it.
An app you can open
Neither has open ports or SSH, so a dev server the agent starts cannot be shown to you or your users without proxying it through your own code. boat gives each sandbox HTTPS URLs on up to 50 ports, raw TCP and SSH.
Use boat when your agent needs a real machine it keeps for hours or days: root, Docker, a disk that persists, open internet and ports you can open, with any coding agent built in. Compare it one to one: boat vs OpenAI Containers and boat vs AWS AgentCore.
Questions people ask
Is OpenAI Containers cheaper than AWS AgentCore?
In every scenario on this page, AgentCore costs less: one coding agent on workdays is $228 a month on OpenAI and $26 on AgentCore, and one agent running all month is $1,051 against $107. OpenAI also bills model tokens on top. boat comes to $20 and $26 a month for those two.
Which is faster, OpenAI Containers or AWS AgentCore?
Neither has a public CPU measurement, so there is no fair speed comparison. AgentCore microVM sessions stop at 2 vCPU, and OpenAI does not publish vCPU per container size. boat did 26.69 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB.
Can OpenAI Containers or AWS AgentCore run Docker?
OpenAI's hosted shell runs commands without sudo, and no Docker support is documented. AgentCore runs your container image as root in a microVM, but its docs do not say Docker or /dev/kvm work inside a session. boat gives root, systemd, Docker and /dev/kvm on every sandbox.
How long can a session last on each?
An OpenAI container expires after 20 minutes without use, and Agents API sandboxes after an hour without activity. An AgentCore microVM session lasts up to 8 hours and stops after 15 idle minutes by default, or up to 14 days on Instances. boat has no session cap on paid plans.
Do files survive when the session ends?
On OpenAI, the container's data is discarded when it expires. On AgentCore, only a storage mount under /mnt of up to 1 GB, in preview, or an EBS volume on Instances survives. boat keeps the whole disk and saves it every minute.
Can I open a web app running inside either one?
No. Neither has open ports or SSH; you reach OpenAI containers through the OpenAI API and AgentCore sessions through AgentCore APIs. boat gives each sandbox HTTPS URLs for up to 50 ports, raw TCP and SSH.
Try boat
Install the CLI, then run boat new.
7-day free trial
More comparisons
- boat vs OpenAI Containers
- boat vs AWS AgentCore
- E2B vs OpenAI Containers
- Daytona vs OpenAI Containers
- Modal vs OpenAI Containers
- Vercel Sandbox vs OpenAI Containers
- Cloudflare Sandbox vs OpenAI Containers
- Blaxel vs OpenAI Containers
- Runloop vs OpenAI Containers
- Tensorlake vs OpenAI Containers
- Morph Cloud vs OpenAI Containers
- CodeSandbox SDK vs OpenAI Containers