R061 · Infrastructure for agents at scale › Agent session hosting and control planes

Pydantic Agent Sandboxes: an interpreter, not a VM, for agent code

Read the original

sandboxingagent-harnessdev-infra

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

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

Review checklist

Connections

See R061 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.