E2b

Spawns secure sandboxed environments to run untrusted code, monitors resource usage in real time, and manages the full lifecycle of code interpreting containers.

Try E2b in Ceven

Ask Ceven anything
Standard

Why use Ceven?

  1. AI native E2b integration

    • Describe the outcome and Ceven picks the right E2b calls, fills the parameters, and checks the result.
    • Structured, agent friendly tool schemas so each call runs reliably instead of by guesswork.
    • Rich coverage for reading, writing, and querying your E2b data, across all 27 of its actions.
  2. Managed auth

    • Built in OAuth with automatic token refresh and rotation.
    • One place to manage, scope, and revoke E2b access.
    • Per user and per environment credentials instead of shared keys.
  3. Agent optimized design

    • Actions are tuned from real success and error rates so reliability climbs over time.
    • Full execution logs so you always know what ran in E2b, when, and on whose behalf.
    • The agent pauses and asks when E2b is unclear instead of plowing ahead.
  4. Enterprise grade security

    • Fine grained access so you control which agents and people can reach E2b.
    • Least privilege by default, read scopes first and only the writes a workflow needs.
    • A full audit trail of every E2b action to support review and sign off.

Supported tools

Every action Ceven's agents can run on E2b, and when to use it.

Create Sandbox
Use this when you need to launch a fresh isolated environment from a template for code execution or testing.
Pause Sandbox
Use this to suspend a running sandbox while preserving its filesystem and memory state for later use.
Delete Sandbox
Use this to permanently terminate a sandbox instance that is no longer needed to free up resources.
Get Sandbox Logs
Pull the console output and system logs from a specific sandbox to debug execution errors.
Get Sandbox Metrics
Retrieve timestamped CPU and memory usage for a specific sandbox to monitor performance.
List All Sandboxes
Pull a list of all active and paused sandboxes associated with your team.
Start Template Build
Initiate an asynchronous build for a new E2b template with a specific configuration.
Get Template Build Status
Check if a template build has completed or is still in progress.
List All Templates
Retrieve all available templates for your team to identify the right environment for a task.
Create Webhook
Register a webhook to receive real time notifications for sandbox lifecycle events.
Set Sandbox Timeout
Extend or reduce the lifetime of a sandbox to prevent premature termination.
Connect to Sandbox
Reconnect to an existing sandbox to resume work or retrieve its current details.
Create Template
Tool to create a new E2B template with specified configuration. Use when you need to define a new sandbox template that can be used to spawn sandbox environments.
Delete Webhook
Tool to unregister a webhook and stop receiving lifecycle events. Use when you need to remove a webhook that is no longer needed or to clean up webhook registrations.
Check API Health
Tool to check the health status of the E2B API. Use when you need to verify that the API service is operational and accessible.
Get Sandbox
Tool to retrieve detailed information about a specific sandbox by its ID. Use when you need to check sandbox status, metadata, or configuration details.
Get Sandbox Lifecycle Events
Tool to retrieve the latest lifecycle events for a particular sandbox instance. Use when you need to track state changes including creation, pausing, resuming, updates, and termination of a sandbox.
Get Team Metrics
Tool to retrieve timestamped CPU, memory, and disk usage metrics for a team. Use when you need to monitor aggregated resource usage across all sandboxes belonging to a team.
Get Team Maximum Metrics
Tool to retrieve the maximum value for a specific team metric in a given interval. Use when you need to check team limits or peak usage, such as maximum concurrent sandboxes allowed or highest resource usage.
Get Template Files
Tool to get an upload link for a tar file containing build layer files. Use when you need to retrieve or download template build layer files by their hash.
Get Webhook Configuration
Tool to retrieve the current webhook configuration for a specific webhook. Use when you need to inspect webhook settings, verify configuration, or check webhook status.
List Sandboxes Metrics
Tool to retrieve timestamped CPU, memory, and disk usage metrics for multiple sandboxes. Use when you need to monitor resource usage across multiple sandboxes simultaneously. Metrics are collected every 5 seconds; returns empty array if no
List Team Sandbox Lifecycle Events
Tool to retrieve the latest lifecycle events across all sandboxes associated with the team. Use when you need to monitor sandbox activity, track lifecycle changes, or audit sandbox operations.
List All Webhooks
Tool to retrieve all registered webhooks for your team. Use when you need to view all webhook configurations, audit webhook settings, or manage multiple webhooks.
Refresh Sandbox
Tool to refresh an E2B sandbox and extend its time to live. Use when you need to keep a sandbox alive longer and prevent it from timing out.
Update Template
Tool to update an E2B template configuration. Use when you need to modify template settings such as changing visibility (public/private status).
Update Webhook Configuration
Tool to update an existing webhook configuration including URL, enabled status, and subscribed events. Use when you need to modify webhook settings, change the destination URL, enable/disable a webhook, or update event subscriptions.

27 actions · scroll to see them all

Frequently asked questions

Ceven uses E2b to ensure that every piece of code generated by the AI runs in a fully isolated micro virtual machine. This means the code has no access to your local machine or your internal network. Each sandbox is created with its own dedicated filesystem and network stack. When the task is finished, Ceven can delete the sandbox entirely, which wipes all data and processes. This prevents cross contamination between different tasks and ensures that even if the AI writes a malicious script, the impact is limited to a disposable container that exists only for a few minutes.
By default, E2B sandboxes have a limited time to live to prevent resource leaks. You can use the Set Sandbox Timeout action to extend the lifetime, but there are hard limits based on your plan. For longer persistence, the best practice is to use the Pause Sandbox feature. This saves the memory and disk state to a persistent store. When you reconnect, E2B restores the environment exactly where it left off. This allows you to maintain a complex development environment across multiple user sessions without paying for a constantly running instance.
If a sandbox exceeds its allocated memory, the operating system inside the sandbox will trigger an out of memory killer, which usually terminates the heaviest process. Ceven can detect this by calling Get Sandbox Metrics or checking the logs. If you see frequent crashes, you should create a new template with higher resource specifications. Be aware that memory limits are strictly enforced at the hypervisor level, so your code will be killed instantly without a graceful shutdown if it hits the absolute ceiling of the allocated plan.
You can use the Create Template and Start Template Build actions to define a custom environment. In your template configuration, you specify the base image and any setup scripts, such as pip install commands or apt get packages. Once the build is complete, any sandbox spawned from that template starts with all your libraries pre installed. This is much faster than installing dependencies every time a sandbox starts, as the agent can simply launch a pre baked image and start executing your code in seconds.
Yes, E2B imposes rate limits on how quickly you can create and delete sandboxes to prevent API abuse. If your workflow attempts to spawn dozens of sandboxes per second, you will receive a 429 too many requests error. This is a common quirk when building loops that create a new sandbox for every single small calculation. To avoid this, we recommend reusing a single sandbox for a sequence of related tasks or implementing a queue in your Ceven workflow to stagger the creation of new environments.
Ceven interacts with the sandbox filesystem through the E2B API. The agent can write files to the sandbox, execute scripts that read those files, and then pull the resulting output or logs back into the conversation. Because the sandbox is a real Linux environment, you can use standard shell commands to move files or compress directories into a tar file before downloading them. The agent manages these file transfers automatically so you only see the final result of the code execution in your chat interface.
Stopping or deleting a sandbox is a permanent action that destroys the environment and all unsaved data. Pausing is a state preservation feature. When you pause a sandbox, E2B snapshots the current state of the RAM and the disk. This allows the agent to stop paying for active compute while keeping the workspace intact. When you call the Connect action again, the sandbox is resumed from that snapshot. This is critical for workflows that involve human in the loop feedback where the agent must wait for your approval before continuing.
While Python is the most common use case for AI code interpretation, E2B supports any language that can run in a Linux container. You can build custom templates for Node js, Rust, Go, or even C plus plus. By defining the environment in your template build, you tell E2B which compilers and runtimes to include. Ceven can then send code in any of these languages to the sandbox and execute it using the appropriate system command, making it a universal execution layer for any programming language your agent needs.

Alternatives to E2b

Other tools that solve a similar problem. Ceven supports these too, so you can switch or run more than one at once.

Piston logoPistonReplit logoReplitFly io logoFly io

Try Ceven on your stack

Plug Ceven on top of the tools you already run. Connect E2b and the rest of your stack, describe the outcome, and its agents handle the work end to end, days of it in minutes.

Get started for free