Talk Python To Me

#541: Monty - Python in Rust for AI


Listen Later

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.

Episode sponsors

Talk Python Courses
Python in Production

Links from the show
Guest
Samuel Colvin: github.com

CPython: github.com
IronPython: ironpython.net
Jython: www.jython.org
Pyodide: pyodide.com
monty: github.com
Pydantic AI: pydantic.dev
Python AI conference: pyai.events
bashkit: github.com
just-bash: github.com
Narwhals: narwhals-dev.github.io
Polars: pola.rs
Strands Agents: aws.amazon.com
Subscribe Running Pydantic’s Monty Rust sandboxed Python subset in WebAssembly: simonwillison.net
Rust Python: github.com
Valgrind: valgrind.org
Cod Speed: codspeed.io

Watch this episode on YouTube: youtube.com
Episode #541 deep-dive: talkpython.fm/541
Episode transcripts: talkpython.fm

Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong

---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython

Bluesky: @talkpython.fm
X.com: @talkpython

Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @[email protected]
Michael on X.com: @mkennedy
...more
View all episodesView all episodes
Download on the App Store

Talk Python To MeBy Michael Kennedy

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

579 ratings


More shows like Talk Python To Me

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

288 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

629 Listeners

Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

Super Data Science: ML & AI Podcast with Jon Krohn

305 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

NVIDIA AI Podcast by NVIDIA

NVIDIA AI Podcast

343 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

986 Listeners

Practical AI by Practical AI LLC

Practical AI

209 Listeners

Django Chat by William Vincent and Carlton Gibson

Django Chat

75 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

140 Listeners

Last Week in AI by Skynet Today

Last Week in AI

314 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

551 Listeners

Big Technology Podcast by Alex Kantrowitz

Big Technology Podcast

513 Listeners

Latent Space: The AI Engineer Podcast by Latent.Space

Latent Space: The AI Engineer Podcast

102 Listeners

This Day in AI Podcast by Michael Sharkey, Chris Sharkey

This Day in AI Podcast

228 Listeners

The AI Daily Brief: Artificial Intelligence News and Analysis by Nathaniel Whittemore

The AI Daily Brief: Artificial Intelligence News and Analysis

685 Listeners