Skip to main content

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.

BaseRuntime

class BaseRuntime(ABC):
An abstract base class for all CAMEL runtimes.

init

def __init__(self):

add

def add(
    self,
    funcs: Union[FunctionTool, List[FunctionTool]],
    *args: Any,
    **kwargs: Any
):
Adds a new tool to the runtime.

reset

def reset(self, *args: Any, **kwargs: Any):
Resets the runtime to its initial state.

cleanup

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.

stop

def stop(self):
Returns: BaseRuntime: The current runtime (for chaining).

enter

def __enter__(self):
Enter the context manager.

exit

def __exit__(
    self,
    exc_type: type[BaseException] | None,
    exc_val: BaseException | None,
    exc_tb: Any | None
):
Exit the context manager; ensures cleanup is called.

get_tools

def get_tools(self):
Returns a list of all tools in the runtime.