← 开源

Self-hosted browser workspace for Claude Code and Codex CLI, with Docker sessions, terminal, files, Git, and usage tracking.

Go
增长势头
+024 小时新增 Star0.0%
277
Star
11
Fork
2
贡献者
创建于 2026-09-28 · 更新于 2026-12-01 · 今日第 25436 名
主要开发者
README

agentbox

Your AI coding workspace. On your server. In your browser.

Run Claude Code and Codex CLI on a Linux server you control.
Go from a task to reviewed code with chat, terminal, files, and Git in one place.

English | 简体中文

Watch the tour · Highlights · Screenshots · Quick start · Architecture · Documentation

See it work

▶ Full tour in 1920 px (MP4, 70 s) — adds file previews, usage records and switching between the six interface styles · Screenshots

Recorded from the real web console with synthetic projects, conversations, command output and usage — no model was called. It demonstrates the interface, not model quality or speed.

Why agentbox?

Set up your coding environment once on your server, then pick up your project from a laptop, desktop, or phone. Your local machine only needs a browser; the agents and project tools run in Docker on the server.

What you need What agentbox provides
Pick up where you left off Persistent project files, home configuration, and chat history across browser sessions
Work with familiar agents Claude Code and Codex CLI, with a streaming Web chat and their original interactive terminal interfaces
Finish the task in one place Upload or clone → chat → run and preview → review diffs → commit, push, or download
Reuse your setup User-level shared files, layered home templates, Claude skills, and MCP configuration with workspace overrides
Give a trusted team access Central account pools, per-user account scopes, per-request usage records, price snapshots, and optional credits
Connect to your own services Optional abox-link tunnel to allowlisted repositories, databases, and other private-network services

You bring the server and your own Claude / Codex subscription, API key, or compatible relay account. Agentbox provides the workspace and management layer; model usage follows your provider's terms and pricing.

Highlights

A chat that keeps up with the CLI

  • Watch the work, not a spinner. Replies stream with thinking summaries and every tool call; Claude Code tool calls read like its terminal (● Update(src/app.ts) with a numbered diff, reads and commands folded into "Read 3 files, ran 2 shell commands", sub-agents with their own calls), Codex commands are named the way its CLI shows them (Read, Search, Shell, Edit) with exit status and duration, and full output and diffs are a click away. The agent's task list sits above the message box ("Tasks 2/3 · Running the tests"), a timer counts the turn, and a ring shows how full the context window is, like the CLI status line.
  • @ files and / commands. Type @ to search workspace files by name and insert the path. Type / to list the workspace's real Claude Code commands. /context is drawn as the CLI's colored grid and, on subscription accounts, /usage as limit bars; both are answered locally without a model call.
  • Stay in the loop. When Claude asks a question mid-task, answer it in a card and the same turn continues. Keep typing while it works: messages queue for the next turn, or steer the running one. After a turn, the predicted next prompt waits in grey for Tab. (Questions, steering and suggestions are for Claude workspaces.)
  • Nothing gets lost. Unsent drafts, frozen outgoing copies and per-message receipts survive reloads, disconnects and server restarts; an uncertain result is shown for review instead of being re-run.

The original CLI, files and Git

  • Terminal: Shell, Claude Code or Codex in a tmux session that survives reconnects; open several terminal tabs to run agents side by side on the same project files; touch scrolling, long-press paste and copy-to-clipboard.
  • Files: browse, edit, upload archives and download from the project and /shared; preview Markdown and HTML as rendered pages.
  • Git: review per-file diffs and commit; fetch, pull, preview a push and open a PR / MR over HTTPS tokens, SSH or GitHub / GitLab OAuth. Long network operations run in the background.

Built for a trusted team

  • Accounts: subscription, API key and relay accounts in one pool, scoped per user, with the models and reasoning effort each account offers. A workspace can switch to another account of the same agent.
  • Usage and cost: one record per model request with tokens, cache, latency, reasoning effort and the price snapshot it was billed at; terminal usage is recorded too. Claude Code and Codex report each request's first-token time and duration over telemetry, which gives a measured latency and output speed (tok/s) per request; requests without that report fall back to estimates from the CLI logs. A workspace can turn on cache keepalive: while you are away, the server keeps the prompt cache of a large Claude conversation (in chat, and optionally in the terminal) from expiring for up to three hours by default, so coming back does not pay to write it all into the cache again. Optional credit balances and CSV export.
  • Reuse: Claude skills (including the official marketplace), layered home templates, and MCP servers as user defaults with per-workspace overrides.
  • Private networks: pair abox-link to reach allowlisted services on your own network; route each account through its own egress proxy.
  • Announcements: administrators show every page a banner, such as a release countdown that turns into "upgraded" once the new version starts, and can see who a restart would affect first. Announcements →

Extend, delegate, make it yours

  • Extensions an administrator turns on one by one: Loop guard interrupts a reply that keeps repeating itself (API key and relay accounts), and Webhook notifications post workspace and turn events to Feishu, DingTalk, WeCom or any JSON endpoint. Design →
  • Supervisor delegation (preview): a strong main agent hands well-specified subtasks to cheaper worker models in the same workspace. Design →
  • Styles and languages: six built-in styles × light / dark, custom themes with a live preview editor, 简体中文 · 繁體中文 · English, and a phone layout. Themes →

The workspace guide (Chinese) explains each chat feature in detail, including what needs a newer Claude Code in the Agent image.

Screenshots

All screenshots are 2× PNGs; click one to open it at full resolution.


A turn in progress
Tool calls as they happen, the agent's task list, the turn timer and the context meter.

/context without a model call
Slash commands come from the workspace's Claude Code; context usage is drawn as in the terminal.

The original terminal
A persistent tmux session for the shell or the agent's own CLI.

Review every change
Per-file diffs before you commit, push or open a PR / MR.

Files
Project and shared folders: edit, upload, download.

Rendered previews
Switch between source and rendered Markdown or HTML.

Usage, request by request
Filters, totals, cache hit rate, effort, latency and CSV export.

Account pool
Subscriptions, API keys and relays with access scopes and models.

Skills
Install into a workspace or your template; browse every file.

MCP servers
User defaults, workspace overrides, JSON import and connection checks.

Extensions
Approve permissions and choose the accounts or users each one applies to.

Private-network tunnel
abox-link status, allowlist and client downloads.

Six built-in styles, each in light and dark. Custom themes start from one of them.


The same workspace on a phone.

Quick start

Install on your Linux server

curl -fsSL https://raw.githubusercontent.com/devilcoolyue/agentbox/main/install.sh | sudo bash

The installer downloads and verifies the server package, builds the workspace image, and starts agentbox.service. No Go or Node.js installation is needed on the server. The first image build takes a few minutes and needs access to container registries, Debian repositories, and npm.

  • Host: Linux x86_64 / arm64, systemd, and local Docker Engine. Ubuntu 22.04+ / Debian 12+ install missing dependencies automatically. For other distributions, see the prerequisites.
  • Sign in: open http://YOUR_SERVER_IP:8180 and use boxadmin with the generated password printed by the installer. Allow TCP 8180 through your firewall if connecting directly; configure HTTPS for ongoing public access.
  • Stable server: v0.1.20. The command selects the latest stable release; append -s -- --version v0.1.20 to pin it, or -s -- --listen 127.0.0.1:8180 to bind only to localhost.
  • Existing installation: use About and updates in the console or the upgrade guide. The installer preserves existing deployments and will not overwrite them.

Configuration lives in /etc/agentbox, data in /var/lib/agentbox. Each workspace defaults to a 2 GiB memory limit and 2 CPUs; size your server for the number of concurrent workspaces. See installation and recovery for all options.

Your first task

On first sign-in a role-based guide walks administrators through the environment check, accounts and default models; users see the accounts they may use.

  1. Add an account in System settings → Account pool. Choose Claude or Codex and connect a subscription or an API / relay account. Fetch the provider's models, keep the ones this account offers, and set reasoning effort per model; when a relay cannot list models, start from the official catalog that ships with the CLIs in the Agent image. Account setup →
  2. Create a workspace from an empty project, an uploaded archive or a Git repository, and pick its agent and account. You can later switch to another account of the same agent from the workspace ⋯ menu. Project import →
  3. Describe the task in Chat. Mention files with @, run commands in Terminal, and open Files to check the result; all of them work on the same project files.
  4. Review Changes before committing. Download the result, or configure a Git connection to push and open a PR / MR. Workspace guide →
