50KB+ per query
Context fills up fast. Costs skyrocket.
Code Mode for AI agents. Process data locally, return only what matters.
¹WASM binary size. ²Measured on Ryzen 9 9900X, browser WASM instantiation.
See it in action
Try the sandbox now
Run shell commands, JavaScript, and explore the virtual filesystem—all in your browser.
~13MB download • Cached for future visits
External calls are captured. Replay produces exactly identical results.
Audit decisions, debug issues, prove compliance—weeks after the fact.
Anthropic reduced internal tool definitions from 150K→2K tokens (98.7%) with code execution.
50KB+ per query
Context fills up fast. Costs skyrocket.
~100 bytes in context
Process data locally. Return only what matters.
Store results, process locally, return only what matters.
grep, cut, sort, jq. Pipes, redirects, heredocs just work.
Constrain parameters, limit calls, enforce patterns.
Coroutine protocol. Step, yield, fully reproducible.
No VMs. No containers. No cloud dependencies.
One command. Works in CI, notebooks, and production. No infrastructure to provision.
WASM runs in your process. No cloud API calls. Scale to millions at CPU cost only.
Every tool call logged with timestamps. Deterministic replay for debugging.
Define what agents can do. Every tool call is validated.
sandbox = Sandbox(
capabilities=[
MethodCapability(
method_pattern="stripe/charges/*",
constraints=[
Param("amount").lte(10000), # 10000 cents = $100 max
Param("currency").is_in(["USD", "EUR"]),
],
max_calls=100,
),
],
)No isolation, full code injection risk
No isolation, full host access
Remote API, 200–500ms cold start
Heavy infra, 1–10s cold start, ops overhead
| Feature | amla-sandbox | eval() | Local Shell | E2B | Docker/VM |
|---|---|---|---|---|---|
| Setup | pip install | Built-in | Built-in | Remote API | Self-hosted |
| Isolation | WASM sandbox | None | None | Firecracker VM | Container/VM |
| Cold start | <10ms | 0ms | 0ms | 200–500ms¹ | 1–10s² |
| Code injection risk | Sandboxed | Full access | Full access | Sandboxed | Sandboxed |
| Authorization | Capability tokens | None | None | None | Allowlists |
| Deterministic replay | Yes | No | No | No | No |
¹E2B docs. ²Typical container cold start.
Other sandboxes focus on isolation. amla adds authorization, deterministic replay, and context budget control—managing what agents can do and see, not just where they run.
A 13MB statically-linked binary containing a WebAssembly runtime, virtual filesystem, and capability interpreter. Ships with no external dependencies.
Every external API call is intercepted and validated against the capability chain. Reads and writes go to a copy-on-write overlay. The agent never touches the real filesystem.
The WASM runtime is constrained so all external effects flow through host-mediated calls under full control. We record inputs (API responses, file reads, timestamps) in a compact binary format. Replay substitutes these values exactly, making execution deterministic.
When an agent delegates to a sub-agent, it can only grant a subset of its own capabilities. The sandbox enforces this at the API boundary—no configuration required.
13MB binary. Zero infrastructure. Runs anywhere Python runs.
pip install amla-sandbox Soon