> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.interpreters.e2b interpreter

<a id="camel.interpreters.e2b_interpreter" />

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter" />

## E2BInterpreter

```python theme={"system"}
class E2BInterpreter(BaseInterpreter):
```

E2B Code Interpreter implementation.

**Parameters:**

* **require\_confirm** (bool, optional): If True, prompt user before running code strings for security. (default: :obj:`True`) Environment Variables:
* **E2B\_API\_KEY**: The API key for authenticating with the E2B service.
* **E2B\_DOMAIN**: The base URL for the E2B API. If not provided, will use the default E2B endpoint.

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.__init__" />

### **init**

```python theme={"system"}
def __init__(self, require_confirm: bool = True):
```

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.__del__" />

### **del**

```python theme={"system"}
def __del__(self):
```

Destructor for the E2BInterpreter class.

This method ensures that the e2b sandbox is killed when the
interpreter is deleted.

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.run" />

### run

```python theme={"system"}
def run(self, code: str, code_type: str = 'python'):
```

Executes the given code in the e2b sandbox.

**Parameters:**

* **code** (str): The code string to execute.
* **code\_type** (str): The type of code to execute (e.g., 'python', 'bash'). (default: obj:`python`)

**Returns:**

str: The string representation of the output of the executed code.

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.supported_code_types" />

### supported\_code\_types

```python theme={"system"}
def supported_code_types(self):
```

Provides supported code types by the interpreter.

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.update_action_space" />

### update\_action\_space

```python theme={"system"}
def update_action_space(self, action_space: Dict[str, Any]):
```

Updates action space for *python* interpreter

<a id="camel.interpreters.e2b_interpreter.E2BInterpreter.execute_command" />

### execute\_command

```python theme={"system"}
def execute_command(self, command: str):
```

Execute a command can be used to resolve the dependency of the
code.

**Parameters:**

* **command** (str): The command to execute.

**Returns:**

str: The output of the command.
