#541: Monty - Python in Rust for AI

#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

Explore listener stats, chart rankings, contacts and more on the Talk Python To Me podcast page.