Agno
Give Agno agents an isolated sandbox for code. Agno's official E2BTools toolkit runs the Python your agents write in E2B, not on the machine running Agno.
- Agno
- Built into agno as E2BTools
- agno
- Python
Get started
Paste the prompt into your coding agent, or follow the steps yourself.
Paste this into your coding agent
Add E2B sandboxes to this Agno project.
- 1.Install agno and e2b_code_interpreter using the project's package manager.
- 2.The toolkit needs the E2B_API_KEY environment variable. If it isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode it.
- 3.Follow the Agno guide at https://docs.e2b.dev/agents/agno and give my agents E2BTools with an explicit include_tools allowlist, so the Python they write runs in an E2B sandbox. Call shutdown_sandbox() in a finally block.
- 4.Run the agent once and show me the output that came from the sandbox.
Or set it up yourself
1. Install the dependencies
2. Set your API keys
3. Give the toolkit to an agent
4. Run your agent
What runs in the sandbox
The code your agents write runs in an isolated sandbox, away from the machine running Agno.
- Python and commands the agent runs through E2BTools, executed in an E2B Code Interpreter sandbox.
- include_tools limits which functions the agent can call. Leave out the host file-transfer helpers for untrusted agents.
- One sandbox per E2BTools instance, reused across calls. timeout bounds it; shutdown_sandbox() ends it.
- sandbox_options={"allow_internet_access": False} cuts outbound access when the task doesn't need it.
More agent frameworks
Other frameworks that run their tools on E2B.
