Collaboration hub

From sunholo-data/ailang · View interactive version

Collaboration hub is an AI agent skill from the GitHub repository sunholo-data/ailang. Develop and debug the AILANG dashboard server (`ailang serve`), a headless API with no UI — OTLP/hook ingest, observatory and chains reads, secret-approval intake, /benchmarks/ data, /health. Use when changing internal/server routes or handlers, diagnosing span hierarchy or missing telemetry, or che

How to use this skill

Skill file

Dashboard API (Collaboration Hub server)

ailang serve is a headless API — the React UI was removed in November 2026

(design_docs/planned/m-dashboard-headless-api.md). It runs locally on the rig

(dev.ailang.server, 127.0.0.1:1957) and on Cloud Run (ailang-dashboard,

ailang-dev-dashboard, ailang-test-dashboard). Inspect work with the CLI:

ailang chains, ailang chains dashboard <spans|traces|inbox|hierarchy|sessions|tools|stats|health>,

ailang coordinator pending|approve|reject.

Quick Start

make services-start         # Start server + coordinator
make services-status        # Check both services
make services-restart       # Rebuild and restart
curl -s localhost:1957/health

Before changing a route

internal/server/read_auth_test.go (TestReadAuth_EveryRouteClassified): a new route is

gated by default and fails that test until it is classified.

.claude/, cmd/ailang, the docs site (docs/src/lib/benchmarkFetch.js), and the

ailang-multivac / ailang-demos repos.

Architecture

Available Scripts

`scripts/diagnose.sh <command>`

.claude/skills/collaboration-hub/scripts/diagnose.sh health          # Server + DB check
.claude/skills/collaboration-hub/scripts/diagnose.sh task <id>       # Task details
.claude/skills/collaboration-hub/scripts/diagnose.sh spans <task_id> # Span hierarchy
.claude/skills/collaboration-hub/scripts/diagnose.sh orphans         # Find orphan spans
.claude/skills/collaboration-hub/scripts/diagnose.sh costs           # Cost breakdown
.claude/skills/collaboration-hub/scripts/diagnose.sh recent          # Recent activity

Key API Endpoints

On a non-loopback bind every /api/ read needs Authorization: Bearer $AILANG_DASHBOARD_TOKEN

(the server's COORDINATOR_API_KEY); a loopback server is exempt.

Observatory:

Control plane (read by ailang chains dashboard):

Approvals: coordinator task approvals go through the CLI (`ailang coordinator

approve|reject, --remote gcp` for the cloud plane). Secret approvals use

POST /api/approvals (own ID-token auth) and the signed ntfy link.

For the complete API reference: resources/rest_api_reference.md

Hierarchy & Trace Correlation

The hierarchy API applies three levels of virtual re-parenting:

  1. Timestamp Correlation - Fixes ailang.* spans under exec.tool_use
  2. Cross-Trace Merging - Links spans across different trace IDs
  3. Session-Based Merging - Links orphan traces by session.id

Why use hierarchy API? Child spans don't have task_id set. The hierarchy endpoint expands traces to include ALL spans.

For detailed algorithm: See resources/hierarchy_algorithm.md

Troubleshooting

Event shows no spans

  1. Run: scripts/diagnose.sh task TASK_ID
  2. Check hierarchy API: curl localhost:1957/api/observatory/tasks/TASK_ID/hierarchy
  3. Check spans exist: scripts/diagnose.sh spans TASK_ID

Missing child spans (exec.turn, etc.)

Use hierarchy API, not direct spans API:

# Wrong - only spans with task_id
curl "/api/observatory/spans?task_id=X"

# Correct - all spans in linked traces
curl "/api/observatory/tasks/X/hierarchy"

For database diagnostics: See resources/database_diagnosis.md

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.