Skip to main content
E2BTools enable an Agent to execute code in a secure sandboxed environment with support for Python, file operations, and web server capabilities.

Prerequisites

The E2B tools require the e2b_code_interpreter Python package and an E2B API key.

Example

The following example demonstrates how to create an agent that can run Python code in a secure sandbox:
cookbook/14_tools/e2b_tools.py

Toolkit Params

Toolkit Functions

Code Execution

File Operations

Filesystem Operations

Command Execution

Internet Access

Sandbox Management

You can use include_tools or exclude_tools to modify the list of tools the agent has access to. Learn more about selecting tools.

Developer Resources