sandbox
Enterprise AI Agent Sandbox
A security framework for plugging sandboxed execution into agentic AI workflows. Drop the connector into any folder where Claude Code, Codex, Cursor, or other AI agents run — all privileged commands are escalated to a human approver, executed outside the agent's context, and the output is fed back to the model so it can continue.
Архитектура
Хуки Claude Code перехватывают вызовы инструментов, передают привилегированные операции человеку-одобрителю и возвращают захваченный вывод внутри решения
deny, чтобы инструмент никогда не выполнялся с привилегиями агента.MCP-сервер (
run_privileged,check_request,sandbox_status) обеспечивает тот же цикл через Model Context Protocol — работает с Claude Code, Codex, Cursor, Windsurf.Очередь папок (
.sandbox/escalations/) — это шина: атомарные файловые операции (os.replace,os.rename) координируют одобрение между четырьмя независимыми процессами (подпроцесс хука, MCP-сервер, терминал одобрителя, панель управления).Механизм политик классифицирует команды оболочки, записи файлов, сетевые запросы и чтения — четыре триггера эскалации с человеком в цикле как высшим уровнем.
Related MCP server: Approval Gate
Быстрый старт
# Install the connector
python -m pip install -e ".[dev]"
# Initialize a folder
sandbox init . --claude --mcp
# In one terminal: watch for escalations
sandbox watch .
# In another: use Claude Code or the MCP tools as normal
# Privileged commands will appear in the `watch` terminal for approvalКак это работает
Агент пытается выполнить команду — хук PreToolUse от Claude Code перехватывает её.
Хук классифицирует и эскалирует — команды оболочки, не входящие в белый список, попадают в очередь папок.
Человек одобряет в
sandbox watch— одобритель выполняет команду вне агента.Вывод возвращается модели — обёрнут в
permissionDecision:"deny"с stdout в строке причины.Агент продолжает — он получил результат, но сам никогда не имел привилегий.
Канал MCP работает аналогично: run_privileged возвращает результат инструмента с захваченным выводом.
Вехи
✅ Веха 0 — Основы (исправление ошибок, ограничение путей, восстановление аудита)
✅ Веха 1 — Цикл (хук PreToolUse, очередь папок, одобрение через CLI)
✅ Веха 2 — Канал MCP (run_privileged, check_request, sandbox_status)
✅ Веха 3 — Запись папки (восстанавливаемые оригиналы, цепочка аудита, PostToolUse)
✅ Веха 4 — Другие триггеры (полный классификатор, запомненные решения, контекст SessionStart)
✅ Веха 5 — Поверхности (REST-маршруты, удаление, документация)
Все вехи завершены. См. docs/CONNECTOR.md для полного технического описания.
Тестирование
# Run all tests (117 passing)
python -m pytest -q
# Test the loop with a real hook subprocess and background approver
python -m pytest tests/integration/test_connector_loop.py -v
# Test the MCP channel
python -m pytest tests/integration/test_mcp_tools.py -vСтруктура проекта
src/sandbox/
├── connector/ # Folder connector (queue, hooks, policy, MCP)
├── launcher/ # M1 jailed launcher (job objects, jail, shims)
├── audit/ # Chained audit log with tamper detection
├── broker/ # Non-AI privilege executor
├── fs/ # Path containment and validation
├── agents/ # Multi-agent sandbox orchestrator
├── api/ # FastAPI routes and WebSocket
└── ...Ключевые проектные решения
Папка — это шина: Атомарные файловые операции на NTFS координируют четыре независимых процесса (без состояния в памяти, без открытых портов, переживает перезапуски)
denyпереносит вывод: Инструмент никогда не выполняется в агенте; вывод вставляется обратно в строку причиныОдобрение через CLI в первую очередь: Без графического интерфейса, работает через SSH, без зависимости от браузера
Отказ по умолчанию: Внутренние ошибки блокируют, а не молча разрешают
Неудаляемая самозащита:
.sandbox/**в запретах на запись и\.sandboxв запретах оболочки повторно внедряются при каждой загрузке политики — агент не может удалить свои собственные ограничения
Лицензия
[Будет определено]
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceHuman-in-the-Loop authorization gateway for AI Agents. Securely pause MCP workflows and route high-risk actions to human approvers via Slack or Email.1171MIT
- AlicenseNot gradedqualityCmaintenanceProvides a human approval gate for AI agents, enabling interactive inline cards for approving, editing, or rejecting actions before they are executed.MIT
- AlicenseNot gradedqualityCmaintenancePauses AI agent execution and routes approval requests to humans via Slack or email, with cryptographically signed proof of the human's decision.197MIT
- AlicenseAqualityCmaintenanceEnables AI agents to securely use real secrets (API keys, database passwords) by requiring human approval for each release, ensuring secrets never enter the model's context.2Apache 2.0
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Human-in-the-loop for AI coding agents — ask questions, get approvals via Slack.
Human-in-the-loop for AI agents. Submit choices, get a human decision.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Boredem125/architecture-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server