pydantic/monty
A secure Python sandbox, written in Rust, for code written by AI.
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
5 releases in the last 90 days, the latest today, with 71 contributors on GitHub.
Peaked at #5 in the weekly ranking the week of Feb 8, its best in the past year.
Use Cases & Benefits
- Implements a minimal, secure Python interpreter in Rust designed to safely run AI-generated Python code with controlled host interaction.
- Offers microsecond startup latency and strict sandboxing without container overhead, enabling fast, secure execution of limited Python code.
- Use for embedding safe Python code execution within AI agents to run dynamically generated scripts without risking host environment access.
- Use for iterative execution and snapshotting of Python code state to pause, resume, or cache interpreter sessions across processes or time.
- Use for integrating with Rust, Python, or JavaScript applications requiring fast, resource-limited Python code evaluation with external function control.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
MIT
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
Watch-outs
No watch-outs from GStars' checks.
General guidance from repository metadata, not legal advice. How we score
From the README
A minimal, secure Python interpreter written in Rust for use by AI.
Experimental - This project is still in development, and not ready for the prime time.
A minimal, secure Python interpreter written in Rust for use by AI.
Monty avoids the cost, latency, complexity and general faff of using a full container based sandbox for running LLM generated code.
Instead, it lets you safely run Python code written by an LLM embedded in your agent, with startup times measured in single digit microseconds not hundreds of milliseconds.
In short, Monty is extremely limited and designed for one use case:
To run code written by agents.
For motivation on why you might want to do this, see:
In very simple terms, the idea of all the above is that LLMs can work faster, cheaper and more reliably if they're asked to write Python (or Javascript) code, instead of relying on traditional tool calling. Monty makes that possible without the complexity of a sandbox or risk of running code directly on the host.
Note: Monty will (soon) be used to implement
codemodein Pydantic AIMonty can be called from Python, JavaScript/TypeScript or Rust.
(Or
pip install pydantic-montyfor the boomers)
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
+788 stars over 83 days across 23 snapshot days; best day +55 on Sep 26.
Forks
487+83
Open issues
212+97
Compared with peers in Backend
Fastest-growing repositories GStars tracks in this cohort for the week of Nov 8, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| anthropics/skills | 192.3K | +5.2K | 75 | — |
| zed-industries/zed | 94.7K | +2.3K | 75 | 6 days ago |
| google/skills | 23.8K | +2.0K | 75 | — |
| NationalSecurityAgency/ghidra | 99.4K | +1.8K | 75 | 19 days ago |
| DuarteSantos8/openGym | 20.8K | +1.7K | 75 | 7 days ago |
| pydantic/monty | 8.8K | — | 35 | today |
| Category median | 94.7K | +2.0K | 75 | — |
Also by pydantic
Other repositories from this maintainer that GStars tracks
Discover Repositories
Search across tracked repositories by name or description