E2B

E2B

Manage E2B cloud sandboxes for AI agents: list, start, inspect, pause, resume and extend sandboxes, read their logs and CPU, memory and disk metrics, and browse the team's templates, builds and snapshots.

7 giorni gratis · senza carta · hosting UE

Chiedi qualsiasi cosa a E2B

Prova un prompt reale su E2B via AnythingMCP — Claude chiama i tool e risponde. Premi Enter sul tuo messaggio per installare su Cloud.

Installa E2B su Cloud
E2B · live via MCP
Condividi
Opus 4.7

Claude è un'AI e può sbagliare. Verifica sempre le risposte.

Setup in 2 minuti

  1. 1Avvia la trial gratuita su cloud.anythingmcp.com.
  2. 2Clicca E2B nel connector store. Incolla le credenziali quando richiesto.
  3. 3Genera una MCP API key e punta il client AI all'URL MCP generato.
Installa E2B ora

Guide per E2B

Setup passo-passo per i principali client AI.

Configurare E2B

Direttamente dalla definizione del connettore: dove trovare le credenziali, quali permessi servono e con quale API parla questo adapter. Fornite in inglese dall'autore del connettore.

E2B

This connector uses the E2B control-plane API (https://api.e2b.app): it manages the team's cloud sandboxes (small isolated Linux VMs that AI agents use to run code), reads their logs and resource metrics, and lists templates, builds and snapshots.

Paid calls: e2b_create_sandbox starts a sandbox and e2b_resume_sandbox restarts a paused one; a running sandbox is billed per second for its CPU and memory until it times out, is paused or is killed. e2b_set_sandbox_timeout extends that time. Confirm with the user before starting sandboxes or extending them, keep timeout short, and pause or let them expire when done. Reads cost nothing.

Setup (2 minutes)

  1. Sign in at https://e2b.dev/dashboard.
  2. Open Keys (https://e2b.dev/dashboard?tab=keys) and copy a team API key (it starts with e2b_).
  3. Paste it into E2B_API_KEY. It is sent in the X-API-Key header.
  4. Run e2b_list_sandboxes to check it.

Workflow

  • Templates: e2b_list_default_templates shows E2B's ready-made templates (e.g. base, code-interpreter-v1, desktop) with CPU, memory and disk; e2b_list_templates the team's own templates with aliases, build status and spawn counts; e2b_list_template_builds the builds of one template.
  • Start: e2b_create_sandbox with template_id (template id or alias, default base), a timeout in seconds (default 300), optional metadata (string key-value pairs to find it again), env_vars, auto_pause and allow_internet_access. The answer has the sandboxID and domain.
  • Inspect: e2b_list_sandboxes (filter by state running or paused, template, metadata such as user=abc&app=prod, started_after); e2b_get_sandbox for one sandbox's template, resources, start and end time, state and network settings; e2b_get_sandbox_logs for its system and process logs; e2b_get_sandbox_metrics for CPU, memory and disk use over time.
  • Lifecycle: e2b_set_sandbox_timeout sets a new end time counted from now (the plan caps it: 1 hour on Hobby, 24 hours on Pro); e2b_pause_sandbox freezes it with its memory and files (paused sandboxes are not billed for compute); e2b_resume_sandbox resumes a paused sandbox (or just extends a running one); e2b_list_snapshots lists saved snapshots.

Switched off at install: e2b_kill_sandbox; it cannot be undone (the sandbox and its files are gone), so an admin switches it on when the team needs it.

Running code inside a sandbox is not part of this connector. Commands, files and the code interpreter are served by the sandbox itself (its envd agent on https://<port>-<sandboxID>.e2b.app), not by this API: every sandbox has its own host and its own access token, process output is streamed, and the team API key must not be sent into a sandbox where generated code runs. Use the E2B SDKs (e2b, @e2b/code-interpreter) for that, or point the agent at a tool that wraps them.

Reading answers: times are ISO 8601, UTC; metric timestamps and log cursor values are Unix (metrics start and end in seconds, log cursors in milliseconds). cpuCount is vCPUs, memoryMB and diskSizeMB megabytes. The sandbox access tokens are removed from answers.

Paging: e2b_list_sandboxes, e2b_list_templates, e2b_list_template_builds and e2b_list_snapshots return the next page token in _headers.x-next-token (the list itself is under data when the answer is a list); pass it as next_token until it is missing. e2b_list_sandboxes also returns _headers.x-total-running.

Errors: 400 bad parameter (e.g. a timeout over the plan's maximum); 401 invalid key; 403 the team may not use the template; 404 unknown sandbox or template (a sandbox that timed out is gone); 409 the sandbox is already paused or being paused; 429 too many concurrent sandboxes or requests, wait and do not loop; 500 and 503 E2B-side errors.

La tua AI è a due click da E2B.

Installa il connettore, incolla le credenziali, chiedi all'AI. 7 giorni gratis, niente carta.