pydanticpydanticOfficialยท8 Agent Skills Included

monty

Run AI-generated Python code safely in a fast Rust sandbox

Runs untrusted Python code written by AI agents inside a secure Rust-based sandbox. Blocks filesystem, network, and environment access while enforcing memory, time, and stack limits. Starts in microseconds instead of slow containers, and works from Python, JavaScript, or Rust. Supports snapshots, type checking, and controlled host function calls for safe agent workflows.
npx skills add pydantic/monty --all -g -y
Available:

Gives the AI agent the project architecture, strict sandbox security rules, and cross-platform constraints it must follow when writing or reviewing code in this repository.

All Skills in This Repository (8)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install Monty?โ–ผ

Run `npx skills add pydantic/monty --all -g -y` in your terminal to install all skills in this suite globally.

What is Monty used for?โ–ผ

Monty is a minimal Python interpreter written in Rust that safely runs code generated by AI agents. It replaces slow container sandboxes with microsecond startup times.

Is Monty safe for untrusted AI-generated code?โ–ผ

Yes. Monty blocks filesystem, network, and environment access by default, enforces memory and time limits, and runs code in isolated worker processes so crashes cannot harm your application.

Can I use Monty from Python or JavaScript?โ–ผ

Yes. Monty ships as the pydantic-monty package for Python, the @pydantic/monty package for JavaScript and TypeScript, and as Rust crates.

Does Monty support the full Python language?โ–ผ

No. Monty supports a practical subset of Python 3.14, including async code and common standard library modules, but not third-party packages, class inheritance, or match statements.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’