> ## 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.runtimes.base

<a id="camel.runtimes.base" />

<a id="camel.runtimes.base.BaseRuntime" />

## BaseRuntime

```python theme={"system"}
class BaseRuntime(ABC):
```

An abstract base class for all CAMEL runtimes.

<a id="camel.runtimes.base.BaseRuntime.__init__" />

### **init**

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

<a id="camel.runtimes.base.BaseRuntime.add" />

### add

```python theme={"system"}
def add(
    self,
    funcs: Union[FunctionTool, List[FunctionTool]],
    *args: Any,
    **kwargs: Any
):
```

Adds a new tool to the runtime.

<a id="camel.runtimes.base.BaseRuntime.reset" />

### reset

```python theme={"system"}
def reset(self, *args: Any, **kwargs: Any):
```

Resets the runtime to its initial state.

<a id="camel.runtimes.base.BaseRuntime.cleanup" />

### cleanup

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

Releases resources (containers, processes, connections, etc.).

Public part of the runtime lifecycle API: callers may call
:meth:`cleanup` or use the runtime as a context manager
(`__INLINE_CODE_1__`) for deterministic teardown. Subclasses must
implement this method.

<a id="camel.runtimes.base.BaseRuntime.stop" />

### stop

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

**Returns:**

BaseRuntime: The current runtime (for chaining).

<a id="camel.runtimes.base.BaseRuntime.__enter__" />

### **enter**

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

Enter the context manager.

<a id="camel.runtimes.base.BaseRuntime.__exit__" />

### **exit**

```python theme={"system"}
def __exit__(
    self,
    exc_type: type[BaseException] | None,
    exc_val: BaseException | None,
    exc_tb: Any | None
):
```

Exit the context manager; ensures cleanup is called.

<a id="camel.runtimes.base.BaseRuntime.get_tools" />

### get\_tools

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

Returns a list of all tools in the runtime.
