Sandbox AI agent code execution with E2B and FastClaw
Run every FastClaw agent command in an isolated E2B cloud sandbox — skills and workspace hydrated in, files synced back after each call.
Cloud isolation
exec and file tools run in an E2B microVM instead of on your server, so untrusted chatters never touch the host.
Automatic hydration
The agent's skills and workspace are copied into the sandbox before it runs, with no setup in your prompts.
Post-exec sync
Files the agent creates in the sandbox are mirrored back to the durable store after every tool call.
Custom templates
Point FastClaw at your own E2B template to preinstall the languages and tools your agents need.
What you can do
- Let public chatters on Telegram or Discord use code-running agents safely.
- Offer agents that run code to your own customers — see FastClaw for SaaS builders.
- Prefer to keep execution on your own hardware? Use Docker instead.
Set it up
- Create an API key in your E2B dashboard.
- In FastClaw, open Admin → Tools → Runtime, enable the sandbox, choose E2B (cloud) as the backend and paste the key. Optionally set a template ID.
- Or configure it with environment variables:
FASTCLAW_SANDBOX_ENABLED=true
FASTCLAW_SANDBOX_BACKEND=e2b
FASTCLAW_SANDBOX_IMAGE=your-template-id
Notes
Read how sandboxing fits into the agent loop on the sandbox feature page.
Frequently asked questions
More Integrations
All IntegrationsDocker
Use Docker as FastClaw's sandbox backend to isolate agent commands on your own hardware — or deploy FastClaw itself with Docker Compose.
PostgreSQL
Swap FastClaw's default SQLite file for PostgreSQL to run multiple pods behind a load balancer, with automatic schema migrations.
MCP
Give FastClaw agents external tools through the Model Context Protocol — add http or stdio MCP servers per agent from the console.
Try it on your own agents
Start free in FastClaw Cloud, or self-host the single binary in a minute.