Quick Start
How It Works
| Component | Location | Purpose |
|---|---|---|
| Agent Loop | Local | LLM calls, decision making, memory |
| Tool Execution | Local or Sandbox | Code execution, file operations |
| Memory & State | Local | Session persistence, context |
Configuration Options
SandboxedAgentConfig Reference
Full configuration options for sandboxed agents
Essential Configuration
| Option | Type | Default | Description |
|---|---|---|---|
model | str | "gpt-4o" | LLM model to use |
system | str | "You are a helpful coding assistant." | System prompt |
tools | List[str] | ["execute_command", "read_file", "write_file", "list_files", "search_web"] | Available tools |
packages | Dict[str, List[str]] | None | Package dependencies |
networking | Dict[str, Any] | {"type": "unrestricted"} | Network access rules |
host_packages_ok | bool | False | Allow host package installation |
Common Patterns
Secure Development Environment
Local Development (No Sandbox)
Multi-Provider Flexibility
Best Practices
Security Considerations
Security Considerations
Always use sandboxing when running untrusted code or installing packages:
Performance Optimization
Performance Optimization
- Use local execution for trusted environments and faster iteration
- Use sandbox for production or when handling user-generated code
- Consider model choice:
gpt-4o-minifor speed,claude-sonnet-4-6for complex tasks
Backward Compatibility
Backward Compatibility
LocalManagedAgent and SandboxedAgent are the same class:Tool Sandboxing vs Managed Runtime
Tool Sandboxing vs Managed Runtime
- SandboxedAgent: Agent loop stays local, only tools may be sandboxed
- Managed Runtime: Entire agent loop runs remotely (see Managed Runtime Protocol)
Related
Managed Runtime Protocol
Remote agent runtime for full managed execution
Managed Agents
Core concepts for managed agent backends

