AIAny
AI Agent2023
Icon for item

Monty

Runs LLM-generated Python in a Rust sandbox that starts in tens of microseconds (~60µs), with no container overhead. Filesystem, network, and environment access are blocked, and state serializes for pause/resume with per-run resource limits.

Introduction

Every AI agent that runs code hits the same wall: the sandbox costs more than the code itself. Spinning up a Docker container runs ~195ms and Pyodide ~2800ms, so for the short snippets a model emits, isolation dwarfs the actual work. Monty's bet is to make the sandbox disposable — a Python interpreter rewritten in Rust that boots in tens of microseconds (~60µs), cheap enough to spin up fresh for every single tool call.

What Sets It Apart
  • Startup in microseconds, not milliseconds. Around 60µs versus ~195ms for Docker and ~1s for hosted sandbox services, so an agent can hand each snippet a clean interpreter without paying a latency tax per call.
  • Security by omission, not by patching. Filesystem, network, and environment access simply don't exist inside the interpreter; the host grants capabilities only through explicit external function calls, so there's no escape surface to keep hardening.
  • Pause and resume mid-run. dump() and load() serialize interpreter state, letting an agent suspend execution, return control to the model, and continue later — natural for tool-calling loops and long-lived sessions.
  • Resource accounting is built in. Memory, allocation count, stack depth, and wall-clock time are tracked per run, so a runaway snippet hits a ceiling instead of the host.
Who It's For

Great fit if you're building agent frameworks or LLM tooling that executes many small, untrusted Python snippets and want predictable isolation without container orchestration; it embeds from Rust, Python, and JavaScript/TypeScript. Look elsewhere if you need to run real programs: Monty covers a subset only — no class definitions yet, no third-party packages, no match statements, and a stdlib trimmed to the likes of sys, os, typing, asyncio, re, datetime, and json.

Information

  • Websitegithub.com
  • AuthorsPydantic
  • Published date2023/05/28

More Items

GitHub
AI Client2026

Operate DeepSeek Harness from an interactive terminal with streaming replies, tool cards, session controls and live context metrics. Also offers experimental Claude and Codex backends behind the same interface.

GitHub
AI Agent2026

Shows what fills a DeepSeek Harness agent's context and how it changes per request. Browse prompts, tools and messages, trace compaction, and inspect token usage, estimated costs and parent/subagent relationships.

GitHub
AI Coding2026

Adds file editing, Git views, task monitoring and side chats to DeepSeek Harness. An extensible sidebar and split bottom workbench keep files, terminals and agent activity beside the conversation.