📈 GH Trending Explorer 🎲 Surprise me

← all repos

pydantic / monty

git clone https://github.com/pydantic/monty.git v1.3.0 · 2d ago 🔥 on GitHub Trending today

A Rust-based Python 3.14 sandbox for executing untrusted, LLM-generated code without containers.

Why you might care

Runs code with no filesystem, environment, or network access, exposing only the functions and mounts the host passes in. Sandbox creation from a pool is reported under 1ms, versus about 1500ms for container-based sandbox services, and it is MIT licensed with Python, JavaScript, and Rust bindings.

Categories

Alternatives

DockerPyodideWASIE2B
+11
stars, 24h · #3,192
+~42
stars, 7 days · #4,731
+530
stars, 30 days · #1,554
8.8k
★ total · +0% this week
471
forks · 193 open issues

Star history (as recorded here)

2026-10-20 · 8,742 ★ 2026-10-23 · 8,760 ★
LanguageRust
LicenseMIT
Created2023-05-28 (3y ago)
Last push1d ago
Watchers43
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-23 — #18 monthly in rust · +530 ★
  • 2026-10-22 — #19 monthly in rust · +525 ★

GitHub topics

Links

README excerpt
Monty 
 A secure Python sandbox, written in Rust, for code written by AI. 
______________________________________________________________________
Monty avoids the latency, complexity and cost of a container based sandbox for running LLM generated code.
It comes in two forms: **OSS Monty**, the MIT licensed Python 3.14 sandbox you install as a package, and
**Full Monty**, the commercial server that runs the same sandbox behind a WebSocket as a service.
A new OSS Monty sandbox takes under **1ms** from a running pool (Full Monty: about **2ms**)
compared to around **1500ms** for a sandbox service.
Filesystem, environment variables and network do not exist inside the sandbox: it reaches the host only through the
functions and mounts you pass in.
**Documentation: pydantic.dev/docs/monty**
## Install
 [code] 
The commercial Full Monty runs the same workers as a container
image.
## Example
The `code` string is what a model writes when asked how long a bar of chocolate could power a lightbulb:
 [code] 
`nutrition` ran on the host and the sandbox saw only its return value.
## Documentation
- Introduction with the latency measurements
- Comparison to alternatives: Docker, Pyodide, WASI,
 sandboxing services
- Getting started with Python,
 JavaScript or
 Rust
- Security model, resource
 limits,
 snapshots, the Python
 subset
- `docs/`: the source of the documentation site
Monty runs Code Mode in Pydantic
AI.
Community bindings: gomonty (Go) and
dart_monty (Dart / Flutter).
## Part of the Pydantic Stack
The Pydantic Stack is everything you need to ship production-grade AI agents:
- Pydantic AI - Type-safe
 agent framework
- Pydantic Logfire - AI-first,
 full-stack observability
- Logfire AI Gateway - Unified
 LLM proxy

Blurb generated by claude-haiku-5-5 today. Star deltas marked ~ are extrapolated from partial history.