Prefer to build from source?

On Linux with Docker, Git, and the Go toolchain in go.mod:

git clone https://github.com/devilcoolyue/agentbox.git
cd agentbox
go build -o agentbox ./cmd/agentbox
./scripts/build-image.sh
openssl rand -hex 24

Save the following as config.json, replacing the password placeholder with the generated random value:

{
  "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": []
}
sudo ./agentbox -config config.json

Open http://127.0.0.1:8180 on the server, or run ssh -N -L 8180:127.0.0.1:8180 user@your-server on your computer and open that address locally. Sign in as boxadmin with the configured auth_token. After first startup the password is stored in the database; editing auth_token does not reset it. If you forget it, stop the service and run agentbox admin-reset-password --config /path/to/config.json --user boxadmin (see the recovery procedure).

The server needs Docker access and permission to set mounted directory ownership to 1000:1000. After stopping this foreground instance, run sudo ./deploy/install.sh and sudo ./deploy/deploy.sh for a source-based systemd installation. See deployment, configuration, and development for details.

How it works

One Go server, SQLite, and Docker. The frontend is embedded in the server binary. Each workspace gets its own container; files and history persist on the host.

Layer Responsibility
Browser / optional desktop Connect to the server and interact with your workspaces
Agentbox server Authentication, account access, workspace lifecycle, HTTP / WebSocket, Git operations, usage and credits, extensions
Workspace containers Run Claude Code / Codex CLI and project tools; communicate with your configured model provider
Persistent storage SQLite state and ledger, project files, home directories, shared files, and JSONL chat history
Optional abox-link Connect private services reachable from your computer through an explicit allowlist

Chat and terminal share files, not an automatic conversation context. Each workspace supports multiple chat threads, and by default up to three of them (configurable by the admin) can run Web chat turns at the same time (messages sent to a running thread, or past that limit, queue); long threads open at the newest messages and load earlier ones as you scroll up. Each user's /shared directory is available across their workspaces. Stopping a container retains files and history but ends its processes.

Choose your entry point

Entry point Use it for Availability
Web console Chat, original CLI terminal, files, Git, skills, MCP, and administration Included in the server; no local agent installation
Desktop app Native Windows/macOS access, project terminals, file transfer, and optional sync Download 0.1.2 · unsigned public test release
abox-link Allowlisted private-network access from cloud workspaces Optional; local panel or headless command line on Windows, macOS, and Linux
HTTP / WebSocket API Script workspace operations and usage queries API reference

The desktop app connects to your server; it does not replace or upgrade it. Sync is disabled by default and requires an administrator to enable it. Desktop 0.1.2 is a manual download (macOS not notarized, Windows unsigned, no automatic updates) and predates the multilingual UI that the desktop source now has. See the desktop guide.

Optional server features: a remote browser image gives a workspace a full browser desktop with persistent website logins; shared tools provide read-only Go SDKs and browsers with per-user caches; local storage capacity management adds per-user project quotas and cache cleanup. Agent image updates build from a fixed base and are validated before they switch (image maintenance).

Know the boundaries

  • Use trusted accounts with trusted users. Credentials are made available to the CLI inside containers and can be read by users with terminal access. Account scopes restrict admission; revoking access does not withdraw credentials already delivered or terminate existing processes. See account permissions.
  • Persistent files are not persistent processes. Keep durable files in /workspace, /home/agent, or /shared. Stopping, rebuilding, or idle suspension ends container processes; a browser disconnect alone does not immediately stop the container.
  • Credits are not hard spending caps. Web chat settles each model request as it completes, but balance is only checked before a turn starts, so the final admitted turn may overspend. Terminal usage is recorded without deducting credits. See usage and quotas.
  • Back up user files explicitly. Default system backups cover configuration, credentials, database state, templates, and MCP management state; they exclude workspace files and chat history. Full backups require stopping the service and relevant containers. See backup and restore.
  • Deploy within a trusted server boundary. Agentbox uses a local Docker daemon and one server process per data directory. Agents execute code with bypassPermissions by default; containers use a non-root user and resource limits. Deployments briefly disconnect clients.
  • Review and push are separate actions. Web commits do not run hooks or signing and do not automatically push. Use the terminal when you need those commit behaviors. See Git management.

Documentation

English and Chinese READMEs cover the same overview and setup. Detailed guides are currently in Chinese; start with the documentation index.

You want to… Read
Use chat, terminal, files, previews, and Git Workspace guide
Connect accounts or choose models Accounts and models
Reuse skills, templates, and MCP tools Skills, plugins, and MCP
Understand or manage costs Usage and credits · Pricing catalogs
Turn on extensions or stop repetitive model output Extensions and SPI · Standalone loop guard (preview)
Let a strong model hand work to cheaper ones Supervisor delegation
Connect private services Proxies and abox-link
Install, upgrade, back up, or recover Deployment · Releases · CLI compatibility
Configure or integrate the server Configuration · API reference
Choose a language or make a theme Languages · Interface themes
Resolve an error Troubleshooting · Error codes · Diagnostics
See what changed Changelog · Capabilities and verification
Contribute code Development guide · Contributing

Development roadmap

The current server release is v0.1.20 (2026-11-12). Recent releases added supervisor delegation, the theme editor and local storage capacity management (v0.1.13); questions, follow-ups, / commands, @ mentions, the context meter, the task list and per-request billing (v0.1.14); extensions, webhook notifications, the turn timer and background Git network operations (v0.1.16); prompt cache keepalive, measured per-request latency, live per-request billing, CLI-style tool rows and icon management (v0.1.17); the conversation rail, system announcements with a release countdown, restricted workspace egress, terminal usage billing and per-user storage limits (v0.1.18); up to three conversation threads running at once in a workspace, terminal tabs and the folding workbench top bar (v0.1.19); and abox-remote for offloading work to your own machine over the tunnel, an admin panel for logins and last activity, a usage trend chart and a configurable number of concurrent conversations (v0.1.20). See the changelog.

The first round (M1–M5: diagnostics, onboarding, reliable chat, maintenance quality, desktop consistency) shipped in v0.1.11; its external acceptance — real-user observations, performance thresholds, recovery targets and desktop signing — is still pending (record). The second round continues it:

Milestone Planned focus
M6 · Wrap-up and formal release Commit the development tree, run hosted CI end to end, release v0.1.11 and align documented version status (record)
M7 · Real-use acceptance and metrics baseline In-instance aggregate metrics with redacted export, real task observations, agreed performance thresholds and recovery targets
M8 · Feedback-driven daily efficiency Fix the most frequent blockers found in observations; candidates: workspace archiving, task completion notifications, long-conversation rendering
M9 · Upstream updates and installation cost Prebuilt Agent images, CLI baseline advancement, routine dependency upgrades, broader contract generation
M10 · Stable desktop release OS signing and notarization, minimum OS and real devices, a full sync pilot cycle; a test release if certificates are unavailable
M11 · Additional agents Provider registry and ACP transport, optional agents in the image; Kimi Code CLI first

Each iteration is scoped to about 3 weeks; order and scope follow user feedback and acceptance results, and these are not release-date commitments. Scope, dependencies and acceptance criteria are in the second-round plan and the sealed first-round plan (both Chinese). Issues with concrete use cases are welcome.

Build and contribute

The capability and verification inventory separates implemented features, release records, and pending acceptance. Run python3 scripts/verify.py list to choose checks or python3 scripts/verify.py run quick for local checks with saved reports; see the verification guide.

The server uses Go + SQLite + Docker; the browser console uses TypeScript, native ES Modules, and xterm.js. See the development guide for toolchains and platform-specific checks.

go build ./...
go test ./...

# If you edit the frontend
npm ci
npm run check
npm run build

Commit generated internal/web/static/js/ files alongside changes to web/src/. Full container validation targets Linux; macOS builds and unit tests do not replace it. The screenshots and tour above are regenerated from the shipped UI with scripts/capture-readme.mjs and scripts/render-readme-tour.mjs (capture guide).

Useful bug reports, workflow suggestions, and focused pull requests are welcome. Include reproduction steps and sanitized logs; report vulnerabilities privately via SECURITY.md. If agentbox is useful to you, a Star helps other developers discover it.

License and community

Apache-2.0 · Copyright notices · Third-party licenses · Changelog

Model services and runtime CLIs retain their upstream terms. Thanks to the LINUX DO community for its support and discussions.

排名相邻

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载