execute_code
Run code in an isolated sandbox with persistent state across calls, supporting Python, Node.js, and R for interactive development.
Instructions
Executes code in the sandbox. State persists across calls (like Jupyter cells).
Args:
session_id: ID returned by create_session.
code: Code to execute (Python, Node.js, or R, depending on the session runtime).
timeout: Max execution time in seconds (max 300). Defaults to 30.
Returns:
JSON with success, stdout, stderr, result, error, and display_outputs.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| code | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||