Monty - Python in Rust for AI - Talk Python to Me Ep. 541
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. ▬▬▬▬ About the podcast ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ This video is the uncut, live recording of the Talk Python To Me podcast ( https://talkpython.fm ). We cover Python-focused topics every week and publish the edited and polished version in audio form. Subscribe in your podcast player of choice (100% free) at https://talkpython.fm/subscribe. ▬▬▬▬ Guests ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Samuel Colvin ▬▬▬▬ Links and resources from the show ▬▬▬▬▬▬▬▬▬▬▬▬ CPython: https://github.com/python/cpython IronPython: https://ironpython.net Jython: https://www.jython.org Pyodide: https://pyodide.org monty: https://github.com/pydantic/monty Pydantic AI: https://pydantic.dev/pydantic-ai Python AI conference: https://pyai.events bashkit: https://github.com/everruns/bashkit just-bash: https://github.com/vercel-labs/just-bash Narwhals: https://narwhals-dev.github.io/narwhals/ Polars: https://pola.rs Strands Agents: https://aws.amazon.com/blogs/opensource/introducing-strands-agents-an-open-source-ai-agents-sdk/ Subscribe Running Pydantic’s Monty Rust sandboxed Python subset in WebAssembly: https://simonwillison.net/2026/Feb/6/pydantic-monty/ Rust Python: https://github.com/RustPython/RustPython Valgrind: https://valgrind.org Cod Speed: https://codspeed.io ▬▬▬▬ Dive deeper ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Listen to the Talk Python To Me podcast at https://talkpython.fm and explore over 275 hours of Python courses at https://training.talkpython.fm/courses. ▬▬▬▬ Follow us on Social ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ Mastodon: Michael - https://fosstodon.org/@mkennedy & Talk Python - https://fosstodon.org/@talkpython Bluesky: Michael - https://bsky.app/profile/mkennedy.codes & Talk Python - https://bsky.app/profile/talkpython.fm X: Michael - https://x.com/mkennedy & Talk Python - https://x.com/talkpython