DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to embed Box in a Rust application as a library with Box

Call strands_box::run from your own Rust host process to start a sandboxed workload.

Short answer: Clone the repository with git clone https://github.com/strands-agents/box.git; then run cargo build --release -p strands-box -p strands-box-containment from the cloned folder; add the strands-box package from crates/box as a dependency of your Rust application. All steps.

Who it is forA Rust developer building a host application that must launch an AI agent inside a Box sandbox.

The problemA host app needs to start an agent under Box enforcement without shelling out to a separate CLI and losing control of the process.

The outcomeYour application runs one Box workload in its own process and receives the exit code when the run finishes.

What you need first

  • A Mac with Apple silicon running macOS 15 or later
  • Node.js 22.21 or later from Homebrew, if you follow the getting-started guide
  • Access to Claude Opus 5 on Amazon Bedrock in us-west-2, if you follow the getting-started guide
  • A Rust toolchain via rustup, only if you build from source

Steps

  1. Clone the repository with git clone https://github.com/strands-agents/box.git
  2. Run cargo build --release -p strands-box -p strands-box-containment from the cloned folder.
  3. Add the strands-box package from crates/box as a dependency of your Rust application. (inferred, check the README)
  4. Call strands_box::run("/absolute/box.toml".into(), Vec::new()) before starting application threads or loading secrets.
  5. Ship the matching Box helper binaries beside your host application.

Prompt for your agent

Using the strands-agents/box repository, link the strands-box package in crates/box into a Rust host app and call strands_box::run with an absolute path to <box.toml>. Expected output: the function returns an exit code after the agent finishes. Verify that a second run call in the same process fails.

Caveat. The README says only one Box workload per host process is supported and later run calls fail even after a first failure, so design the host around a single call.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for strands-agents/box and "Embed Box in a Rust application as a library"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer