Get agent connection state
Returns unified live connection state for a single agent instance.
The response shape is identical for hosted (HTTP callback) and
connected (WebSocket) deployments; switch on the transport and
connection_status fields to render.
Data is sourced from the gateway’s agent_instances row, which
the mesh keeps up to date via the internal
/internal/agents/record_* write path on every dispatch and WS
lifecycle event. That row is the single source of truth — there
is no need to cross-reference the mesh /metrics endpoint except
for aggregate fleet telemetry.
Non-super callers can only query instances in their own tenant;
super-admins may pass tenant_id in the body to narrow the
lookup, or omit it for a global search by instance_id.
Body
Response
Connection state for the instance.
Unified connection-state envelope for a single agent instance. Shape is identical regardless of deployment_mode: hosted agents report transport=callback, connected agents report transport=ws. The dashboard renders the same card for either, switching only on the transport and connection_status fields.
Maintained by the mesh write path (/internal/agents/record_*) against the agent_instances row. The gateway row is the single source of truth — clients should not cross-reference the mesh /metrics endpoint except for aggregate fleet-wide telemetry.
