Project MonetRequest demo
Home/Blog/OpenAI Agents API Sandboxes: Hosted vs Self-Hosted vs Provider Environments

AI · Project Monet Briefing

OpenAI Agents API Sandboxes: Hosted vs Self-Hosted vs Provider Environments

OpenAI designed the Agents API so the managed agent harness and the execution environment are separate choices. That matters because an agent's reasoning layer and the machine where it runs code do not have to come from the same provider.

Published 2026-09-14 · Updated 2026-09-14 · By Project Monet Editorial Team

OpenAI Agents API Sandboxes: Hosted vs Self-Hosted vs Provider Environments — Project Monet editorial graphic

01

Overview

OpenAI designed the Agents API so the managed agent harness and the execution environment are separate choices. That matters because an agent's reasoning layer and the machine where it runs code do not have to come from the same provider.

02

The three environment paths

OpenAI describes three broad options: OpenAI-hosted sandboxes, your own infrastructure, and integrated sandbox providers.

The best option depends on security, networking, data location, resource requirements, startup latency and cost rather than on the model alone.

03

OpenAI-hosted sandbox

OpenAI's hosted sandbox is the lowest-friction path. It can run code, work with files and produce artifacts, and can be configured with files, packages, skills and plugins.

Advantages: minimal infrastructure setup, close integration with the Agents API and a straightforward starting point for prototypes or standard workloads.

Tradeoffs: less infrastructure control than a self-operated environment, separate container/sandbox costs, and beta-era limits that need rechecking before production.

04

Your own infrastructure

A self-managed environment gives the most control over network topology, secrets, storage, observability and compliance boundaries. It can make sense when the agent must access private systems, run inside an existing VPC or use custom hardware and security controls.

The tradeoff is operational responsibility. You own provisioning, lifecycle management, patching, resource limits, isolation and incident handling.

05

Provider environments

OpenAI lists first-class ecosystem integrations with Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop and Vercel.

Provider environments can sit between the two extremes: more deployment choice than the OpenAI-hosted sandbox with less custom orchestration than building everything yourself. Capabilities vary, so compare the provider's current networking, secrets, region, CPU/GPU, storage, persistence, cold-start and pricing details directly.

06

How to choose

Use OpenAI-hosted when speed of setup matters most and its documented limits fit the job.

Use your own infrastructure when compliance, private networking or deep environment control dominates the decision.

Use an integrated provider when you need a specific compute/storage/network profile or already operate on that platform.

07

Files and artifacts

Agents often need more than ephemeral text. Decide where input files originate, where intermediate files live and how final artifacts are persisted. OpenAI's hosted environment can work with files and artifacts, but long-term storage and business-system records should follow your application's durability requirements.

08

Secrets and permissions

Whichever environment you choose, give agents the minimum privileges necessary. Separate read-only investigation tools from mutation-capable tools where possible. Rotate credentials and avoid embedding long-lived secrets directly in prompts or source files.

09

Networking

Network access is one of the biggest environment differences. Self-hosted/VPC deployments can offer precise private connectivity, while provider options expose their own egress, allowlist and private-network features. Verify the current behavior rather than assuming all integrations expose the same network model.

10

Cost model

Environment cost is separate from model usage. A fair comparison includes model tokens, OpenAI tools, sandbox/container time, storage, network/egress, external APIs and engineering/operations overhead.

11

Decision table

Prototype or standard cloud workflow: start with OpenAI-hosted. Private VPC or strict infrastructure policy: evaluate self-hosted. Specific GPU/CPU profile or existing platform preference: evaluate an integrated provider. High-volume bursty workloads: compare startup behavior and idle economics. Artifact-heavy tasks: compare storage persistence and transfer costs.

12

Bottom line

The Agents API does not force one compute platform. Its architecture deliberately separates harness from sandbox. That flexibility is valuable, but it also means environment choice becomes part of agent design rather than an implementation detail.

Sources

Primary and supporting sources

Facts were rechecked against the linked sources immediately before publication. Pricing, product availability and rollout status can change.

Project Monet

Useful signals. Clear decisions. Better digital work.

Project Monet turns relevant shifts in AI, creator tools and the web into practical context—and builds focused websites for businesses ready to grow.

Request a free homepage concept