box README

README проекта с github.com/strands-agents/box. Одним файлом markdown: README.md.

Strands

Strands Box

Run coding agents like Claude Code in a sandbox, under a policy you control.

Commit Activity Open Issues Open PRs Discord

Overview

With box, you run a coding agent such as Claude Code, Codex, Kiro CLI, or pi in a box on your own machine. The agent can work in your project and reach whatever you allow. Your other files, your keys, and services that listen only on localhost stay out of its reach. You use the agent the way you always do, with its permission prompts off if you like.

Underneath box is Box Core, an engine you can also use on its own. box itself is in preview, and it works on Apple silicon Macs with macOS 15 or later and on Linux ARM64 and x86-64.

Install

brew install --cask strands-agents/tap/box

Or with the installer:

curl -fsSL https://raw.githubusercontent.com/strands-agents/box/main/install.sh | sh

Then open a new terminal and run box --version to check that it worked. For the Linux requirements, upgrading, and uninstalling, see Install Box.

Run your first agent

You set up each agent once, in a profile, and then start it from any of your projects. For Claude Code on Amazon Bedrock, install Claude Code with its native installer, then create the profile:

box profile create claude --with bedrock

Press Enter to take each default, then choose Save profile and Exit. You'll need to connect to Bedrock, and choose a model if Claude Code doesn't already name one, before the first run. Then start Claude Code from the folder you want it to work in:

cd ~/src/my-app
box run claude

For the full walkthrough, see Get started.

How Box works

The agent runs in an OS sandbox inside the box. Its requests go to Box, which checks each one against your policy before it reaches files, commands, the network, or MCP tools. Denied requests stop there.

The agent runs in an operating system sandbox, so its own reads and writes stay within the files you grant it. Box checks each shell command, network request, and MCP tool call against your policy before it happens, and it does that outside the model, where nothing the agent reads can change the answer.

You write policies in Dogwood, or start from one that comes with box. A rule can even depend on what the agent already did, such as a limit of 60 calls to a server in an hour.

Your keys stay outside the box, too. When the agent calls its model or another service you've set up, it only sees a placeholder, and Box puts in the real key as the request leaves.

To see how it all fits together, read How Box works.

Learn more

Box Core

Box Core is the engine under box. You can run it yourself, on your own machine or a cloud host, or embed it in a Rust application. Instead of a profile, you describe each box in box.toml and its policy in policy.dw. To download Box Core into ./box-core:

curl -fsSL https://raw.githubusercontent.com/strands-agents/box/main/download.sh | sh
./box-core/box --version

Start with Run an agent with box.toml. After that, you'll find the box.toml reference, the policy guides, and cloud deployments in the Box Core guide, and finished setups you can run in the examples. To embed Box Core in your own application, see Use Box as a Rust library.

Build from source

To build box yourself, you need rustup and just:

git clone https://github.com/strands-agents/box.git
cd box
just build-cli

You'll find box and the Box Core programs it runs in target/debug. For the tests and the other builds, see CONTRIBUTING.md.

Reporting a problem

If something goes wrong, open an issue with the command you ran, what you expected, what happened instead, and the output of box --version. If you think you've found a security problem, read SECURITY.md first.

License

Apache License 2.0.

box (strands-agents/box)

Ищем в базе…

557 ·GitHub
Что это?Box — песочница с открытым кодом для запуска ИИ-агентов, ограничивающая то, что они могут исполнять, читать, писать и куда могут обращаться по сети: она сочетает изоляцию на уровне ОС с движком политик (Dogwood) и инъекцией учётных данных, так что секреты никогда не доходят до агента.
Это библиотека для импорта или песочница, внутри которой запускается мой агент?Box — самостоятельный движок песочницы, а не библиотека: вы настраиваете доступы уровня ОС в box.toml и семантические правила в policy.dw, затем запускаете выбранную программу-агента через собственные интерпретаторы Box (Strands Shell, Monty для Python) и шлюзы.
Как запустить Box?Следуйте руководству по началу работы: запустите скрипт скачивания, который проверяет контрольную сумму релиза и распаковывает бинарники в ./box-core (или соберите из исходников с Cargo), затем напишите box.toml и policy.dw и запустите бинарник box.
Что нужно перед прохождением руководства по началу работы?Нужен Mac на Apple silicon с macOS 15 или новее, Node.js 22.21+ установленный через Homebrew, и доступ к Claude Opus 5 на Amazon Bedrock в регионе us-west-2.
Готов ли Box к продакшену на любой машине?Нет — это превью-релиз, который сейчас поддерживает только локальное выполнение на macOS с Apple silicon; поддержка Linux запланирована, но ещё не вышла.
Видит ли агент когда-либо API-ключи, которыми пользуется?Нет — egress-шлюз сам аутентифицирует разрешённые исходящие запросы, используя настроенные API-учётные данные или подпись AWS SigV4, а процесс агента никогда не получает самих секретов.
Что такое Dogwood?Dogwood — язык политик, который использует Box, построенный на правилах permit и forbid; каждая проверяемая операция по умолчанию запрещена, если её не разрешает правило permit, а совпадающее правило forbid всегда перевешивает это разрешение.
Что такое Strands Shell и Monty?Это встроенные интерпретаторы Box для shell-команд и Python-кода соответственно; оба пропускают каждую выполняемую операцию через движок политик Dogwood перед исполнением.
Может ли политика заблокировать последующее действие из-за уже случившегося?Да — интерпретаторы и шлюзы Box делят общую историю событий, поэтому правило может, например, запретить более поздний исходящий HTTP-запрос из-за более раннего чтения файла.
Что делает MCP-брокер?Он сверяет настроенные вызовы MCP-инструментов и их аргументы с политикой Dogwood, прежде чем пропустить вызов инструмента к MCP-серверу — так же, как egress-шлюз проверяет сетевые запросы.
Какие есть похожие проекты?brig, agent-governance-toolkit, harness-sdk, cynative, nono, mantis, Agentic-Bug-Hunter, deltabox-lite
Автор
strands-agents
Размер
15.5 MB
Звёзды
557
Возраст
1 мес
Коммиты · 90 дней