E2b for AI agents

E2B provides sandboxed code execution environments for AI applications, letting agents run code safely in isolated, short-lived sandboxes, used by developers building code-generating AI products. Connect it once through Arc0, and your agent, or Claude, ChatGPT and Cursor, can use it through one MCP endpoint, limited to what each user approved.

Developer toolsAPI keyMCP + RESTe2b.dev
AUDIT LOG · E2BPOLICY: acme-support
09:41:07 · claude · u_8f2read
e2b.list_webhooks
List All Webhooks✓ allowed · 212ms
09:41:08 · claude · u_8f2read
e2b.get_health
Check API Health✓ allowed · 164ms
09:41:09 · claude · u_8f2write
e2b.create_webhook
Create Webhook✓ approved · approved by user
09:41:12 · claude · u_8f2destructive
e2b.delete_webhook
Delete Webhook✕ blocked · policy: deny
EVERY E2B CALL, ON THE RECORD
01 · USE CASES

What agents do in E2b.

01

Run code in a sandbox

Create a sandbox and execute a script to test a piece of generated code before it ships.

02

Check a sandbox's logs

Read a sandbox's logs and metrics to debug why a code run behaved unexpectedly.

03

Confirm before deleting a sandbox

Require approval before deleting a sandbox, since it discards any files or state left inside it.

02 · ACTIONS

27 E2b actions, graded by risk.

Every E2b action is tagged read, write or destructive, so one policy covers the whole app and new actions inherit the right default.

read

15

Look things up. Allowed by default.

  • e2b.get_health
    Check API Health
  • e2b.get_sandbox
    Get Sandbox
  • e2b.get_webhook
    Get Webhook Configuration
  • e2b.list_webhooks
    List All Webhooks
  • e2b.list_sandboxes
    List All Sandboxes
  • e2b.list_templates
    List All Templates
  • e2b.get_teams_metrics
    Get Team Metrics
  • e2b.get_sandboxes_logs
    Get Sandbox Logs
  • e2b.get_sandbox_metrics
    Get Sandbox Metrics
  • e2b.get_templates_files
    Get Template Files
  • e2b.get_teams_metrics_max
    Get Team Maximum Metrics
  • e2b.list_sandboxes_metrics
    List Sandboxes Metrics
  • e2b.get_templates_build_status
    Get Template Build Status
  • e2b.get_sandbox_lifecycle_events
    Get Sandbox Lifecycle Events
  • e2b.list_team_sandbox_lifecycle_events
    List Team Sandbox Lifecycle Events

write

10

Create and change things. Allow, or ask the user first.

  • e2b.create_webhook
    Create Webhook
  • e2b.post_sandboxes
    Create Sandbox
  • e2b.update_webhook
    Update Webhook Configuration
  • e2b.create_template
    Create Template
  • e2b.update_template
    Update Template
  • e2b.post_sandboxes_timeout
    Set Sandbox Timeout
  • e2b.pause_sandbox
    Pause Sandbox
  • e2b.connect_sandbox
    Connect to Sandbox
  • e2b.refresh_sandbox
    Refresh Sandbox
  • e2b.start_template_build
    Start Template Build

destructive

2

Delete, cancel or archive. Ask first, or deny outright.

  • e2b.delete_webhook
    Delete Webhook
  • e2b.delete_sandboxes
    Delete Sandbox
03 · HOW IT WORKS

E2b in three steps.

  1. 01Your users connect E2bThey add their E2b api key on Arc0 Connect, under your brand. It goes straight into the vault.
  2. 02You set the rulesReads run, writes like “create Webhook” can wait for the user, and “delete Webhook” can be denied outright.
  3. 03Any agent can actYour agent calls E2b through the Arc0 SDK or MCP, and so can Claude, ChatGPT and Cursor. Every call lands on the audit log.
POLICY.TS
await arc0.policies.set('e2b', {
  read: 'allow',
  write: 'ask',        // create_webhook
  destructive: 'deny',  // delete_webhook
})

# Claude Code: the same connection, one URL
$ claude mcp add --transport http arc0 \
    https://mcp.arc0.ai/u/u_8f2
04 · AUTH AND DATA

How E2b connects.

Users add their E2b api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.

The same E2b connection serves your agent over MCP and your own backend over REST and the proxy, so a user connects once. How Arc0 handles credentials →

AUTH
API key
CREDENTIALS
Per-tenant encrypted vault
MODEL SEES
Results only, never credentials
AUDIT LOG
Every call, on every plan
05 · WORKS WITH

Use E2b from any agent.

Claude
ChatGPT
Cursor
Codex
VS Code
OpenAI Agents SDK
Claude Agent SDK
Vercel AI SDK
Mastra
LangGraph
07 · FAQ

E2b and Arc0, answered.

Q01

Can I use E2b with Claude, ChatGPT or Cursor?

Yes. Connect E2b to Arc0 once, then add your Arc0 MCP URL to Claude, ChatGPT, Cursor, Claude Code or any other remote-MCP client. Each assistant only gets the E2b actions you allow.

Q02

How do users connect E2b?

Users add their E2b api key on Arc0 Connect. It is encrypted in the vault, never shown to the model, and each user can rotate or revoke it at any time.

Q03

Which E2b actions can my agent take?

27 in total: 15 read, 10 write and 2 destructive, such as “create Webhook”. Your policies decide which of them each agent may call.

Q04

Can I stop my agent from deleting things in E2b?

Yes. Actions like “delete Webhook” are graded destructive. Set destructive actions to deny, or to ask so the user approves each one, and blocked calls still show up on the audit log.

Q05

Can my own backend call E2b too?

Yes. The same E2b connection is available over REST and through the Arc0 proxy, so your product and your agent share one connection per user.

Get started

Plug E2b into your agent.

Your users connect E2b once, under your brand. Your agent gets 27 actions behind your policies, with every call on the record.

Free to build · MCP + REST · Audit log on every plan