Open your browser. Pick up your AI coding work.
Run Claude Code and Codex CLI on your own server.
Chat, terminal, files, and code review share one persistent workspace.
English | 简体中文
Screenshots · Quick start · Documentation · Deployment and operations · Report an issue
From a task to code you can review. Chat, terminal, files, and Git in one workspace.
| What you want to do | How agentbox helps |
|---|---|
| Resume coding anywhere | Connect to persistent workspaces from your browser; code, home configuration, and chat history stay on your server |
| Use familiar agents | Switch between streaming Web chat and the original Claude Code or Codex CLI terminal |
| Take a task through delivery | Upload a project → assign a task → preview files → review Git diffs → commit or download |
| Reuse environments and resources | Per-user /shared directories, two layers of home templates, Claude skill management, and per-user MCP management with workspace overrides |
| Manage accounts and costs centrally | OAuth / API key / relay account pools, per-user access, usage details, pricing catalog updates, historical price snapshots, and a credit ledger |
| Reach your private network | Optional abox-link gives cloud agents access to allowlisted repositories, databases, and services; check the connection status and details from the chat bar |
The server is a single Go binary with an embedded frontend, using SQLite for state and Docker to isolate workspaces, with systemd deployment and backup tools included.
These are browser screenshots of the current source UI, using synthetic projects, conversations, terminal output, and usage data. They contain no real accounts or business records and do not represent live model results. Released versions may differ from the current source. Click an image to enlarge it. The app interface is currently in Chinese.
Light theme and mobile UI
Choose system, light, or dark themes. Narrow screens use drawer navigation, and touch terminals include a shortcut key bar.
See the development guide for instructions to reproduce these screenshots.
| Entry point | Best for | What to install |
|---|---|---|
| Browser chat | Assign coding tasks, view streaming results, and manage multiple conversations | Users only need a browser; an administrator deploys the server first |
| Browser terminal | Use the original CLI, run commands, and install project dependencies | CLIs and common tools are included in the workspace image |
| abox-link local panel | Let cloud workspaces access private services reachable from your computer | Run abox-link on your computer |
| abox-link command line | Configure allowlists and port mappings on a headless machine | Use the same abox-link binary with --server |
| HTTP / WebSocket API | Integrate scripts, manage workspaces, and read usage records | Use the Bearer token obtained after login |
abox-link is optional. You do not need to install it for regular browser use.
flowchart LR
B[Browser] -->|HTTPS / WebSocket| S[agentbox server]
S -->|Docker API| W["Workspace container<br/>Claude Code / Codex CLI"]
S --> D[(SQLite and chat history)]
F["Persistent directories<br/>workspace / home / shared"] --- W
W --> P[Model service / account egress proxy]
W -. Private network on demand .-> S
S -. WSS tunnel .-> L[Local abox-link]
L --> N[Allowlisted services]
Each workspace has a container and a set of persistent directories. A workspace can have multiple chat threads, but only one Web chat turn runs at a time. Each user's shared directory is mounted at /shared in all of their workspaces.
The console supports page deep links, light and dark themes, and mobile access. On mobile, System settings and Git management use a submenu switcher at the top right; toolbars use icons, less frequent actions live under More, and long-pressing an icon shows its description. File previews keep a close control visible, and diff details provide a way back to the file list. Desktop layouts retain text actions and split navigation. Chat supports model and reasoning-effort selection; each response shows its time, model, settings snapshot, and recorded cost. See the workspace guide for full instructions.
Run on a Linux server:
curl -fsSL https://raw.githubusercontent.com/devilcoolyue/agentbox/main/install.sh | sudo bashThe current stable release is v0.1.7. The installer selects the latest stable release by default. Append -s -- --version v0.1.7 to pin this version.
On SELinux systems such as Oracle Linux / RHEL, if an older package fails to start with 203/EXEC / Permission denied, follow SELinux installation recovery to repair executable labels before retrying activation.
The installer supports Linux x86_64 / arm64 with systemd. On Ubuntu 22.04+ and Debian 12+, it installs missing dependencies and Docker automatically. Other distributions require Python 3.9+, Git, curl, CA certificates, timezone data, and a local Docker Engine to be installed first. The server uses prebuilt packages, so Go and Node are not required on the server.
The command verifies the release package, builds a workspace image with pinned versions, generates configuration and a random administrator password, and installs and starts agentbox.service. The first image build takes a few minutes and requires access to container registries, Debian package repositories, and npm. Once complete, open http://YOUR_SERVER_IP:8180, sign in as boxadmin with the initial password printed in the terminal, and add an account under System settings → Account pool (系统设置 → 账号池). For remote access, allow TCP 8180 through your firewall / security group. Configure HTTPS for ongoing public access.
Append -s -- --listen 127.0.0.1:8180 to restrict access to the local machine or a reverse proxy. Configuration and data are stored in /etc/agentbox and /var/lib/agentbox. If an existing deployment is detected, the installer stops and preserves its files. See the installation guide for upgrades, recovery, and all options.
Developers: build and deploy from source
The project is licensed under Apache-2.0. You are welcome to build, modify, and contribute. Use the prebuilt installer above to get started as a user, or read the contribution guide to work on the source.
| Dependency | Purpose |
|---|---|
| Linux + Docker Engine | Run the server and workspace containers; production hosting uses systemd |
| Go 1.26.6 or a compatible automatic toolchain | Build the server from source; go.mod is the version reference |
| Git | Fetch source, review Git changes, and retrieve skill marketplace content |
Python 3, curl, iproute2 (ss) |
Deployment, health checks, and backup scripts |
| OpenSSL | Generate the initial administrator password |
| Node.js 22 / npm (optional) | Only needed when editing the main console's TypeScript |
The deployment machine does not need to compile the frontend: generated files in internal/web/static/js/ are committed and embedded in the Go binary. Backups use the binary's built-in SQLite online backup API; scheduled backup rotation uses Python 3.
Each container defaults to 2048 MiB of memory, 2 CPUs, and 512 processes. Reserve server resources based on the number of concurrent workspaces. macOS supports builds and unit tests; full container and systemd deployments target Linux.
git clone https://github.com/devilcoolyue/agentbox.git
cd agentbox
go build -o agentbox ./cmd/agentbox
./scripts/build-image.shImage builds require access to the base image registry, Debian package repositories, and npm. The user running the build needs Docker access. At startup, the server also needs to set mounted directory ownership to 1000:1000; the supplied systemd unit runs as root.
cp config.example.json config.json
openssl rand -hex 24Edit config.json:
- Replace
auth_tokenwith the generated random string. It becomes the initialboxadminpassword on first startup. - For a first try, set both
accountsandproxiesto[], then add real accounts in the Web UI after login. The example proxy addresses and keys are placeholders and cannot be used as-is. - Keep
listen: "127.0.0.1:8180". Data defaults to thedata/directory next to the configuration file.
You can use this minimal configuration after replacing the password placeholder:
{
"listen": "127.0.0.1:8180",
"auth_token": "CHANGE_ME_TO_A_LONG_RANDOM_TOKEN",
"data_dir": "data",
"agent_image": "agentbox-agent:latest",
"accounts": [],
"proxies": []
}Startup validation rejects the placeholder password. See the configuration reference for all fields, defaults, and when changes take effect.
Try running in the foreground from the repository directory on the Linux server:
sudo ./agentbox -config config.jsonOn the server itself, open http://127.0.0.1:8180. For a remote server, open another terminal on your computer and set up SSH forwarding:
ssh -N -L 8180:127.0.0.1:8180 user@your-serverThen open the same address in your local browser and sign in with boxadmin and the configured auth_token. After the account is created, its password is stored in the database; changing auth_token does not reset the login password.
- Open System settings → Account pool (
系统设置 → 账号池) and add a Claude or Codex account. - Choose Subscription OAuth or API key / relay in the same dialog, and configure its name, access scope, and egress proxy. For Claude subscriptions, paste the authorization code; for Codex subscriptions, paste the complete callback URL. For API / relay accounts, enter the endpoint and key. See accounts and models.
- Create a workspace, enter a name, and select an agent and account.
- Upload a project in Files (
文件), or open Terminal (终端) and rungit clone. - Send a task in Chat (
对话). When it finishes, review the diff in Changes (变更), then commit or download files.
After stopping the foreground trial, run from the repository directory:
sudo ./deploy/install.sh
sudo ./deploy/deploy.shAdministrators can check for new versions through the sidebar version entry or System settings → About and updates (系统设置 → 关于与更新). Standard Linux/systemd versioned installations support Upgrade and restart, with automatic verification, backups, and progress reporting. Development, prerelease, and dirty builds in this layout can also switch directly to the latest stable release, even if its version number is lower; incompatible configuration or database schemas block the switch. Source installations continue to use deployment scripts. See releases and upgrades.
install.sh installs the service and timers; automatic workspace image updates are disabled by default. deploy.sh builds and replaces binaries, restarts the service, and checks its health. For ongoing remote access, configure HTTPS and a WebSocket reverse proxy. See deployment and operations.
Administrators can manage CLI image updates in Settings → Containers & resources → Client updates: daily automatic updates, Claude stable / latest, a check time in the site timezone, manual checks, updates, and rollback. Automatic updates are off by default; Claude defaults to stable, and Codex stays pinned unless updating it to latest is explicitly selected. Scheduling runs inside the server and needs neither a systemd update timer nor a source checkout. Updates extend the current image, preserve browser/custom functionality, and switch images only after CLI version checks pass. Running workspaces continue uninterrupted; stop and start them to use the new image. Failures retain the active image; rollback pauses automatic updates. See CLI image updates.
For uninstalling and reinstalling, see downloads and installation. Uninstall preserves all files in a private backup directory by default; --purge deletes them permanently. Since v0.1.1, release packages include abox-link for five platforms, and installation / upgrades place the client downloads automatically.
| Capability | Regular users | Administrators |
|---|---|---|
| Create workspaces; use chat, terminal, files, and skills | Own workspaces | Own workspaces |
| Use shared directories, home templates, and private-network tunnels | Own resources | Own resources |
| Select an account from the pool | Authorized accounts only | All accounts |
| View usage records | Own records | All users |
| Manage credentials, egress proxies, models, pricing, and system configuration | No | Yes |
| Create users, reset passwords, and manage credit limits | No | Yes |
Administrators maintain the account pool. Each account has one of three access scopes: all users, selected users, or administrators only, configured through its Access scope control. Older configurations without this setting remain shared with all users. Administrators can always use all accounts, but their workspace API requests are still checked against workspace ownership; system administration does not grant an interface for browsing other users' workspaces. Server administrators can still access persistent data on the host directly.
Revoking account access blocks new operations and further credential synchronization. It does not withdraw credentials already delivered or terminate running processes; complete revocation also requires stopping the relevant containers and rotating upstream credentials. Account credentials are provided to the CLI inside containers, and users with terminal access can read them. Shared account pools are therefore intended for trusted users; do not share administrator subscriptions or API credentials with untrusted users.
| Capability | Claude Code | Codex CLI |
|---|---|---|
| Web chat and multiple chat threads | Supported through streaming headless turns | Supported; prefers app-server, falling back to exec if the handshake fails |
| Original CLI terminal | Supported | Supported |
| Subscription authorization in the Web UI | OAuth authorization code flow | OAuth callback URL flow |
| API key / relay configuration | Supported | Supported; must match the provider protocol |
| Usage for Web chat and automatic titles | Supported | Supported; costs are calculated from configured pricing |
| Terminal usage backfill | Recorded without deducting credits | Supports codex-tui rollouts; recorded without deducting credits |
| Web skill management | Supports .claude/skills |
Configure through the CLI and home templates |
| Web MCP management | User defaults, workspace overrides, stdio/HTTP connection checks and tool discovery | Configure through the CLI |
A few operational boundaries:
- Persistent files do not imply persistent processes. You can reconnect after a terminal network disconnect, but stopping or rebuilding a container terminates its processes. Store files you need to keep in
/workspace,/home/agent, or/shared. - Credit limits are not real-time hard caps. Web turns settle when they finish, so the turn that exhausts a balance may overspend. Claude / Codex terminal usage backfill does not deduct credits.
- Default system backups exclude workspace data. They cover the database, configuration, account credentials, both template layers, and MCP management state.
agentbox backup --fullalso includes user files and history and requires stopping the service and relevant containers first. Usebackup-verifyto verify backups andrestore --toto restore into a new directory. See backup and restore. - Production deployment briefly disconnects clients. The current architecture uses one machine, one server process, and a local Docker daemon. Only one agentbox process may use a given
data_dir. - Agents can execute code in containers. The default permission mode is
bypassPermissions. Containers run as a non-root user with resource limits andno-new-privileges. The server has Docker access and is intended to be deployed and maintained by trusted administrators. - Git review runs inside workspace containers. Opening review starts the workspace if necessary and applies the same credit admission checks as terminal access. Web commits do not run Git hooks or signing; use the terminal if you need them.
- Remote browser: the workspace Browser tab provides a full desktop browser for Claude, ChatGPT, and other websites, with a compact address toolbar, persistent login state per workspace, tabs, fullscreen, adjustable picture quality, a UTF-8 clipboard, and workspace downloads. Administrators must build and select the optional
agentbox-agent:browserimage: Google Chrome on Linux amd64, Chromium on ARM. Account proxies, workspace access, and resource limits apply. Website login is separate from CLI authorization. See setup and usage. - Commit locally in the Web UI does not push to a remote. Set the shared name / email for your Web commits through Git management → Commit identity in the user menu, or Git identity on the Changes page; defaults are your username and
username@localhost. Remote ahead / behind counts come from the local cache; refreshing does not fetch. Git management is a separate page available to regular users, at the same level as System settings, with a guide, commit identity, and repository connections. It supports page refresh and browser back / forward navigation; connections and authorizations are managed within the page. Repository connections support HTTPS tokens and SSH private keys. Clone repositories from Changes; use Remote to bind a connection, fetch, pull by fast-forward, or preview and push. Administrators can register GitHub / GitLab OAuth apps so users can authorize reusable connections in the browser. Operations report progress and can be canceled. Enterprise Git supports company CAs and user private-network tunnels; SSH pins server host keys. Web branch management supports creation, switching, upstream configuration, and deletion of merged branches. GitHub / GitLab PR / MR creation includes a preview. Administrators can share dedicated service accounts with per-user read / write limits. A 30-minute terminal authorization is also available; long-term credentials remain on the server. Connections belong to users, workspaces select a default, and repositories bind connections per remote. See the Git management notes for implementation boundaries and the maintenance guide for offline key rotation. - Web file operations do not follow symbolic links. Workspaces, shared directories, skills, and credential files use restricted directory handles. Uploads are validated in temporary directories, and editor saves use atomic replacement. Container CLIs can still use links from templates.
The workspace MCP tab provides add/edit dialogs with draft retention on save errors, manages user defaults and workspace overrides, imports mcpServers JSON, and tests stdio/HTTP connections inside the container. The list separates configuration status from a compact action bar: connection checks keep their label, edit/copy/delete use icons with tooltips, and a switch controls enablement. Changes apply on the next chat turn, terminal connection, or workspace start; restart an already running terminal Claude to reload them. Existing native entries require explicit adoption. Header/env secrets are masked in API responses; on-disk configuration is private (0600), not encrypted. OAuth remains a terminal operation and the independent checker does not reuse CLI OAuth credentials. User and workspace MCP control files are included in system backups; runtime home/OAuth files require full backups. See Skills, plugins, and MCP for precedence, conflict handling, API details, and limits.
New installations can use versioned release directories, with configuration, data, and marketplace cache stored in /etc/agentbox, /var/lib/agentbox, and /var/cache/agentbox. Deployments inside the source repository remain supported. The deployment layout and migration guide covers installation, upgrades, rollback, offline migration, and backups.
Pricing in System settings offers a models.dev source preset and custom HTTPS catalogs. Daily server checks import Anthropic / OpenAI prices, adapting Claude one-hour cache writes and explicit context tiers; incomplete or unsupported prices remain pending review. Updates require confirmation by default, with optional automatic updates for selected models (changes above 25%, zero-price transitions, and tier-rule changes require manual review). Custom prices stay protected. Price updates need no redeployment; historical price snapshots and rollback are retained, and rollback pauses automatic application. Sources require explicit configuration; the bundled older snapshot does not claim to be current. See pricing catalog maintenance.
Containers and resources in System settings provides global / per-user running container limits, reserved disk space, background disk usage statistics, marketplace cache cleanup, and sanitized diagnostic downloads. The usage page reads recorded entries and shows the terminal scan time; backfill runs in the background.
Claude web chat deduplicates usage by message ID, completes usage from new transcript records, and prices each request using the table pinned at turn start. Resumed session totals are never charged again. Message identities and credit deductions commit together (database schema 9). Existing history is not automatically repriced. Usage details and CSV include cache hit rate: cache reads / (uncached input + cache reads + cache writes); no input displays “—”.
The English and Chinese READMEs cover the same features and setup steps. Detailed guides are currently available in Chinese. Start with the documentation index for guidance by role.
| Guide | Contents |
|---|---|
| Workspace guide | Chat, terminal, files, HTML previews, Git review, and shared directories |
| Accounts and models | OAuth, API keys, Codex credentials, default models, and account lifecycle |
| Configuration reference | Fields, defaults, persistent directories, and when changes take effect |
| Skills, plugins, and MCP | Skill management, official marketplace, two-layer home templates, and MCP configuration |
| Usage and credits | Reporting semantics, cost details, pricing, top-ups, overspending, and CSV |
| Egress proxies and private-network tunnels | Proxy pools, abox-link pairing, allowlists, port mappings, and environment variables |
| Deployment and operations | systemd, HTTPS, updates, backups, recovery, migration, and logs |
| API reference | Login, workspaces, files, chat, usage, and administration |
| Development guide | Repository layout, builds, frontend live reload, tests, and contribution conventions |
| Releases and compatibility | Package installation, upgrades, rollback, and the pinned CLI baseline |
| Troubleshooting | Startup, login, containers, proxies, usage, backups, and frontend issues |
| Layer | Technology |
|---|---|
| Server | Go, HTTP / WebSocket, Docker Engine API |
| Main console | TypeScript, native ES Modules, xterm.js, KaTeX |
| Persistence | SQLite, host directories, JSONL chat history |
| Workspaces | Debian / Node.js image, Claude Code, Codex CLI, tmux |
| Private-network access | abox-link, yamux, WebSocket, SOCKS5, and TCP mappings |
| Deployment | Linux, systemd, HTTPS reverse proxy |
go build ./...
go test ./...
# When editing the frontend; CI uses Node.js 22
npm ci
npm run check
npm run buildWhen editing web/src/*.ts, also commit the generated files in internal/web/static/js/. See the development guide for Linux container checks, optional live model tests, and abox-link builds.
See CONTRIBUTING.md for contribution steps, SECURITY.md for private vulnerability reporting, CHANGELOG.md for changes, and third_party/ for third-party licenses. Binary candidates and installation workflows are described in the release guide; pinned CLI versions are listed in the compatibility matrix.
Focused issues and pull requests are welcome. Include your platform, source revision, reproduction steps, and sanitized logs. Keep real credentials, user files, and databases out of commits and screenshots.
Agentbox is licensed under Apache-2.0; see NOTICE for copyright notices. Third-party components retain their own licenses. Model services and runtime CLIs remain subject to their upstream usage and redistribution terms; see the third-party notes.
Thanks to the LINUX DO community for its support and discussions.
- LINUX DO - A new kind of ideal community





