Updated 2026-06-18

Hub And Edge

AgentHub splits collaboration from execution. Hub owns identity, projects, routing, and audit. Edge owns local workspaces, runs, runtime adapters, diffs, artifacts, and approvals.

Responsibility Split

CapabilityHub ServerEdge Server
TokenDance ID loginConsumes OIDC result and creates product sessionDoes not own user login
Project membershipOwns project, member, role, and route policyReceives authorized target decisions
Device and target routingAuthorizes which Desktop/Web/integration entry may reach which EdgeAdvertises health, target, and workspace capabilities
Workspace accessStores policy and audit stateEnforces allowlist near the filesystem
Runtime executionTracks task and run metadataStarts, cancels, and observes runtime adapters
Files, diffs, artifactsStores shareable audit/review factsProduces local facts and approval events
SecretsKeeps product signing and integration secrets server-sideUses local/runtime secrets from controlled local environment

Local Edge Mode

Local Edge is the default development and personal execution mode. It runs on loopback, sits near the workspace, and should be reachable by Desktop only through a configured local URL.

Local Edge should enforce:

  • workspace allowlists;
  • approval policy for writes, shell, network, and publish actions;
  • runtime adapter availability;
  • run lifecycle and cancellation;
  • local artifact and diff boundaries;
  • safe event streaming to Desktop.

Hub-Backed Web Mode

Web is a Hub-backed collaboration surface. It can show projects, tasks, session history, review state, and audit facts, but it should not directly start local CLI processes or read local files.

The correct path is:

  1. User signs in through TokenDance ID.
  2. Hub creates an AgentHub product session.
  3. Web asks Hub for project and task state.
  4. Hub authorizes a target Edge when a task needs execution.
  5. Edge streams events and artifacts back through the authorized route.
  6. Hub stores the reviewable and auditable summary.

Remote And Cloud Edge

Remote/Cloud Edge is still in development. Do not document it as generally available until these facts are proven:

RequirementExpected proof
Device identityEdge registration, key rotation, and revoke path
Target authorizationHub policy decides who can route to the Edge
Workspace policyAllowlist and tenant/project boundaries are enforced
Relay behaviorFailure modes are explicit and observable
Audit trailUser, project, run, target, approval, and artifact state are recorded
Degraded stateWeb/Desktop show unavailable, unauthorized, timed out, and cancelled states clearly

Integration Entries

Feishu/Lark, future IM entries, and automation triggers should enter through an Integration Gateway or Hub API, not directly into Edge.

Integration entries must:

  • verify webhook signatures or app credentials;
  • resolve TokenDance ID binding;
  • create Hub tasks asynchronously when work is slow;
  • avoid storing provider secrets or workspace paths in cards;
  • route to Edge only after Hub authorization.

Event Contract

Edge should normalize runtime output into stable product events. Minimum useful groups:

GroupExamples
Run lifecyclerun.started, run.completed, run.failed, run.cancelled
Messagesrun.message.delta, run.message.completed
Toolsrun.tool.call, run.tool.result, run.tool.failed
Reviewrun.diff.ready, run.artifact.ready, run.approval.requested, run.approval.resolved
Runtime stateruntime.unavailable, runtime.timeout, schema.validation_failed

Events should carry enough IDs to correlate user, project, run, agent, sequence, timestamp, and versioned payload without leaking local secrets.

Debugging Boundary

When a workflow fails, identify the owner before changing code:

SymptomLikely owner
Login succeeds but API is unauthorizedHub session or product authorization
Web cannot read local filesExpected boundary; use Desktop + Edge
Desktop cannot connectLocal Edge health, port, or URL
Runtime produces no eventsEdge adapter, local CLI, provider credential, or event schema
Feishu card times outIntegration Gateway ack/queue path
Remote target unavailableHub route policy, Edge registration, or relay state
Edit this page on GitHub