Learning resourcesReviewed · E2B

Run Agno agents in an E2B sandbox (E2B documentation guide)

This is a short E2B documentation guide for developers who build Agno Python agents and want the agent's generated code to run in an isolated E2B sandbox instead of on their own machine; the main catch is that it needs E2B and model-provider API keys, and the toolkit's file-transfer helpers can still reach the host machine unless you restrict them. It shows how to install the packages, attach the E2BTools toolkit to an Agno agent, limit the exposed tools with include_tools, switch off sandbox internet access, and shut the sandbox down.

Researched 13 Nov 2026

In short.

This E2B documentation page is a guide for Python developers who build Agno agents and want model-generated code to run in an isolated E2B sandbox rather than on the machine running Agno; the main catch is that it needs E2B and model-provider API keys, and the allowlist only limits which tools the agent can call, not what arguments or host paths it passes. The page shows installing agno, e2b_code_interpreter and openai, creating an E2BTools instance with a timeout, internet access disabled and an include_tools allowlist, passing it to an Agno Agent, and calling shutdown_sandbox() in a finally block. It also warns that the host-side upload_file and download_file_from_sandbox helpers can touch local paths and should not be exposed to an untrusted agent without path controls. Nothing was run for this review. Costs, licence terms, version requirements and publication date are not stated on the page.

Researched and written by an AI model and checked by a second AI model. How it works

