# Sandfort Sandbox: run AI code in isolation

> Run AI-generated or untrusted code in isolated, self-hosted Sandfort sandboxes through the sandfort-mcp tools: create, run code and commands, move files, snapshot, clean up. With safety defaults and a no-server-yet path: local Docker quickstart or the invite-only hosted beta.

Sandfort Sandbox: run AI code in isolation is a free AI agent skill on Agensi by Nenad Mitrovic, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Nenad Mitrovic](https://www.agensi.io/creators/nenad-mitrovic)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-25
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/sandfort-sandbox-run-ai-code-in-isolation
- Tags: llm-ops, security, ai-agents, python, sandboxing, mcp, code-execution, self-hosted

## About this skill

Sandfort is a self-hosted sandbox platform for running AI-generated code: a REST API, Python and TypeScript SDKs, a CLI and a stdio MCP server (`sandfort-mcp`) over isolated Docker-backed sandboxes. This skill teaches your agent when to use a sandbox and how to drive it.

### What it does

- Tells the agent when a sandbox is the right call: code the agent just wrote, untrusted or downloaded scripts, disposable environments, testing without the user's files, credentials or network.
- Documents the 14 `sandfort-mcp` tools with real parameters and defaults: create, run code (Python, JavaScript, TypeScript, Bash), run commands, upload and download files, inspect the filesystem, snapshot, list and delete.
- Safety defaults: pick the isolation tier on purpose (`container`, `gvisor` or `microvm`), start closed on the network with an egress allowlist, never put production secrets in a sandbox, keep the API key out of the conversation, delete sandboxes when done.
- A "No server yet?" branch: a local Docker quickstart from the repository README, or the invite-only hosted evaluation beta. The agent shows commands and lets the user run or approve them; it does not edit configuration files or handle API keys itself.

### What you need

- A reachable Sandfort server (self-hosted on your own Docker host, or the invite-only hosted beta for evaluation) and an API key.
- The MCP server: `uvx sandfort-mcp@0.1.0` (Python 3.12+). Configuration template is in the skill.

### Limits, stated plainly

- Isolation is container-based by default: `container` shares the host kernel, `gvisor` is a user-space kernel, `microvm` (Kata Containers) needs KVM. If your threat model requires microVM isolation in production, Sandfort is not a fit today.
- Pre-1.0 beta (version 0.1.0). Production use is self-hosted; the hosted beta is for evaluation only, with no SLA.
- The MCP tool set is small on purpose; files over 1 MiB are refused in both directions.

### License and source

Skill and `sandfort-mcp` are Apache-2.0 and free. The skill is also on GitHub (`malinele/sandfort-skills`, installable with `npx skills add malinele/sandfort-skills`); the Sandfort server is source-available (FSL-1.1-Apache-2.0) at `github.com/malinele/sandfort`.

## Requires

- Sandfort MCP
- Python
- Sandfort server + API key
- Git

Needs a reachable Sandfort server and an sf_ API key. No server yet? The skill walks you through a local Docker quickstart or requesting hosted beta access.

## Known limitations

Requires Python 3.12+ and a running Sandfort server. 1 MiB file transfer limit. MCP toolset cannot set isolation tiers or egress allowlists; use the SDK for strict security requirements.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Sandfort Sandbox: run AI code in isolation skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill protect my host machine from malicious or buggy AI-generated code?

This skill acts as a secure buffer between an AI agent and your local system, routing all generated code into isolated Docker containers (gVisor-hardened) to prevent accidental data loss or unauthorized system access.

### Which AI agents or platforms are compatible with the sandfort sandbox skill?

The skill is compatible with any AI agent or platform that supports the Model Context Protocol (MCP), including Claude Desktop and other MCP-compliant IDEs and frameworks.

### What are the primary infrastructure requirements to get the sandbox running?

Setup requires a reachable Sandfort API server (self-hosted or beta-hosted) and the installation of the sandfort-mcp server to bridge your agent to the sandbox environment.

### Can I save the state of a sandbox to reuse it for future tasks?

Yes, the 'State Persistence' feature allows you to create snapshots of a sandbox's filesystem, making it easy to reuse complex environments or specific dependency sets across different sessions.

### Are there any specific limitations on file transfers between the agent and the sandbox?

The skill currently supports a maximum file transfer size of 1 MiB for uploads and downloads, which is optimized for scripts, logs, and small data samples.

### What security configurations should I be aware of when deploying this skill?

While the sandbox provides a secure execution layer, users must ensure their Sandfort API endpoint is properly secured and that networking egress allowlists are configured to prevent data exfiltration.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
