Code Interpreter — Usage Guide
Architecture Overview
SandboxCodeInterpreter
├── BaseLMInvoker ← language model (generates code)
└── BaseSandbox ← executes code
├── E2BSandbox
├── BedrockAgentCoreSandbox
└── PydanticExecutorSandboxInstallation
# E2B sandbox
pip install "gllm-tools[e2b]"
# AWS Bedrock sandbox
pip install "gllm-tools[bedrock]"
# Pydantic MCP sandbox (requires deno in PATH)
pip install "gllm-tools[pydantic-mcp]"Common Imports
Using SandboxCodeInterpreter (High-Level)
Passing Files
Downloading Output Files
Using Sandboxes Directly (Low-Level)
ExecutionResult Reference
Field
Type
Description
Checking Results
Sandbox Comparison
Feature
E2B
Bedrock AgentCore
Pydantic MCP
Error Handling
Always Terminate
Last updated
Was this helpful?