Skip to main content
PythonTools enable an Agent to write and run python code.

Example

The following agent will write a python script that creates the fibonacci series, save it to a file, run it and return the result.
cookbook/91_tools/python_tools.py
PythonTools can run arbitrary Python code and install packages with no command restriction. Keep human supervision for untrusted prompts, and run inside a sandbox (container, VM, or Daytona) for untrusted code execution.

Toolkit Params

Toolkit Functions

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