Building from Source
Build AgentMux from source on Windows, macOS, or Linux. AgentMux is a Rust desktop app with a SolidJS frontend, hosted in a bundled Chromium runtime via CEF (cef-rs).
Prerequisites
Section titled “Prerequisites”| Tool | Version | Purpose |
|---|---|---|
| Node.js | 22 LTS | Frontend build (Vite + SolidJS) |
| Rust | 1.77+ | Backend, host, and launcher |
| Task | Latest | Build orchestration |
| CMake | 3.20+ | Required by cef-dll-sys (CEF C wrapper) |
| Ninja | 1.10+ | Required by cef-dll-sys |
Platform-Specific Dependencies
Section titled “Platform-Specific Dependencies”xcode-select --installbrew install cmake ninjacurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shWindows
Section titled “Windows”- Install Rust from rustup.rs.
- Install Visual Studio Build Tools — select “Desktop development with C++” (provides CMake and Ninja).
- Verify Ninja is on
PATH. The Visual Studio install ships Ninja insideCommon7/IDE/CommonExtensions/Microsoft/CMake/Ninja/; copy or symlinkninja.exeto a PATH entry. From Git Bash (note: the*must be unquoted so the shell expands it):Or substitute the actual edition (Terminal window cp /c/Program\ Files/Microsoft\ Visual\ Studio/*/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe /c/Systems/bin/Community,Professional,Enterprise) and year (2022, etc.) so no glob is needed.
Linux (Debian/Ubuntu)
Section titled “Linux (Debian/Ubuntu)”sudo apt install build-essential cmake ninja-build curl wget file libssl-devcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall Task
Section titled “Install Task”# macOSbrew install go-task/tap/go-task
# Linuxsudo snap install task --classic
# Windowswinget install Task.TaskClone and Install
Section titled “Clone and Install”git clone https://github.com/agentmuxai/agentmux.gitcd agentmuxnpm installDevelopment
Section titled “Development”task devThis launches the four-process app with Vite hot reload. The frontend rebuilds on save (SolidJS HMR via Vite); changes to the Rust crates require a rebuild and restart.
After code changes
Section titled “After code changes”| Changed | Action |
|---|---|
| Frontend (TypeScript / SolidJS) | Auto-reloads via Vite HMR |
Rust sidecar (agentmux-srv/) | task build:backend, then restart task dev |
Rust host (agentmux-cef/) | task build:host, then restart task dev |
Launcher (agentmux-launcher/) | task package (only relevant for portable / installed builds) |
Build Commands
Section titled “Build Commands”| Command | Description |
|---|---|
task dev | Development mode (CEF host + Vite hot reload) |
task build:host | Build the CEF host binary |
task bundle | Bundle CEF runtime DLLs |
task build:backend | Build agentmux-srv |
task build:frontend | Build frontend only |
task package | Package a portable build for the host platform (Windows ZIP) |
task package:linux | Linux AppImage (writes to ~/Desktop per build-appimage-linux.sh) |
task test | Run tests (vitest) |
task clean | Clean build artifacts |
Run task --list to see every task. Note that task package:macos and task package:msix exist as TODO stubs in Taskfile.yml but do nothing — the full DMG / MSIX / .deb release artifact set is produced by agentmuxai/agentmux-builder, not local builds.
Source Layout
Section titled “Source Layout”agentmux/├── agentmux-launcher/ # Launcher shim (≈325 KB) — spawns the host, owns OS-level facts├── agentmux-cef/ # CEF host — embeds Chromium, owns the OS window├── agentmux-srv/ # Sidecar — RPC engine, SQLite persistence, sagas├── agentmux-common/ # Shared utilities (path resolution, runtime mode)├── frontend/ # SolidJS + TypeScript (Vite)├── docs/ # Architecture docs and specs├── specs/ # Top-level specs└── Taskfile.yml # Build task definitionsCommunication Flow
Section titled “Communication Flow”launcher ◀── named pipe ──▶ host (CEF) │ ├── JS bridge ──▶ renderer (SolidJS) │ ├── websocket ──▶ sidecar (agentmux-srv) │ │ │ └── websocket / wshrpc ──▶ remote `wsh` │ ▼ OS window, browser panesSee Architecture overview for the full topology and what each edge carries.
Debugging
Section titled “Debugging”Frontend
Section titled “Frontend”Open Chromium DevTools from the hamburger menu (≡) in the top tab bar → Dev Tools, or use the keyboard shortcut. DevTools is no longer a widget-bar entry (moved to the hamburger menu — see Pane types). Reload the renderer with Ctrl+R / Cmd+R.
Backend Logs
Section titled “Backend Logs”Logs land in <data-dir>/logs/ for the running version. Use the muxlog shell helper from any AgentMux terminal:
muxlog host # tail the current host logmuxlog srv # tail the sidecar logmuxlog host '[fe]' # filter the host log to frontend linesmuxlog host cat # full file contentsSee Multi-instance & dev mode for the per-instance path layout and pointer-file resolution.
Troubleshooting
Section titled “Troubleshooting”CMake / Ninja errors
Section titled “CMake / Ninja errors”If cargo build fails with “CMake was unable to find a build program corresponding to Ninja”, verify ninja --version works on PATH. On Windows, see the install steps above.
Backend binary not found
Section titled “Backend binary not found”Run task build:backend and verify the binary lands in target/release/ (or the platform-equivalent location). The host auto-spawns the sidecar by absolute path.
Frontend not loading
Section titled “Frontend not loading”Check the Vite dev port (task dev prints it on startup) is not already in use. Clear and reinstall if needed:
rm -rf node_modules package-lock.jsonnpm installtask devSchema directory missing after clean
Section titled “Schema directory missing after clean”dist/schema/ is wiped by task clean but automatically recreated by the copy:schema dependency in dev, start, and package tasks.
See Also
Section titled “See Also”- Architecture overview — process topology and IPC edges
- Multi-instance & dev mode — data layout, log discovery
- Reducer stack — how state flows across the four processes
- Contributing — contribution guidelines
- Configuration — settings file format