Skip to content

E2B

API Key Required

Sandboxed code execution via E2B cloud. Build AI agents that use E2Bwith Agno Builder's visual drag-and-drop interface — no code required to prototype.

What is the E2B tool?

The E2B tool is a built-in capability in the Agno framework that allows AI agents to sandboxed code execution via e2b cloud. When added to an agent in Agno Builder, the agent can autonomously decide when to invoke this tool based on the user's request.

This tool requires a E2B_API_KEY environment variable. Get your API key at e2b.dev.

How to use E2B in Agno Builder

  1. 1

    Create an agent

    Drag an Agent node onto the canvas in Agno Builder, or use one of the built-in templates.

  2. 2

    Enable E2B

    Click the agent, go to the Tools tab, and toggle on "E2B" from the dev category.

  3. 3

    Add your API key

    Enter your E2B_API_KEY in the tool configuration. Your key stays in your browser and is never stored on our servers.

  4. 4

    Test in chat

    Open the chat panel and send a message. The agent will automatically use E2B when relevant.

  5. 5

    Export Python code

    Click File > Export Python to get clean, runnable code with the correct imports for E2B.

Python code example

This is the code Agno Builder exports when you use E2B:

agent.py
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.e2b import E2BTools

agent = Agent(
    name="E2B Agent",
    model=OpenAIChat(id="gpt-4o"),
    tools=[E2BTools()],
    instructions=["Use the e2b tool to help the user."],
    markdown=True,
)

agent.print_response("Help me with a e2b task")

Install with: pip install agno # + set E2B_API_KEY

Contact Us

Press Ctrl+Enter to send