Repository navigation
Sandbox Agents - #2889
Merged
Merged
Sandbox Agents#2889
Conversation
Co-authored-by: Abdulrahman Alfozan <[email protected]> Co-authored-by: Aditya Singh <[email protected]> Co-authored-by: Andi Liu <[email protected]> Co-authored-by: Aron <[email protected]> Co-authored-by: ashwinnathan-openai <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: cploujoux <[email protected]> Co-authored-by: elainegan-openai <[email protected]> Co-authored-by: Elias Freider <[email protected]> Co-authored-by: Erik Dunteman <[email protected]> Co-authored-by: Jason Liu <[email protected]> Co-authored-by: Jason Steving <[email protected]> Co-authored-by: Kazuhiro Sera <[email protected]> Co-authored-by: Lovre Pešut <[email protected]> Co-authored-by: Lucas Wang <[email protected]> Co-authored-by: Matt Brockman <[email protected]> Co-authored-by: Mish Ushakov <[email protected]> Co-authored-by: Naresh <[email protected]> Co-authored-by: nicholasclark-openai <[email protected]> Co-authored-by: qiyaoq-oai <[email protected]> Co-authored-by: Scott Trinh <[email protected]> Co-authored-by: Steve Coffey <[email protected]> Co-authored-by: tode-rl <[email protected]> Co-authored-by: Wendy Jiao <[email protected]>
seratch
approved these changes
Apr 15, 2026
alfozan
self-requested a review
April 15, 2026 17:27
4 tasks done
RudrenduPaul
pushed a commit
to RudrenduPaul/openai-agents-python
that referenced
this pull request
Jun 21, 2026
### Sandbox Agents This release adds **Sandbox Agents**, a beta SDK surface for running agents with a persistent, isolated workspace. Sandbox agents keep the normal `Agent` and `Runner` flow, but add workspace manifests, sandbox-native capabilities, sandbox clients, snapshots, and resume support so agents can work over real files, run commands, edit repositories, generate artifacts, and continue work across runs. Key pieces: - `SandboxAgent`: an `Agent` with sandbox defaults such as `default_manifest`, sandbox instructions, capabilities, and `run_as`. - `Manifest`: a fresh-workspace contract for files, directories, local files, local directories, Git repos, environment, users, groups, and mounts. - `SandboxRunConfig`: per-run sandbox wiring for client creation, live session injection, serialized session resume, manifest overrides, snapshots, and materialization concurrency limits. - Built-in capabilities for shell access, filesystem editing and image inspection, skills, memory, and compaction. - Workspace snapshots and serialized sandbox session state for reconnecting to existing work or seeding a fresh sandbox from saved contents. ### Sandbox clients and hosted providers Sandbox agents now support local, containerized, and hosted execution backends: - `UnixLocalSandboxClient` for fast local development. - `DockerSandboxClient` for container isolation and image parity. - Hosted sandbox clients for Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop, and Vercel through optional extras. The release also adds provider-specific examples and mount strategies for common storage backends, including S3, Cloudflare R2, Google Cloud Storage, Azure Blob Storage, and S3 Files where supported by the selected backend. ### Sandbox memory Adds a sandbox memory capability that lets future sandbox-agent runs learn from prior runs. Memory stores extracted lessons in the sandbox workspace, injects a concise summary into later runs, and uses progressive disclosure so agents can search deeper rollout summaries only when useful. Memory supports: - Read-only or generate-only modes. - Live updates when the agent discovers stale memory. - Multi-turn grouping through `conversation_id`, SDK `Session`, `RunConfig.group_id`, or generated run IDs. - Separate memory layouts for isolating memory across agents or workflows. - S3-backed examples for persisted memory across runs. ### Workspace mounts, snapshots, and resume This release adds a full workspace entry and mount model for sandbox sessions: - Local files and directories. - Synthetic files and directories. - Git repository entries. - Remote storage mounts for S3, R2, GCS, Azure Blob Storage, and S3 Files. - Provider-specific mount strategies across Docker, Modal, Cloudflare, Blaxel, Daytona, E2B, and Runloop. - Portable snapshots with path normalization, symlink preservation, mount-safe snapshotting, and remote snapshot support. - Resume paths through runner-managed `RunState`, explicit `SandboxSessionState`, or saved snapshots. ### Examples and tutorials Adds a large `examples/sandbox/` suite covering: - Local Unix and Docker sandbox runners. - Docker mount smoke tests for S3, GCS, Azure Blob Storage, and S3 Files. - Sandbox coding tasks with skills. - Sandbox agents as tools and handoff patterns. - Memory examples, including multi-agent/multi-turn memory and S3-backed memory. - Tax-prep and healthcare-support workflows. - Dataroom QA and metric extraction tutorials. - Repository code review tutorial. - Vision website clone tutorial. - Provider examples for Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop, Temporal, and Vercel. ### Runtime, tracing, and model plumbing The release includes the runtime plumbing needed to make sandbox agents work naturally inside the existing SDK: - Runner-managed sandbox preparation, capability binding, session lifecycle, state serialization, and resume behavior. - Sandbox-aware `RunState` serialization. - Unified sandbox tracing with SDK spans. - Token usage on tracing spans. - Runner-managed prompt cache key defaults. - OpenAI agent registration and harness ID configuration. - Safer redaction of sensitive MCP tool outputs when sensitive tracing is disabled. - Additional OpenAI client/model utilities and Chat Completions coverage. ## Documentation & Other Changes - docs: add Asqav to external tracing processors list. - docs: update translated document pages. Co-authored-by: Abdulrahman Alfozan <[email protected]> Co-authored-by: Aditya Singh <[email protected]> Co-authored-by: Andi Liu <[email protected]> Co-authored-by: Aron <[email protected]> Co-authored-by: ashwinnathan-openai <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: cploujoux <[email protected]> Co-authored-by: elainegan-openai <[email protected]> Co-authored-by: Elias Freider <[email protected]> Co-authored-by: Erik Dunteman <[email protected]> Co-authored-by: Jason Liu <[email protected]> Co-authored-by: Jason Steving <[email protected]> Co-authored-by: Kazuhiro Sera <[email protected]> Co-authored-by: Lovre Pešut <[email protected]> Co-authored-by: Lucas Wang <[email protected]> Co-authored-by: Matt Brockman <[email protected]> Co-authored-by: Mish Ushakov <[email protected]> Co-authored-by: Naresh <[email protected]> Co-authored-by: nicholasclark-openai <[email protected]> Co-authored-by: qiyaoq-oai <[email protected]> Co-authored-by: Scott Trinh <[email protected]> Co-authored-by: tode-rl <[email protected]> Co-authored-by: Wendy Jiao <[email protected]>
This was referenced Aug 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sandbox Agents
This release adds Sandbox Agents, a beta SDK surface for running agents with a persistent, isolated workspace. Sandbox agents keep the normal
AgentandRunnerflow, but add workspace manifests, sandbox-native capabilities, sandbox clients, snapshots, and resume support so agents can work over real files, run commands, edit repositories, generate artifacts, and continue work across runs.Key pieces:
SandboxAgent: anAgentwith sandbox defaults such asdefault_manifest, sandbox instructions, capabilities, andrun_as.Manifest: a fresh-workspace contract for files, directories, local files, local directories, Git repos, environment, users, groups, and mounts.SandboxRunConfig: per-run sandbox wiring for client creation, live session injection, serialized session resume, manifest overrides, snapshots, and materialization concurrency limits.Sandbox clients and hosted providers
Sandbox agents now support local, containerized, and hosted execution backends:
UnixLocalSandboxClientfor fast local development.DockerSandboxClientfor container isolation and image parity.The release also adds provider-specific examples and mount strategies for common storage backends, including S3, Cloudflare R2, Google Cloud Storage, Azure Blob Storage, and S3 Files where supported by the selected backend.
Sandbox memory
Adds a sandbox memory capability that lets future sandbox-agent runs learn from prior runs. Memory stores extracted lessons in the sandbox workspace, injects a concise summary into later runs, and uses progressive disclosure so agents can search deeper rollout summaries only when useful.
Memory supports:
conversation_id, SDKSession,RunConfig.group_id, or generated run IDs.Workspace mounts, snapshots, and resume
This release adds a full workspace entry and mount model for sandbox sessions:
RunState, explicitSandboxSessionState, or saved snapshots.Examples and tutorials
Adds a large
examples/sandbox/suite covering:Runtime, tracing, and model plumbing
The release includes the runtime plumbing needed to make sandbox agents work naturally inside the existing SDK:
RunStateserialization.Documentation & Other Changes