Agentbox
______ ______ ________ __ __ ________ __
| ββββββ\ ββββββ\ ββββββββ ββ\ | ββ\ββββββββ ββ____ ______ __ __
| ββ__| ββ ββ __\ββ ββ__ | βββ\| ββ | ββ | ββ \ / \| \ / \
| ββ ββ ββ| \ ββ \ | ββββ\ ββ | ββ | βββββββ\ ββββββ\\ββ\/ ββ
| ββββββββ ββ \ββββ βββββ | ββ\ββ ββ | ββ | ββ | ββ ββ | ββ >ββ ββ
| ββ | ββ ββ__| ββ ββ_____| ββ \ββββ | ββ | ββ__/ ββ ββ__/ ββ/ ββββ\
| ββ | ββ\ββ ββ ββ \ ββ \βββ | ββ | ββ ββ\ββ ββ ββ \ββ\
\ββ \ββ \ββββββ \ββββββββ\ββ \ββ \ββ \βββββββ \ββββββ \ββ \ββ
Safe containers for autonomous AI agents
Run Claude, Codex, or Gemini with full auto-approve permissions. They canβt wreck your system because theyβre in a container. They can work while you sleep because giβ¦
Agentbox
______ ______ ________ __ __ ________ __
| ββββββ\ ββββββ\ ββββββββ ββ\ | ββ\ββββββββ ββ____ ______ __ __
| ββ__| ββ ββ __\ββ ββ__ | βββ\| ββ | ββ | ββ \ / \| \ / \
| ββ ββ ββ| \ ββ \ | ββββ\ ββ | ββ | βββββββ\ ββββββ\\ββ\/ ββ
| ββββββββ ββ \ββββ βββββ | ββ\ββ ββ | ββ | ββ | ββ ββ | ββ >ββ ββ
| ββ | ββ ββ__| ββ ββ_____| ββ \ββββ | ββ | ββ__/ ββ ββ__/ ββ/ ββββ\
| ββ | ββ\ββ ββ ββ \ ββ \βββ | ββ | ββ ββ\ββ ββ ββ \ββ\
\ββ \ββ \ββββββ \ββββββββ\ββ \ββ \ββ \βββββββ \ββββββ \ββ \ββ
Safe containers for autonomous AI agents
Run Claude, Codex, or Gemini with full auto-approve permissions. They canβt wreck your system because theyβre in a container. They can work while you sleep because git tracks everything. If something goes wrong, git reset --hard and youβre back to normal.
The Origin Story
I saw Matt Brown on YouTube do something wild: he set up a race between himself and an AI agent to reverse engineer an IoT binary exploit using Ghidra and Binary Ninja. Human vs machine, both working in parallel on the same problem.
I thought: "I want this."
Not just the competition - the workflow itself. An autonomous agent with full access to specialized tools, multiple directories mounted, complete isolation, safe to detach and let work in the background.
The closest thing was Dev Containers, but those are designed for IDE workflows. I wanted something simpler: Docker for isolation, agent CLIs for execution, no editor dependencies. Just give the agent a sandbox, point it at your project, and let it work.
Thatβs Agentbox.
The Problem
AI agents are most useful when autonomous - auto-approve changes, run commands without asking, iterate until done. But nobody gives an agent those permissions on their actual machine. Weβve all heard the stories: an agent runs rm -rf in the wrong directory, corrupts a git repo, installs packages that break your system.
The tension is real:
- Autonomous agents are powerful - Let them work while you sleep, handle tedious tasks, run in parallel
- Autonomous agents are dangerous - Full system access + auto-approve = potential disaster
You can do this manually. Git worktrees for parallel branches. Docker for containers. But the ergonomics are terrible - too many commands to remember, flags are painful on phone keyboards, no unified interface.
The Solution
First, put agents in a jail. A Docker container gives them a full dev environment - git, node, python, everything. But it contains the blast radius. If an agent goes rogue, it can only damage whatβs inside. Your system stays safe.
Second, wrap it all in a simple CLI. No flags. Positional arguments only. Designed for phone keyboards and tired brains. One command to start, one to connect, one to manage.
Quick Start
# Install
git clone git@github.com:scharc/agentbox.git
cd agentbox
bash bin/setup.sh --shell zsh # or bash
# Use it
cd ~/myproject
agentbox init
agentbox superclaude
Thatβs it. Claude starts working with auto-approve enabled. Give it a task, detach (Ctrl+A, D), come back later.
Features
Agent Types
Autonomous agents run with auto-approve - no permission prompts, continuous execution:
agentbox superclaude # Claude with --dangerously-skip-permissions
agentbox supercodex # Codex autonomous
agentbox supergemini # Gemini autonomous
Interactive agents ask permission for each action - good for exploration:
agentbox claude
agentbox codex
agentbox gemini
Shell for manual work:
agentbox shell # Just bash, no AI
Packages and Tools
Add packages the agent can use:
agentbox packages add npm typescript
agentbox packages add pip pytest
agentbox packages add apt ffmpeg
agentbox packages add cargo ripgrep
Changes auto-rebuild the container.
Workspace Mounts
Mount additional directories:
agentbox workspace add ~/other-repo ro reference
agentbox workspace add ~/data rw data
Inside the container:
/workspace- Your project (read-write)/context/reference- Other repo (read-only)/context/data- Data directory (read-write)
MCP Servers
Enable MCP servers for extended capabilities:
agentbox mcp list # See available
agentbox mcp add agentbox-analyst # Enable one
Core MCPs:
- agentctl - Worktree and session management
- agentbox-analyst - Cross-agent review and analysis
Parallel Work with Worktrees
Run multiple agents on different branches simultaneously:
agentbox worktree add feature-auth # Create worktree
agentbox worktree superclaude feature-auth # Run agent there
agentbox worktree list # See all worktrees
Each branch gets its own directory. Agents donβt interfere.
Sessions
Run multiple agents in one container:
agentbox session new superclaude feature # New session
agentbox session list # See sessions
agentbox session attach feature # Jump to one
Quick Menu (Mobile-Friendly)
Single-keypress navigation for phone keyboards:
agentbox q
Shows sessions, worktrees, actions. Press a letter to act. No typing commands.
Desktop Notifications
The daemon bridges container and host:
agentbox service install # Install as systemd service
Get notified when:
- Task completes
- Agent appears stalled
- Something needs attention
Port Forwarding
Expose container ports without restart:
agentbox ports expose 3000 # Container β Host
agentbox ports forward 5432 # Host β Container
Container Networking
Connect to other Docker containers:
agentbox network connect postgres-dev
# Agent can now reach postgres-dev:5432
Automatic Credential Setup
Zero setup required. Agentbox automatically shares your host credentials with the container. Authenticate once on your machine, and every container gets access.
Supported credentials:
- Claude -
~/.claude/.credentials.json(OAuth tokens) - Codex -
~/.codex/auth.json - OpenAI -
~/.config/openai/ - Gemini -
~/.config/gemini/ - Git - Author name/email from environment
How it works:
- Host credential directories are mounted into the container
- Container-init creates symlinks to the expected locations
- OAuth token refresh works both ways (mounts are read-write)
This means:
- No
claude logininside containers - Tokens auto-refresh without breaking
- New containers immediately have access
SSH keys are configurable via .agentbox.yml:
ssh:
mode: keys # Copy keys (default)
# mode: mount # Bind mount ~/.ssh
# mode: config # Config only (use with forward_agent)
# mode: none # No SSH
forward_agent: false # Forward SSH agent socket
Device Passthrough
Give agents access to hardware devices. The interactive chooser shows whatβs available:
agentbox devices # Interactive selection
agentbox devices add /dev/snd # Or add directly
The chooser auto-detects audio devices, GPUs, serial ports, and cameras on your system. Devices that go offline wonβt break the container - theyβre skipped automatically at startup.
Docker Socket Access
Give agent control of Docker (use with caution):
agentbox docker enable
The Mobile Workflow
I use Agentbox as my daily driver. Hereβs what that looks like:
Start an agent on my laptop with a task. Detach. Go get coffee.
From my phone, SSH into my laptop via Tailscale. Run agentbox q to see the quick menu. Check on the agent. Maybe start another one on a different branch.
Get a notification when itβs done. Review from wherever I am.
Multiple agents, multiple branches, all from my phone. The quick menu makes it practical.
How It Works
βββββββββββββββββββββββββββββββββββββββββββ
β YOUR MACHINE (Host) β
β β
β agentbox superclaude β
β agentbox connect β
β agentbox stop β
β β
β agentboxd (daemon) β
β βββ Desktop notifications β
β βββ Stall detection β
β βββ Port forwarding β
βββββββββββββββββββββββββββββββββββββββββββ
β SSH tunnel
βββββββββββββββββββββββββββββββββββββββββββ
β CONTAINER (Agent's World) β
β β
β /workspace (your code) β
β /context/* (extra mounts) β
β β
β Agent working autonomously... β
β βββ Edits files β
β βββ Runs tests β
β βββ Commits changes β
β βββ Notifies when done β
βββββββββββββββββββββββββββββββββββββββββββ
Two isolated worlds. The agent works safely inside. The daemon connects them.
Container Management
agentbox list # Running containers
agentbox list all # Include stopped
agentbox info # Container details
agentbox stop # Stop container
agentbox remove # Delete container
agentbox rebase # Rebuild with new config
Safety
Container isolation: Agents can only access the project directory and explicitly mounted paths. Your system, other projects, and home directory are unreachable.
Git safety net: Every change is tracked. Easy to review (git diff), easy to undo (git reset --hard).
Credential isolation: SSH keys (in keys mode) are copied into the container - changes donβt affect your host. API tokens are synced to support OAuth refresh.
Worst case: Agent corrupts the project? git reset --hard. Container breaks? agentbox remove && agentbox superclaude. Back to normal in seconds.
Prerequisites
- Docker - Container runtime
- Python 3.12+ - For the CLI
- Poetry - Python dependency management
- Agent CLI - At least one: Claude Code, Codex, or Gemini
Documentation
The Story (start here):
- Why Agentbox Exists - The origin story
- Two Worlds - Architecture
- First Steps - Your first agent
- The Dangerous Settings - Agent types
- Parallel Work - Sessions and worktrees
- Work From Anywhere - Mobile workflow
- Day-to-Day - Container management
- All the Options - Configuration
Reference:
- REF-A: CLI Reference - All commands
- REF-B: Daemon - agentboxd
- REF-C: Container CLI - agentctl
- REF-D: Tunnel Protocol - Technical details
- REF-E: Library - MCPs and skills
- REF-F: Agent Collaboration - Peer review workflow
- REF-G: Network Connections - Container networking
- REF-H: Analyst MCP - Cross-agent analysis
For agents working on Agentbox:
Contributing
See CONTRIBUTING.md for guidelines.
Areas that need help:
- Documentation improvements
- Bug reports and fixes
- Testing experimental features
License
MIT
Support
- Issues: https://github.com/scharc/agentbox/issues
- Discussions: https://github.com/scharc/agentbox/discussions