Source: Sid Anand's LinkedIn post (2026-11-12) pointing to Pydantic Agent Sandboxes (beta, hosted in Logfire Cloud); context from Pydantic's E2B sandboxes article (2026-10-22).
TL;DR
Most agent code execution runs in a container or microVM per run, sized for the worst case and idle most of the time. Pydantic's Agent Sandboxes take the opposite end: an isolated Python interpreter (Pydantic Monty, an open-source interpreter written in Rust) with tight per-run limits, priced per invocation. The post's point is right-sizing: if your sandboxes sit near 5% CPU running a few lines of code, a VM is the wrong unit.
How it works
Isolation unit: an interpreter session, not an OS. Code runs in a restricted Python subset with no third-party packages, so there is no filesystem, shell or package install to escape through.
Limits: 50 ms of CPU per run and 20 MiB of memory per session; 300 session starts per 5 minutes on lower plans; concurrency 4 on the personal tier and unlimited on team plans.
Cold start: described as milliseconds (an internal benchmark of about 5,300 runs is linked; no single figure given).
Pricing: 50,000 free invocations a month on every plan; Pro at $49 a month plus $0.10 per 1,000 invocations. Self-hosting is planned for enterprise next year.
Where it sits next to VM sandboxes
Pydantic AI also supports a full microVM path (E2B) for agents that need a shell, files or packages. That path routes the agent's shell and file tools into a VM, defaults to a one-hour timeout that pauses rather than kills, leaves cleanup to the application, and can be wrapped in a durable workflow that survives a worker crash (with at-least-once semantics for shell commands). The two options form a ladder: interpreter for computation and data shaping, microVM for anything touching an OS.
Tradeoffs
Capability ceiling: no third-party packages and a Python subset rule out most data-science and integration tasks; the agent must know which tier it is in.
50 ms CPU is very small. Fine for arithmetic, parsing and glue; a loop over a large payload will hit it. Budget errors need to be surfaced to the model as clear tool errors.
Hosted only for now: data passed into the sandbox leaves your environment until self-hosting ships.
Interpreter escapes are a different threat model from VM escapes; the security case rests on the interpreter's restrictions rather than on hardware isolation.
Review checklist
Which agent tool calls need an OS, and which only need computation?
Do sandbox limit errors reach the model as actionable messages?
Is per-run data isolation actually required, and is it achieved per session or per run?
Who cleans up long-lived VM sandboxes, and what happens on timeout?
What data crosses into a hosted sandbox, and is that allowed?
Related
R030 OpenShell: kernel-enforced sandboxes and verified policy for AI agents, the heavyweight end of the same ladder.
R035 Long-horizon agents and durable execution: each external call a logged, idempotent step, which the VM path's crash-recovery example relies on.