Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. monty

monty

MITRustv0.0.23

A minimal, secure Python interpreter written in Rust for safely executing AI-generated code with microsecond startup times.

Visit WebsiteGitHubGitHub
8.2k stars413 forks0 contributors

What is monty?

Monty is a minimal, secure Python interpreter written in Rust, designed specifically for safely executing Python code generated by AI agents. It provides a sandboxed environment that blocks all host environment access by default, enabling fast and controlled execution of LLM-produced scripts without the overhead of container-based solutions.

Target Audience

Developers building AI agents or applications that need to securely run Python code generated by large language models (LLMs), particularly those using frameworks like Pydantic AI, Claude's programmatic tool calling, or Cloudflare's Codemode.

Value Proposition

Developers choose Monty for its combination of microsecond startup times, strict security sandboxing, and the ability to snapshot and serialize interpreter state, which are not typically available together in alternatives like Docker, Pyodide, or direct Python execution.

Overview

A minimal, secure Python interpreter written in Rust for use by AI

Use Cases

Best For

  • Securely running Python code generated by AI agents within an application, without using containers.
  • Implementing code-mode or programmatic tool calling features in AI frameworks where LLMs write executable code.
  • Scenarios requiring fast, iterative execution with pause and resume capabilities, such as handling external function calls step-by-step.
  • Applications needing to serialize and persist interpreter state across processes or sessions for durable execution.
  • Environments where resource control (memory, execution time, stack depth) is critical for running untrusted code.
  • Projects that require calling a secure Python interpreter from multiple languages (Rust, Python, JavaScript/TypeScript) without CPython dependencies.

Not Ideal For

  • Projects requiring full Python language features like class definitions or match statements
  • Applications that depend on third-party libraries such as NumPy or Django
  • Use cases needing the entire Python standard library for tasks like web scraping or complex file I/O
  • General-purpose Python development outside the controlled AI agent context

Pros & Cons

Pros

Microsecond Startup

Executes code in under a microsecond, avoiding the hundreds of milliseconds of latency from container-based solutions like Docker, as benchmarked in the README.

Strict Security Sandbox

Blocks all host environment access by default and only allows controlled external function calls, ensuring secure execution of untrusted AI-generated code without container overhead.

Cross-Language Bindings

Can be called from Rust, Python, or JavaScript/TypeScript with no CPython dependencies, making it versatile for embedding in diverse tech stacks.

State Serialization

Supports snapshotting interpreter state to bytes via dump() and load(), enabling durable execution across processes and easy pause/resume functionality for iterative workflows.

Cons

Incomplete Python Support

Lacks support for classes and match statements, and offers only a curated subset of the standard library, making it unsuitable for complex or general Python code.

No Third-Party Libraries

Cannot use external Python packages, as the README explicitly states this is not a goal, limiting its utility to code that only relies on the provided stdlib subset.

Experimental and Unstable

The project is labeled as experimental and not ready for production, indicating potential breaking changes, bugs, or incomplete features that may affect reliability.

Frequently Asked Questions

Quick Stats

Stars8,181
Forks413
Contributors0
Open Issues68
Last commit19 hours ago
CreatedSince 2023

Tags

#sandbox#pydantic#code-execution#sandboxing#python-interpreter#ai-agents#python#type-checking#rust#llm-tools

Built With

J
JavaScript
T
TypeScript
R
Rust
P
Python

Links & Resources

Website

Included in

Rust56.6k
Auto-fetched 9 hours ago

Related Projects

memvidmemvid

Memory layer for AI Agents. Replace complex RAG pipelines with a serverless, single-file memory layer. Give your agents instant retrieval and long-term memory.

Stars16,497
Forks1,418
Last commit1 month ago
BAMLBAML

The programming language for agents

Stars9,150
Forks492
Last commit10 hours ago
entrolyentroly

Cut AI context cost without trusting the compressor. Every reduction is reversible, byte-exact recoverable, and carries an auditable receipt. Local-first, works through proxy, MCP, SDK, or agent wrapper.

Stars443
Forks67
Last commit10 hours ago
Cortex MemoryCortex Memory

🧠 The production-ready cognitive foundation for autonomous systems such as Embodied-AI and OpenClaw. For memory management, from extraction and search to automated optimization, with SKILL, CLI, API, MCP, and insights dashboard out-of-the-box.

Stars307
Forks24
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub