# Repository Briefing: StaysUp/agentbus
> Source: https://repoforai.com/repo/StaysUp/agentbus (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/StaysUp/agentbus
- **Official Docs / Website**: https://agentbus.art
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: See repository
- **Engineering Health**: A (78/100 · Maintenance 35/35 · Adoption 17/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.6.10 (2026-12-02) — https://github.com/StaysUp/agentbus/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, CLI
- **Momentum**: 243 ★ total (+3 24h / +153 7d) · 47 forks
- **Topics**: `ai-agents`, `claude-code`, `codex`, `golang`, `llm`, `middleware`, `observability`
- **When to Use**: Best for: Developers running multiple coding CLIs who want a shared session, per-call cost visibility and a review gate before changes land. Skip if: You only need one vendor’s native CLI, require fully offline inference, or need strong isolation from host secrets and network access.

## Overview
```text
### Architecture & Core Mechanics
AgentBus is a self-hosted Go control plane and model gateway for existing coding CLIs, not a model runtime. A turn runs through Claude Code, Codex, OpenCode or Antigravity on the local host or a joined runner. The gateway captures model requests and replies with cost records, while the session layer lets a different agent take the next turn or review work in the same conversation. The browser cockpit, CLI and HTTP API are separate entry points into the workflow.

The package layout separates `adapter/`, `gateway/` and `runner/` from `event/`, `store/`, `replay/`, `workspace/` and `wall/`. The Go module includes `modernc.org/sqlite`, `kin-openapi` and `mvdan.cc/sh/v3`, covering embedded SQL, OpenAPI and shell parsing without implying that every host command is intercepted. HTTP clients can use the OpenAPI 3.1 contract at `/api/v0/openapi.json`; runner integration has a separate contract at `/api/v0/runner/openapi.json`.

### Key Capabilities & Differentiators
A session can switch from Claude Code to Codex mid-conversation or delegate a question, task or review to another agent. Access varies by adapter: Claude Code and Codex support native logins or their respective vendor API keys; Antigravity supports Google login or a Gemini API key; OpenCode uses OpenRouter or xAI keys, not its native login. Claude Code can also use OpenRouter model IDs, though changing the backend does not change the Claude Code harness or its tool conventions.

Claude Code and Codex use gateway replay by default; the history budget defaults to 40% of the model’s context window. Older long tool results become retrievable stubs, and the oldest turns are summarized without truncating the stored record. Antigravity uses vendor-side resume and only receives a pending note when the next turn starts. User-submitted turns have their own lane, while agent-started turns default to a concurrency limit of eight. Delegation depth, turn count and cost are configurable.

### Trade-offs & Limitations
Compared with running Claude Code or Codex directly, AgentBus adds cross-vendor continuity, a per-call audit trail and staged changes, at the cost of another service, more local data and adapter-specific limits. Direct edits the real folder without a wall. Default Copy works on a per-session copy; Review can ask another model to inspect changes, Apply writes them back, and Discard drops the copy without undoing effects outside it. Sandbox adds permission checks to Copy, but enforcement is not uniform: Antigravity cannot enforce shell forbid rules, and OpenCode may refuse a turn rather than pause for approval.

The srt boundary restricts writes to protected project folders and hides AgentBus’s data directory; it is not host isolation. Network access, Docker and ssh-agent remain available, and agents can read host secrets their terminal can read. Docker can modify the original folder outside Review and Apply. Evaluate those limits before giving agents access to sensitive hosts, and set a retention policy for full model records. The license metadata is unspecified despite a LICENSE file, so verify its terms before commercial adoption or redistribution.

### Hardware & Deployment Guide
Run on macOS or Linux with at least one supported coding CLI installed; Windows is unsupported. Install via Homebrew or the release script, then use `agentbus up -open` to start the service and open the cockpit. Building `cmd/agentbus` from source requires Go 1.27.1 or later and initially serves only the API; `agentbus up` prints the cockpit installation command. Joined runners need the relevant CLIs and machine-local logins for subscription access, and the control plane rejects older runner protocols.

The default data directory is `~/.local/share/agentbus`, overridable with `AGENTBUS_HOME`. Protect it and its control token, and restrict network access if enabling a non-loopback listener. Copy can be slow on Ubuntu 24.04 and later until the AgentBus AppArmor profile is installed. The release notes mark separate user-turn scheduling in v0.6.7 and a shared srt boundary for Copy and Sandbox in v0.6.10. Local hosting keeps records on managed disk, but is not offline inference: model calls still go to the selected provider.
```

## Key Capabilities
```text
- Gateway: Captures model requests, replies and cost across supported coding CLIs.
- Replay: Defaults to a 40% history budget, with fetchable stubs for older tool output and summaries for the oldest turns.
- Change review: Copy stages edits in a session workspace; Review can enlist a second model before Apply.
- Permission boundary: Sandbox adds Allow, Ask and Forbid rules over the srt wall; Ask waits up to 60 seconds where supported.
- Scheduling: User turns have a separate lane; agent-started turns default to eight concurrent turns.
- Integration: OpenAPI 3.1 for clients, a separate runner API, and CLI enrollment for additional machines.
```

## Quick Start / Clone
```bash
curl -fsSL https://raw.githubusercontent.com/staysup/agentbus/main/install.sh | sh
```
