
#541: Monty - Python in Rust for AI
From Talk Python To Me by Michael Kennedy
March 19, 2026 · 1h 6m · Episode 541
About this episode
This episode features a discussion with Samuel Colvin about Monty, a Python interpreter written in Rust designed for running LLM-generated code efficiently and safely.
When LLMs write code to accomplish a task, that code has to actually run somewhere. And right now, the options aren't great. Spin up a sandboxed container and you're paying a full second of cold start overhead plus the complexity of another service. Let the LLM loose on your actual machine and... well, you'd better be watching. On this episode, I sit down with Samuel Colvin, creator of Pydantic, now at 10 billion downloads, to explore Monty, a Python interpreter written from scratch in Rust, purpose-built to run LLM-generated code. It starts in microseconds, is completely sandboxed by design, and can even serialize its entire state to a database and resume later. We dig into why this deliberately limited interpreter might be exactly what the AI agent era needs.
People in this episode
Host: Michael Kennedy
Guest: Samuel Colvin
Topics covered
- Python
- Rust
- AI
- LLMs
- code execution
- sandboxing
Keywords
- Python interpreter
- Rust
- AI agents
- LLM-generated code
- sandboxed execution
- Pydantic
Mentioned in this episode
Organizations: Pydantic
Products: Monty
Books & works: Talk Python To Me
More episodes of Talk Python To Me
- #551: Stroll Down Startup Lane - 2026 · June 11, 2026 · 1h 49m
- #550: AI Contributions and Maintainer Load in Open Source · May 30, 2026 · 1h 3m
- #549: Great Docs · May 25, 2026 · 1h 7m
- #548: Event Sourcing Design Pattern · May 11, 2026 · 1h 9m
- #547: Parallel Python at Anyscale with Ray · May 6, 2026 · 59 min
- #546: Self hosting apps for Python people · April 27, 2026 · 1h 3m
Explore listener stats, chart rankings, contacts and more on the Talk Python To Me podcast page.