↩ BLOG
/
Updates

E2B is now supported in the OpenAI Agents SDK

Building long-horizon agents just got easier.
Matt Brockman
AI Engineer
Share
JS/TS
PYTHON

We're happy to announce that E2B is a sandbox provider in the new OpenAI Agents SDK

With this release, agents built with the OpenAI Agents SDK will get their own sandboxes featuring a custom environment with resource isolation, security boundaries, and persistence, requiring no infrastructure setup. Your agents will be able to:

  • Edit files and run shell commands in isolated environments
  • Maintain temporary workspace state across steps
  • Generate frontend output with live preview URLs
  • Produce artifacts you can review before publishing
  • Run multiple sandboxes in parallel for concurrent workloads

Integration takes just a few lines of code

You can set up computer use with just a few lines of code. You just need to define your tools, the agent to use them, and something to get started.

See it in action

In the demo below, we walk through the full workflow of creating a landing page:

  1. Set up a sandbox session with the E2B SDK and define a builder agent with file-editing capabilities.
  2. Generate a landing page from scratch: the agent writes HTML/CSS, deploys into the sandbox, and serves it at a preview URL.
  3. Iterate with diffs: instead of rewriting everything, the agent applies patches for faster turnaround.
  4. Compare variants side by side: each variant lives at its own URL, making visual comparison straightforward.
  5. Parallelize: spin up multiple sandboxes simultaneously, each running an independent agent, to generate several variants at once.

The result: multiple landing page variants, each pre-viewable at its own URL, generated in parallel with minimal code.


Sample applications and use cases for the OpenAI Agent SDK

Browse examples in the E2B Cookbook.

  • Computer use
  • Webpage building
  • Parallelize data science tasks for grid searches and more
  • Parallelize code review

Get started

You'll need an E2B account and an OpenAI API account. Check out the repos:

Note: Sandboxing is currently supported in the Python Agents SDK. Stay tuned for TypeScript support.

Follow @e2b on X to see live updates.
/
We're hiring! Check open positions on the Careers page.
/
Hundreds of millions of sandboxes launched.
/
We're always Excited 2 Build.
/