Sponsor

Monty

Run Python your agent writes without spinning up a container

Monty preview

About

Sub-millisecond Python sandbox for AI-generated code

Monty is an alternative to Docker or hosted sandbox services when an agent needs to run small pieces of Python (the 'code mode' pattern, where the model writes code instead of chaining tool calls). You hand it the code, some inputs and a set of host functions; the sandbox runs a Python 3.14 subset, calls back into your functions when the code uses them, and returns the output. Resource limits and snapshots are built in. It ships as a Python package, an npm package and a Rust crate, and it powers Code Mode in Pydantic AI. OSS Monty is MIT licensed; Full Monty is a commercial server version that runs the same sandbox behind a WebSocket. About 8.7k GitHub stars. Repo: https://github.com/pydantic/monty.

Features

  • Under 1 ms sandbox start from a warm pool
  • No filesystem, env vars or network inside the sandbox
  • Host functions and mounts are the only way out
  • Resource limits and snapshots
  • Python, JavaScript/TypeScript and Rust bindings
  • Powers Code Mode in Pydantic AI

Install

Related skills

All skills
All articles

More Coding

View all

Sourcery MCP

Let your coding agent request Sourcery reviews and fix the comments and security findings itself

Worktrunk

Git worktree CLI built for running several coding agents in parallel

DBHub

Token efficient database MCP server for Postgres, MySQL, SQL Server, Oracle and SQLite