# Monty by Pydantic

15 Hacker News commenters recommended Monty by Pydantic and 3 criticized it, November 2025 to November 2026. It was recommended in 5 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Minimal, secure Python interpreter in Rust for untrusted AI-generated code, with serializable state. Critics note Python semantics gaps and the need for another isolation boundary.

## Why people recommend it

- Serializable VM state, resumable at tool calls (2 comments): "Monty's VM state is fully serializable so I can run the VM until it gets to a tool call and persist the VM state." ([source](https://news.ycombinator.com/item?id=49500854)) "The main property that's really important is that Monty VM state is fully serializable and resumable." ([source](https://news.ycombinator.com/item?id=49500879))
- Good fit for agent runtimes (2 comments): "code_execution tool running a workflow of tools inside a python interpreter (monty)" ([source](https://news.ycombinator.com/item?id=48592182)) "that's a very compelling attribute for an agent runtime" ([source](https://news.ycombinator.com/item?id=49500946))
- Minimal design people like (3 comments): "I like the idea of a minimal implementation like this, though." ([source](https://news.ycombinator.com/item?id=46910769)) "This is a brilliantly conceived chunk of functionality" ([source](https://news.ycombinator.com/item?id=46925003)) "I like the idea of a minimal implementation like this" ([source](https://news.ycombinator.com/item?id=46920058))
- Useful for LLM-generated Python (2 comments): "Monty is the missing link that's made me ship my rust-based RLM implementation" ([source](https://news.ycombinator.com/item?id=46920221)) "For LLM generated Python code, pydantic's monty is awesome" ([source](https://news.ycombinator.com/item?id=49781355))

## What people warn about

- Incomplete Python semantics and subset (2 comments): "The minimal-interpreter approach feels like a good starting point for AI workloads, but the long tail of Python semantics is brutal." ([source](https://news.ycombinator.com/item?id=46920215)) "a cutdown, less-useful version of Python" ([source](https://news.ycombinator.com/item?id=46922984))
- Startup and performance concerns (2 comments): "loading large compiled executables into memory takes long enough to raise an objection to the "startup times measured in single digit microseconds not hundreds of milliseconds" claim" ([source](https://news.ycombinator.com/item?id=46924582)) "every little papercut at the lower levels of abstraction degrades performance at higher levels" ([source](https://news.ycombinator.com/item?id=46923054))

## Alternatives hackers recommend

- [PyPy](https://hackerapproved.com/p/pypy.md): 57 recommend
- [Pyodide](https://hackerapproved.com/p/pyodide.md): 31 recommend
- [MicroPython](https://hackerapproved.com/p/micropython.md): 25 recommend
- [CircuitPython](https://hackerapproved.com/p/circuitpython.md): 12 recommend
- [GraalPy](https://hackerapproved.com/p/graalpy.md): 7 recommend

## Cite as

Hacker Approved, "Monty by Pydantic", https://hackerapproved.com/p/monty/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
