Documentation

Installation

This page explains the local development setup for AgentHub Desktop, Local Edge, Hub Server, Web, and runtime adapters. Use it before the Quickstart when a machine has not run AgentHub before.

Scope

These steps describe a developer workstation. Public docs must not include private deployment hosts, SSH aliases, provider keys, or production rollback paths.

Supported Setup

AgentHub is developed as a multi-surface product. A complete local workstation usually needs:

AreaRequirementWhy it matters
SourceGitClone the AgentHub repository and inspect branches
Desktop/WebNode.js 20+ and pnpmInstall frontend dependencies and run local previews
Edge/HubGo 1.25+Run local Edge and Hub services
RuntimeMock runtime first, then Claude Code, Codex, or OpenCodeValidate UI before real provider credentials
BrowserChromium, Edge, or ChromeTest Desktop/Web preview and docs pages

Use the mock runtime for first setup. Real runtimes can introduce unrelated CLI login, provider quota, shell, and workspace-policy failures, so they should be introduced only after the mock path is healthy.

Clone And Bootstrap

Clone the source repository and run the repository setup script:

powershell
git clone https://github.com/TokenDanceLab/AgentHub.git
cd AgentHub
.\scripts\setup.ps1

If the setup script changes, follow the AgentHub repository README. This public website describes the expected shape, not every private or fast-moving local command.

After setup, inspect the repository layout:

PathRole
app/desktopDesktop UI for local workspaces and Local Edge
app/webHub-backed Web workbench
edge-serverLocal execution, runtime adapters, diffs, artifacts, approvals
hub-serverTokenDance ID sessions, projects, devices, routing, audit
apiPublic contract vocabulary and OpenAPI/event references

Runtime CLI Preparation

Runtime adapters wrap existing coding-agent tools. Prepare only the runtime you plan to test:

RuntimePreparation
MockNo provider credentials; best first validation target
Claude CodeInstall and authenticate the local CLI in the user shell
CodexInstall and authenticate the local CLI in the user shell
OpenCodeInstall and authenticate the local CLI in the user shell
CustomProvide a local adapter implementation and safe profile

Do not paste provider keys into the website, browser local storage, docs, issue comments, or Feishu/Lark card payloads. Real keys belong in the local shell environment or a server-side secret store, depending on the runtime owner.

Ports And Processes

Recommended local ports:

ProcessDefault shapeNotes
Local Edge127.0.0.1:3210Bind to loopback for local execution
Desktop dev serverVite-assigned, often localhost:5173Use the terminal output if the port changes
Web dev serverNext/Vite-assignedWeb should call Hub, not Local Edge directly
Hub ServerRepository-defined local portUse only when testing sessions, projects, devices, audit, or routing

If a port is already occupied, choose another local port and update the matching client configuration. Do not change public docs to hard-code a private operator port.

Verify The Workstation

Before running a real task, verify:

powershell
git --version
go version
node --version
pnpm --version

Then start the mock Local Edge and run a health check:

powershell
cd edge-server
go run ./cmd/agenthub-edge --addr 127.0.0.1:3210 --runner-profile agenthub-runner-mock
curl.exe http://127.0.0.1:3210/health

The exact health endpoint may change while Edge is converging. The required behavior is stable: Local Edge should expose process state, runtime profile state, and workspace-policy state in a safe, inspectable way.

First Failure Triage

SymptomFirst check
pnpm install failsConfirm Node.js major version and package manager from package.json
Edge does not startCheck Go version, selected runtime profile, and occupied port
Desktop cannot connectConfirm Desktop points at the same loopback Edge URL
Mock works, real runtime failsCheck the runtime CLI installation and local login
Browser shows old docsUse a cache-busting URL and check the deployed sitemap.xml / llms.txt

Continue with Quickstart after the workstation can start Local Edge and Desktop.