Developers building agent-based systems often need to run untrusted code safely, with the ability to capture state, retry failed tasks, and control resource usage. Brickie, released by Hatchet, targets this use case by providing open-source, durable sandboxes that run directly in your own AWS (EKS) or Kubernetes cluster.
Unlike typical sandboxing approaches that rely on persistent volumes or are tied to specific cloud providers, Brickie layers snapshotting and retry logic onto the agent-sandbox controller. This means you can capture the state of a containerised workspace after every change and restore or fork it later, all within your own infrastructure.
How Brickie manages sandboxes and state
Each session in Brickie is a container with both a shell and a workspace, spun up inside your Kubernetes cluster. You can choose from multiple runtime options including Kata, gVisor, and AWS Nitro. One standout feature is that every time files in the workspace are changed, Brickie creates an immutable snapshot and stores it in object storage—any S3-compatible service, as well as GCS and Azure are supported.
Snapshots are not just for backup: they can be used to fork new sandboxes or resume prior sessions. This enables workflows where agent state needs to be preserved, branched, or replayed without risk of running a task twice.
Reliable retries and observable execution with Hatchet
In Brickie, every sandbox operation is treated as a Hatchet task. The documentation notes: Hatchet's durable execution guarantees mean no wasted compute on retries of successful sandbox operations. If a task fails and is retried, Brickie will check for an existing snapshot and avoid repeating the same command, ensuring idempotency and saving resources.
Because Brickie keeps a warm pool of pods ready, cold start times are kept low even as sandboxes are spun up and down. This is a clear improvement over agent-sandbox’s default behaviour, where state is persisted per sandbox and cold starts are common. The snapshot approach is not limited to a specific platform, and the same workflow can run locally on Docker for development.




