health_check
Check relay process liveness and live metrics, including agent counts, pending messages, task queues, and version details. Returns status and uptime for monitoring and upgrade validation.
Instructions
Report relay process health + live counts.
When to use: liveness probes (/health HTTP endpoint mirrors this surface), version-pinning checks during upgrades, dashboard footers. Cheaper than get_standup for binary up/down questions.
Behavior: pure read. Counts agents by presence, pending messages, active and queued tasks, channels, and webhook subscriptions. Reports version (from package.json via the v2.1 Phase 4a single source of truth) + protocol_version (the client-compat surface, distinct from package version). Works on stdio AND HTTP transports. No capability required, intentionally observable.
Returns: { status: 'ok', version, protocol_version, transport, uptime_seconds, legacy_grace_active, agents: {...counts}, messages: {...counts}, tasks: {...counts}, channels, webhooks }. When the caller presents a token (arg / header / env), the response also includes token_validated: true, auth_error: boolean, and (on validation failure) auth_error_reason, plus agent_name + auth_state on success.
Errors: none expected (status='ok' is the only success shape).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. |