Sandbox Filesystem
Quick Start
from glaip_sdk import Agent
from glaip_sdk.models.filesystem import SandboxConfig
agent = Agent(
name="secure-runner",
instruction="Execute code safely in an isolated environment.",
filesystem=SandboxConfig(), # Uses defaults
)
result = agent.run("""
Create a Python script that calculates factorial,
run it with the execute tool, and save the result to /workspace/output.txt
""")When to Use Sandbox
Use Case
Why Sandbox?
Configuration
Parameters
Prerequisites
Local Execution
Remote Execution
Examples
Run Code Safely
File Operations Only
Long-Running Tasks
How It Works
Limitations
Troubleshooting
"ModuleNotFoundError: Sandbox filesystem backend requires..."
"E2B_API_KEY not set" or tests skipped
"base_dir must not contain parent directory traversal"
Comparison with Local Disk
Aspect
Local Disk
Sandbox
Related Documentation
Last updated
Was this helpful?