Skip to main content
Declaw is a monorepo of Go services and Python/TypeScript SDKs that together provide secure, isolated code execution for AI agents. The system has three conceptual layers: a client layer (SDKs), a control plane (sandbox-manager, node-collector, guardrails) deployed via Helm, and the execution layer (sandbox microVMs managed by an orchestrator on bare metal).

System diagram

Component breakdown

Control plane (Helm-deployed)

Orchestration (bare metal)

SDKs

Request flow

End-to-end flow for Sandbox.create() followed by sandbox.commands.run():

Monorepo structure

Key design decisions

Docker containers share the host kernel. A container escape exploit gives an attacker access to the host. sandbox microVMs have a hardware isolation boundary — each VM has its own kernel, memory space, and I/O devices. A compromised sandbox cannot escape to the host or to other sandboxes.
Each sandbox gets its own Linux network namespace with a dedicated veth pair and TAP device. Sandboxes cannot see each other’s network traffic, cannot reach each other’s IPs, and cannot intercept host-level network interfaces.
The security proxy runs host-side in each sandbox’s own network namespace, not inside the guest VM. Because it sits outside the guest on the only egress path, the workload can’t see, bypass, or tamper with it — all outbound traffic is forced through it. The per-sandbox CA certificate is generated fresh for each sandbox and injected into the VM trust store at boot.
The base rootfs image is read-only and shared across all sandboxes. Each sandbox gets a writable overlay layer (ext4 image) on top. This makes sandbox creation fast (no full copy) and guarantees filesystem isolation. Destroying a sandbox deletes only the overlay layer.
If the security proxy fails to start or configure iptables, the sandbox creation fails with an error. There is no “log and continue” path — a sandbox without a functioning security proxy is considered unsafe and never reaches the running state.

Architecture sub-pages