api_key | Optional[str] | None | Superserve API key. If not provided, uses the SUPERSERVE_API_KEY env var |
base_url | Optional[str] | None | Override the control-plane base URL. If not provided, uses the SUPERSERVE_BASE_URL env var or the SDK default |
sandbox_id | Optional[str] | None | Connect to an existing sandbox instead of creating a new one |
template | Optional[str] | None | Template to create the sandbox from. Defaults to superserve/code-interpreter |
timeout | int | 300 | Sandbox lifetime in seconds before it is auto-stopped |
auto_delete_seconds | Optional[int] | None | Hard TTL in seconds after which the sandbox is deleted even if never shut down explicitly |
command_timeout | int | 60 | Per-command timeout in seconds |
output_directory | Optional[str] | None | Host directory that download_directory writes into. Defaults to the current working directory |
metadata | Optional[Dict[str, str]] | None | Metadata to attach to created sandboxes |
env_vars | Optional[Dict[str, str]] | None | Environment variables to set in created sandboxes |
secrets | Optional[Dict[str, str]] | None | Team secrets to bind as {ENV_VAR: secret_name}. The sandbox sees a proxy token; the real credential never enters the sandbox |
persistent | bool | True | Persist the sandbox ID in the agent’s session state so the same sandbox is reused across runs |
enable_run_python_code | bool | True | Enables the run_python_code tool |
enable_run_command | bool | True | Enables the run_command tool |
enable_create_file | bool | True | Enables the create_file tool |
enable_read_file | bool | True | Enables the read_file tool |
enable_list_files | bool | True | Enables the list_files tool |
enable_delete_file | bool | True | Enables the delete_file tool |
enable_download_directory | bool | True | Enables the download_directory tool |
enable_get_sandbox_info | bool | True | Enables the get_sandbox_info tool |
enable_list_sandboxes | bool | True | Enables the list_sandboxes tool |
enable_shutdown_sandbox | bool | True | Enables the shutdown_sandbox tool |
enable_shutdown_sandbox_by_id | bool | True | Enables the shutdown_sandbox_by_id tool |
enable_get_preview_url | bool | True | Enables the get_preview_url tool |
enable_pause_sandbox | bool | False | Enables the pause_sandbox tool |
enable_resume_sandbox | bool | False | Enables the resume_sandbox tool |
enable_attach_secret | bool | False | Enables the attach_secret tool |
enable_detach_secret | bool | False | Enables the detach_secret tool |
all | bool | False | Enables all tools, overriding the individual enable_* flags |
instructions | Optional[str] | None | Custom instructions for using the Superserve tools |
add_instructions | bool | False | Whether to add the instructions to the agent’s system message |