Monty
lastmod 2026-02-08created 2026-02-081 edits
A lightweight Python interpreter for safely running AI-generated code
About
- A Rust-based lightweight Python interpreter designed to safely run AI-generated code, removing the complexity and latency of container sandboxes
- Completely blocks access to the file system, environment variables, and network; only external functions specified by the developer can be called
- Offers startup time under 1 microsecond and execution performance similar to CPython, and can be called from Rust, Python, and JavaScript
- Execution state can be snapshotted to bytes and restored, allowing suspend and resume across processes
- Slated to power the Code Mode feature of Pydantic AI, used as the core component for safely running Python code written by LLMs