Documentation

Workflows

This page maps AgentHub concepts to the work people actually perform: local runs, team-visible reviews, Hub-backed collaboration, Feishu/Lark entry points, runtime adapter development, and release evidence.

How to use this page

Read this page after Concepts and before the deeper API or operations pages. Each workflow lists the owner, required surfaces, expected evidence, and current status.

Workflow Map

WorkflowPrimary userRequired surfacesStatus
Local solo runIndividual developerDesktop, Local Edge, one runtime adapterPreview-ready
Reviewable diffDeveloper and reviewerDesktop, Local Edge, artifact/diff panel, approval statePreview-ready
Team collaborationTeam memberHub Server, Web, project/session/device stateIn development
Remote routingTeam/operatorHub Server, authorized Edge target, auditIn development
Feishu/Lark taskTeam chat participantIntegration Gateway, Hub task, TokenDance ID bindingIn development
Adapter developmentRuntime integratorEdge adapter contract, events, validationContract shaped
Public releaseMaintainerdocs, sitemap, llms.txt, visual QA, governance checksCurrent

Local Solo Run

Use this workflow when a developer wants AgentHub Desktop to run a local coding agent against a local workspace.

  1. Start Local Edge on loopback with the mock runtime.
  2. Start Desktop and connect it to the Local Edge URL.
  3. Select an allowlisted workspace.
  4. Run a read-only task before testing writes.
  5. Confirm that transcript, events, diff/artifact, and final state render correctly.

Expected evidence:

EvidenceWhat to record
Edge healthloopback URL, health result, runtime preset
Desktop connectionUI URL, selected Edge URL, connected state
Workspaceallowlist status, not the private path in public screenshots
Runrun id, agent id, terminal status, artifact presence
Safetywrites blocked or approval shown before a mutation

If the mock runtime works but Claude Code, Codex, or OpenCode fails, debug the local CLI first. Do not move provider credentials into frontend code, public docs, screenshots, or browser storage.

Reviewable Diff

Use this workflow when the output must be inspected before it changes a repository, or when another person needs to review the result.

The user-visible sequence should be:

  1. A user starts a run with an explicit workspace and task.
  2. The runtime adapter streams progress events.
  3. Edge extracts file changes and produces a diff artifact.
  4. Desktop/Web shows the diff as reviewable state, not as a completed fact.
  5. A write, apply, commit, or publish step requires explicit approval.

The important product boundary is that AgentHub should make the work observable and reviewable. The runtime still performs the actual agent work, and the repository remains the source of truth for code history.

Team Collaboration

Use this workflow when a run should be visible to a team or across multiple devices.

Hub Server becomes required when you need:

  • TokenDance ID authenticated users;
  • project and member visibility;
  • session and message history;
  • device or Edge routing targets;
  • audit events for approvals, failures, and sensitive actions.

Web is Hub-backed. It should not directly call Local Edge, read local files, or start local CLI processes. Desktop can connect to Local Edge for local execution; Web should go through Hub and authorized targets.

Remote Routing

Remote/Cloud Edge is still in development. Public docs should describe the intended boundary without claiming general availability.

Before a remote run can be considered release-ready, the implementation needs evidence for:

RequirementWhy it matters
Target authorizationHub must decide whether the user or session may use that Edge
Device identityHub must know which Edge is online and trusted enough for the task
Workspace policyEdge must enforce allowlists and local policy before file access
Audit trailapprovals, denials, routing decisions, and failures must be traceable
Degraded statesoffline Edge, stale device, denied workspace, and runtime unavailable need stable errors

Feishu/Lark Task

Feishu/Lark is a collaboration entry, not AgentHub login.

The expected flow is:

  1. A message or card action reaches the Integration Gateway.
  2. The Gateway verifies the Feishu/Lark event and acknowledges quickly.
  3. Slow AgentHub work is queued asynchronously.
  4. The Gateway resolves the Feishu user to a TokenDance ID binding.
  5. Hub Server creates or updates an AgentHub task under product-local authorization.
  6. Progress is reflected back through a card, message, H5/workbench view, or Web session.

Keep verification tokens, app secrets, encrypt keys, tenant tokens, and OAuth refresh tokens server-side or inside TokenDance ID. Do not store them in Desktop or Web clients.

Adapter Development

Use this workflow when integrating a new runtime or improving Claude Code, Codex, OpenCode, or a custom agent adapter.

An adapter should produce stable AgentHub events for:

  • run started, completed, failed, cancelled;
  • model text and message deltas;
  • tool calls and tool results;
  • file changes, diffs, artifacts, and previews;
  • permission or user-input requests;
  • runtime unavailable, timeout, and schema validation failure.

The adapter contract is shaped, but public SDK package names and import paths should remain conservative until they are published and versioned.

Public Release

Use this workflow when changing the product site, docs, SEO files, public screenshots, or release claims.

Minimum release evidence:

GateRequired evidence
Docs parityzh/en pages and navigation cover the same claims
Discoveryrobots.txt, sitemap.xml, and llms.txt include changed routes
Searchdocs search index includes new pages and important terms
Securityno secrets, private paths, rollback commands, or real tokens in public files
Visual QAdesktop and mobile pages show no overflow or obsolete visual language
Governanceworkspace root public surface, i18n, design, freshness, and governance checks pass or warn only on accepted debt

Status Language

Use these words consistently:

StatusMeaning
Livepublic page or endpoint is deployed and smoke-tested
Preview-readylocal or public preview path exists and can be verified
Contract shapedinterface direction is documented, but public SDK stability is not promised
In progressimplementation exists but is not release-ready
In developmentplanned or actively being built; do not present as generally available