/box

Contain your AI agent

Run Claude Code, Codex or Kiro CLI in a sandbox you control.

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

macOS 15+ (Apple silicon)Linux ARM64 + x86-64

/box

Strands Box is an open source sandbox for agents. Start your agent with one command, give it the access it needs, and keep the rest of your computer and data out of reach.

Once Box and Claude Code are installed:

box run claude

The first run creates a profile and asks for its settings.

Set up Box for Claude Code
Example boundaryConfigured by you

Your profile and policy determine how Box handles each request.

  • Read project filesAllowed
  • Read private filesBlocked
  • Connect to GitHubCredential protected
  • Connect to an unknown siteBlocked

Access

Choose what it can access

Give the agent the project files and programs it needs. Keep everything else out of reach.

/profile.toml

TOML

          
          packs = ["box/claude", "box/bedrock", "box/git"]
        
          
          policies = ["policy.dw"]
        
          
          
        
          
          [options]
        
          
          claude.host = "bedrock"
        
          
          bedrock.region = "us-east-1"
        
          
          claude.import-mcp = "false"
        
          
          claude.import-hooks = "false"
        
Set up access

Policy

Set limits on what it can do

Allow or block commands, file changes, network requests, and tool calls while it runs.

/policy.dw

Policy

          
          @id("no_env")
        
          
          @description("Block shell-mediated reads of .env files.")
        
          
          forbid (principal, action == Box::Action::"fs:read", resource)
        
          
          when { context.input.path like "*/.env" };
        
          
          
        
          
          @id("docs_connect")
        
          
          permit (principal, action == Box::Action::"net:connect", resource)
        
          
          when { context.input.host == "docs.example.com" && context.input.port == 443 };
        
          
          
        
          
          @id("docs_request")
        
          
          permit (principal, action == Box::Action::"http:request", resource)
        
          
          when { context.input.host == "docs.example.com" };
        
Set up rules

Credentials

Keep credentials private

Let the agent call approved services without seeing the real API keys or tokens.

/profile.toml

TOML

          
          [egress.github]
        
          
          destinations = ["api.github.com"]
        
          
          secret.ref = "env://GITHUB_TOKEN"
        
Protect credentials