← All frameworks
Dashboard

E2B

Sandboxes so agents can run the code they write.

Sandboxes

An agent that writes code eventually has to run it, and running it on your machine is not an option. E2B gives you an isolated cloud sandbox with a filesystem, a Jupyter kernel, volumes that outlive it and network settings you control.

Reach for it when

  • Your agent generates and executes code
  • You need real isolation, not a try except block
  • You want a filesystem and storage the agent can work in

Look elsewhere when

  • Your agent only calls APIs
  • You already run your own sandbox infrastructure

What the lessons will cover

  1. 01Key, first sandbox and run_code
  2. 02Lifecycle, pause, snapshots and forks
  3. 03Files, commands and volumes
  4. 04Code contexts, charts and streaming
  5. 05Network, secrets and the security model
  6. 06Custom templates
  7. 07A code tool and a data analysis agent

Common questions

Is E2B free to use?

E2B is open source and free to run yourself. You still pay whichever model provider you point it at, and this tutorial is free with no signup.

Do I need to know Python to use E2B?

Basic Python is enough. Functions, dictionaries and imports cover most of what E2B asks of you.

When should I not use E2B?

Your agent only calls APIs. You already run your own sandbox infrastructure.

Lessons for E2B are being written. Meanwhile the Agent Governance Toolkit tutorial covers the same ground: state, tools, loops, memory and human approval. Most of it carries straight over.

Start the Agent Governance Toolkit tutorial →