Documentation

Concepts

This page defines the terms used across AgentHub docs and separates preview-ready work from features still in development.

Product Surfaces

AgentHub is not a single webpage or a CLI wrapper. It is composed of several collaboration surfaces:

SurfaceResponsibilityCurrent status
AgentHub DesktopLocal workbench connected to Local Edge; shows chat, diff, files, preview, and run stateLocal preview
AgentHub WebHub-backed collaboration workbench for multi-device and team workflowsPreview-ready, production wiring in progress
Hub ServerIdentity sessions, projects, devices, IM entry points, sync, audit, and permissionsLocal development
Edge ServerWorkspace, run lifecycle, runtime adapters, artifacts, diff, and preview eventsLocal development
Feishu/Lark AppBot, events, cards, H5/workbench entryIn development

Agent Profile And Runtime Adapter

An Agent Profile is the user-facing agent configuration: for example, "review agent", "docs agent", or "Codex implementation agent". A profile describes name, purpose, permissions, default model, allowed workspaces, and execution policy.

A Runtime Adapter is the Edge Server component that hosts a real execution engine, such as the Claude Code adapter, Codex adapter, or OpenCode adapter. A profile can bind to a runtime adapter, but the two are not the same thing.

The collaboration layer talks about profiles. The execution layer talks about runtime adapters.

Hub And Edge

The Hub / Edge boundary is:

  • Hub Server owns accounts, teams, projects, devices, IM entry points, cross-device sync, permissions, and audit.
  • Edge Server owns actual workspaces, process lifecycle, file operations, runtime adapters, diff, artifacts, and preview.
  • Desktop connects to Local Edge by default. Local execution does not require Hub login.
  • Web collaborates through Hub. It does not start local CLI processes or bypass Hub to connect directly to Local Edge.

Session, Task, Run, Event

  • Session: a collaboration context from Desktop, Web, or IM.
  • Task: the work a user asks an agent to do, such as reviewing a PR, updating docs, or fixing tests.
  • Run: one execution instance of an Agent Profile against a Task.
  • Event: a structured lifecycle item, such as run.started, run.message.delta, run.tool.call, run.diff.ready, run.approval.requested, or run.completed.

These objects turn agent execution from terminal output into searchable, auditable, replayable team records.

How One Request Flows

The smallest path starts in Desktop:

Text
User -> AgentHub Desktop -> Local Edge -> Runtime Adapter -> Runtime CLI
                         <- structured events / diff / artifacts <-

Team workflows add Hub:

Text
User/Web/IM -> Hub Server -> authorized Edge target -> Runtime Adapter
                    |                |
                    |                -> workspace policy / approvals / artifacts
                    -> session / project / device / audit

Do not blur these paths. Desktop local preview can connect directly to Local Edge. Web and IM entries must go through Hub identity, project scope, target authorization, and audit. When public docs say "Web runs a task", they should also say it is Hub-backed, not that a browser directly starts a local CLI.

Data Ownership

DataOwnerPublic-doc rule
TokenDance ID subject, profile, session claimsTokenDance ID + Hub relying partyExplain the identity boundary; do not publish real tokens or callback payloads
Project, device, task, auditHub ServerDescribe resource model and error codes; do not expose private databases or log paths
Workspace, file preview, diff, artifactEdge ServerUse relative paths and synthetic examples; avoid real local absolute paths
Runtime stdout/stderr/raw JSONLRuntime adapterNormalize into structured events by default; redact raw attachments
Feishu/Lark event and card actionIntegration Gateway + HubPayloads carry compact ids/actions, not full prompts, secrets, or private files

This ownership split prevents product login, model API keys, local CLI auth, and Feishu events from collapsing into a single credential plane.

Example: Docs Review Task

A low-risk task looks like this:

  1. The user selects an allowlisted workspace in Desktop.
  2. The user chooses an Agent Profile such as docs-agent.
  3. Desktop asks Local Edge to create a read-only run.
  4. Edge starts the runtime through a mock, Codex, Claude Code, or OpenCode adapter.
  5. The adapter converts message, tool, file-read, diff-ready, and final-result output into structured events.
  6. Desktop renders transcript, files, diffs, and artifacts.
  7. If the task wants to write files, run shell commands, commit, or publish, it enters an approval gate.

This example describes the local preview path only. Team Web, Feishu/Lark, and Remote Edge require additional Hub session, target authorization, audit, and async-queue evidence.

Current Delivery Status

Preview-ready or locally verifiable:

  • Desktop -> Local Edge -> Runtime adapter local path.
  • Claude Code, Codex, and OpenCode preset execution paths in Edge.
  • Hub Server local paths for OIDC code exchange, Hub session, and task routing.
  • Web workbench as a Hub-only preview surface.

In development:

  • Feishu/Lark production event ingress, card actions, H5/workbench, and TokenDance ID binding loop.
  • Remote/Cloud Edge, device proof, relay/provisioning, and workspace allowlist.
  • Database-backed Contacts, Docs, Tasks, Projects, and Settings surfaces.
  • Production-grade full Web + Hub + Edge routing E2E verification.

Boundaries To Keep Clear

  • TokenDance ID is the identity authority; AgentHub does not own direct GitHub, Google, or Feishu social login.
  • Feishu/Lark is a collaboration entry, not the product login system.
  • TokenDance API keys authenticate model API calls, not AgentHub Web/Desktop login.
  • Runtime adapters are not yet a stable public SDK package; public package and submission flow are still being shaped.