Skip to main content

Code Interpreter

Let agents write and execute code (JavaScript, Python, TypeScript) in a subprocess. Essential for data analysis, math, and automation agents.

Quick Start


Config

('javascript' | 'python' | 'typescript')[]
default:"['javascript', 'python']"
Allowed languages for code execution.
number
default:"30000"
Execution timeout in milliseconds.
number
default:"10000"
Max output characters to return. Long output is truncated.
string
Working directory for script execution. Defaults to os.tmpdir().

Tools


Language Runtimes

Code is executed in a subprocess with no sandboxing beyond the OS-level process boundary. Always set timeout and maxOutput to prevent runaway execution.

Example: Data Analysis