Skip to main content
POST
Get agent connection state

Body

application/json
instance_id
string
required

Agent instance identifier.

tenant_id
string

Super-admin-only override. Ignored for non-super callers, whose tenant is always read from the auth context. When a super-admin omits this, the lookup is global by instance_id.

Response

Connection state for the instance.

ok
boolean
required
connection
object
required

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.