The reviewed scope is the complete single page at [https://docs.e2b.dev/agents/agno.md], captured on 13 November 2026. Pages it links to (the Agno E2B toolkit documentation, the Agno cookbook example, the E2B sandbox documentation, the E2B network and internet-access documentation, and the documentation index) are excluded and were not read. No licence file or notice was part of the material, so rights are unknown. Nothing was installed or executed, so no behaviour (sandbox creation, tool calls, network blocking, shutdown, cost) has been tested, and the model id in the example was not checked for availability.

The overview

What this resource is

This is a single documentation page at [https://docs.e2b.dev/agents/agno.md] titled Agno, with the description Run Agno agents with E2B's secure Python sandbox. It explains how to connect Agno, a Python framework for building agents, teams and workflows, to E2B sandboxes through Agno's official E2BTools toolkit.

It is a how-to guide, not a standalone product or library. The toolkit itself belongs to Agno; the page points to the Agno E2B toolkit documentation and an Agno cookbook example for more detail. Those linked pages were not part of the reviewed material.

Overall assessment

The page is compact and specific. It gives a runnable-looking setup, a minimal example, a more permissive allowlist example, lifecycle advice and a clear explanation of what the tool allowlist does and does not protect. The security guidance is its strongest feature: it says an allowlist limits function names but not arguments or paths, and that internet access is a separate setting.

The main gaps are practical. It gives no pricing, no version pins for agno, e2b_code_interpreter or openai, no troubleshooting section, no description of what the sandbox contains, and no publication or update date. Nothing in it was executed for this review, so every behaviour described below comes from the page's own statements.

Who it is for

It suits Python developers who already use, or are considering, Agno and want an agent to run calculations, scripts or file operations without executing model-written code directly on their own machine or server.

It assumes you are comfortable with Python, environment variables and API keys. A beginner can follow the install and example steps, but the security sections (host path exposure, untrusted tool output, network restrictions) assume some familiarity with how agent tool calling can go wrong.

It is not aimed at people who do not use Agno. The page does not cover other agent frameworks.

What it covers and what the toolkit can do

The introduction says E2BTools gives an Agno agent an E2B sandbox for Python execution, file operations, commands and web servers. Later text says that without an explicit allowlist the toolkit can expose tools for code execution, file operations, filesystem access, commands, internet access and sandbox management.

Tool names that appear on the page are run_python_code, list_files, read_file_content, write_file_content, upload_file, download_file_from_sandbox and shutdown_sandbox. The page does not list the complete tool set, so other tools may exist.

The guide covers four topics: installing dependencies, running an agent with a sandbox, choosing an explicit tool allowlist, and sandbox lifecycle. It also describes network control through the sandbox_options setting allow_internet_access.

Using it

Requirements

The page requires a Python environment where you can install three packages: agno, e2b_code_interpreter and openai (the last because the example uses the OpenAI provider). It uses uv pip install, but does not say uv is mandatory.

You need an E2B API key in E2B_API_KEY and a model-provider key; the example sets OPENAI_API_KEY. Using another model provider would presumably need that provider's Agno model class and credentials, but the page does not show this.

Minimum Python version, supported Agno and E2B SDK versions, supported operating systems and account tier requirements are not stated. The example names the model id gpt-5.4-mini; whether that model is available to your account was not verified.

How it works

You create an E2BTools object and pass it in the tools list of an Agno Agent. The agent can then call the toolkit's functions, and Python code and commands run inside the E2B sandbox rather than on the machine running Agno.

An E2BTools instance creates one sandbox when it is initialised and reuses it for later tool calls. The timeout argument bounds the sandbox, shutdown_sandbox() ends it, and include_tools restricts which toolkit functions the agent may call.

The page is explicit about the limits of that isolation. The allowlist restricts function names only, not arguments or paths. upload_file takes a local path on the host, and download_file_from_sandbox can write sandbox content to a local path on the host. The allowlist also does not control outbound network access from sandbox code; that is set with allow_internet_access in sandbox_options, optionally with the network restrictions described on a linked E2B page that was not reviewed.

How E2B implements the sandbox, where it runs, and what resource limits apply are not described on this page.

Setup steps

Step one: install the packages with uv pip install agno e2b_code_interpreter openai. Step two: export E2B_API_KEY and OPENAI_API_KEY in the shell that will run your script. Step three: build E2BTools with a timeout, sandbox_options that disable internet access if you do not need it, and an include_tools list. Step four: create the Agent with a model and the tools, then call print_response with a prompt. Step five: call shutdown_sandbox() when finished.

The page says to keep shutdown_sandbox in the allowlist if the agent should be able to call it, or to call it directly from your application during cleanup. The main agent example calls shutdown_sandbox() directly during application cleanup in a finally block. The separate allowlist snippet does not show cleanup.

How to create an E2B account or key is not covered here. These steps were not run for this review.

Worked example from the page

The main example builds E2BTools with timeout=600, sandbox_options={"allow_internet_access": False} and include_tools=["run_python_code"]. It creates an Agent named Code Execution Sandbox with id e2b-sandbox, the model OpenAIResponses(id="gpt-5.4-mini"), markdown output and two instructions: use the E2B sandbox to run Python for calculations, and verify the result before responding.

It then asks the agent to write Python code that generates the first 10 Fibonacci numbers, and runs e2b_tools.shutdown_sandbox() in a finally block. This is a deliberately small, low-privilege configuration: one tool, no internet, a 600 value timeout. The page does not state the timeout unit, and no sample output is shown.

A second snippet widens the allowlist to run_python_code, list_files, read_file_content and write_file_content, still with internet access disabled. Those file tools operate on the sandbox; the page does not list upload_file or download_file_from_sandbox in that allowlist.

Assessment & evidence

Limitations and risks

The page itself flags the main risks. Without include_tools, the agent may receive a broad set of tools, including commands, internet access and sandbox management. An allowlist does not validate arguments, so an exposed file tool could still be pointed at unexpected paths.

The upload_file and download_file_from_sandbox helpers are the notable host-side exposure: one reads a local path on the machine running Agno, the other can write sandbox content to a local path on that machine. The page says not to expose them to an untrusted agent unless your application enforces an allowlist of host paths or wraps them safely. It also advises treating model-generated code and tool output as untrusted, not exposing host secrets, and validating outputs before passing them to trusted systems.

Network access is separate from the tool allowlist. If you enable internet access, the page recommends applying network restrictions.

Beyond what the page says, not assessed: reliability, performance, sandbox startup time, resource limits, behaviour on timeout, cost, and compatibility with other Agno or E2B versions. The page shows only a Python example with an OpenAI model.

Reasoning behind this assessment

The page was judged useful because it is specific: it names the toolkit, the exact constructor arguments, the environment variables, the lifecycle calls and the particular functions that cross the host boundary. A reader can act on it without guessing.

Its security guidance is practical rather than generic, for example the distinction between limiting tool names and limiting arguments, and the point that network access is controlled separately. That makes the page more than marketing for the integration.

The confidence is limited because it is one vendor-authored page, nothing was executed, and claims about isolation come from E2B's own documentation rather than independent testing.

Alternatives and comparisons

The page makes no comparisons. Its only contrast is between running model-generated code in an E2B sandbox and running it on the machine that hosts Agno.

The selected page names no alternative sandbox products and provides no evidence for comparing them. If you already use another agent framework or a different execution environment, this page offers no migration or equivalence guidance.

Evidence base

The report rests on one captured file: the full text of the E2B documentation page at [https://docs.e2b.dev/agents/agno.md]. All statements about install commands, code, tool names, lifecycle and security warnings come from that page.

No code was executed, no packages were installed, no E2B or model-provider account was used, and no linked pages (Agno toolkit docs, cookbook example, E2B sandbox and network docs) were read. Claims such as isolation strength are the page's own and are unverified.

Access & freshness

Costs

The page states no prices. Whether E2B has a free tier, what a sandbox costs per unit of time or resource, and what an account requires are unknown from this evidence.

The example also depends on a model provider (OpenAI in the example). Model usage charges are likewise not stated and are unknown. Agno's own cost or licensing terms are not covered either.

Because a sandbox is created at initialisation and persists until the timeout or shutdown, leaving it running could accrue usage, but the billing model is not described, so any real cost impact is not assessed.

Rights and licence

The captured page contains no licence statement for the documentation text or the code snippets, and no copyright notice beyond what appears on the page itself. Reuse rights for the snippets are therefore not established by this evidence.

The licences of Agno, the E2B SDK and the E2B service terms are not shown on the page and were not assessed. Anyone adopting the approach should check those terms directly before commercial use.

Freshness

The page was captured on 13 November 2026. It shows no publication or last-updated date, and does not pin versions of agno, e2b_code_interpreter or openai.

Because the example names a specific model id and relies on toolkit function names and parameters that can change between releases, check the current Agno and E2B documentation before depending on the exact code. Whether the page matches the latest toolkit release is unknown.

Suggested next steps

If you plan to use this, start from the minimal example: one tool (run_python_code), internet access disabled, a bounded timeout, and shutdown_sandbox() in a finally block. Add file tools only when the agent needs them.

Do not expose upload_file or download_file_from_sandbox to an agent you do not trust unless your application fixes or validates every host path. Enable sandbox internet access only deliberately, and then apply network restrictions.

Before adopting, confirm pricing, account requirements and licence terms with E2B and Agno, pin package versions, and test the setup yourself, since this review did not run it.

Evidence for this report

selected-page.txtselected · checked 2026-11-13