monty

Execute Python code in a secure sandbox without filesystem or network access.

6|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/zhouzhuojie/monty-skill --skill monty
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: monty
Source: https://github.com/zhouzhuojie/monty-skill/tree/main
Command: npx skills add https://github.com/zhouzhuojie/monty-skill --skill monty

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Execute Python code in a secure sandbox to prevent filesystem and network access.

Core Features & Use Cases

  • Safe sandboxed execution of Python code with no direct access to the host filesystem or network.
  • External functions support via a user-provided functions.py to extend the sandbox capabilities.
  • Integration with uv run for controlled, isolated code execution and testing.

Quick Start

Run a Python snippet in a sandbox to ensure isolation from the host filesystem and network.

Frequently Asked Questions about monty

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute Python code in a secure sandbox to prevent filesystem and network access?

You can safely run Python in a secure sandbox by executing code via uv run with a restricted builtin set, which prevents ordinary filesystem and network access. This isolation is ideal for evaluating LLM-generated snippets and running automated checks.

Can I extend the sandboxed Python environment with custom external functions?

Yes, you can extend the sandboxed Python environment by loading external safe functions from a user-supplied functions.py file. This allows you to safely expand the sandbox's capabilities without compromising the isolation of the host filesystem or network.

Does this sandbox code execution tool require uv run to isolate LLM-generated snippets?

Yes, this tool integrates with uv run to achieve controlled, isolated execution of Python code. This integration provides safety guarantees by restricting builtins and preventing unauthorized network or filesystem access during snippet evaluation.

What are the limitations of using a restricted builtin set for Python code execution?

Using a restricted builtin set limits access to standard library functions that interact with the host environment. To restore specific capabilities while maintaining safe isolation, you must supply external safe functions via a functions.py file.

When do I need a secure sandbox for running Python code?

You need a secure sandbox for running Python code in scenarios requiring safety guarantees, such as evaluating LLM-generated snippets, teaching environments, and automated checks. It prevents unauthorized filesystem and network access during isolated execution.