Skip to main content

WebSocket Message Reference

Quick reference table for all message types exchanged between agents and the control plane.

Auth-challenge is the enforcement path

Capabilities and resource limits are embedded in the VaultysId Challenger certificate produced by the auth_challenge / auth_complete handshake — not delivered as a separate policy document. The update_capabilities message triggers a fresh handshake when a policy changes.


Agent → Control Plane

TypeWhen sentKey fields
registerImmediately after WS connect (new agent)name, publicKey, capabilities
resultAfter executing an intentintentId, status, output, error
heartbeatEvery 30 secondsuptime, memory, activeLlm, tokenUsage
tool_approval_requestAgent needs human approval before using a toolrequestId, toolName, args, conversationId
chat_messageStreaming chat request from control plane UIconversationId, messages
chat_responseStreaming LLM response chunkconversationId, chunk, done, error, errorCode
task_statusTask queue status updatetaskId, status, result, error, action, retryCount
get_chat_sessionsRequest list of chat sessionslimit
get_chat_historyRequest message history for a sessionsessionId

Control Plane → Agent

TypeWhen sentKey fields
auth_challengeStart (or restart) of auth handshakesessionId, data (base64 cert)
auth_completeAuth handshake succeededagentId, did, capabilities
auth_failedAuth handshake failedreason
registration_pendingNew agent awaiting admin approvalregistrationId, message
registration_approvedAdmin approved a pending registrationregistrationId, capabilities
registration_rejectedAdmin rejected a pending registrationregistrationId, reason
update_capabilitiesPolicy changed — triggers re-authcapabilities, resourceLimits, policyId, policyExpiresAt, reason
intentRoute work to agentaction, params, userDid
delegation_updatePush delegation certificate changesdelegations[]
agent_peer_catalogDeprecated — peer-to-peer agent grants removed
tool_approval_responseAdmin decision on a tool approvalrequestId, approved, reason
llm_configPush LLM configurationconfig (or null to revert to env vars)
skills_configPush skill enable/disable configurationskills[]
channel_message_sendDeliver a channel message to an @mentioned agentchannelId, messageId, content, authorDid, threadId, createdAt
task_enqueueEnqueue a task on the agentaction, params, priority, scheduledAt, maxRetries
schedule_updateAdd or update a cron scheduleid, name, cron, action, params, enabled
schedule_deleteRemove a scheduleid
chat_sessions_responseReply to get_chat_sessionssessions[]
chat_history_responseReply to get_chat_historysessionId, messages[]
pongHeartbeat acknowledgement
errorProtocol-level errorcode, message

update_capabilities payload

This message is sent by the control plane whenever a policy is created or revoked for an agent. The agent stores the payload, sets reAuthPending = true, and waits for the subsequent auth_challenge to reissue the certificate.

interface WSUpdateCapabilitiesPayload {
/** Updated capability list. */
capabilities: AgentCapability[];
/** Runtime limits to embed in the new certificate. null clears existing limits. */
resourceLimits?: ResourceLimits | null;
/** ID of the authorising governance policy. null when revoked. */
policyId?: string | null;
/** ISO 8601 expiry. Agent rejects intents after this time. null = no expiry. */
policyExpiresAt?: string | null;
/** Human-readable reason (informational only). */
reason?: string;
}

auth_challenge / auth_complete — capability embedding

The auth_complete message carries capabilities in its payload as a convenience, but the authoritative source is the co-signed Challenger certificate. The agent reads governance metadata directly from ctx.metadata.pk2:

// Inside handleAuthComplete (agent.ts)
const pk2 = ctx.metadata?.pk2;
this.resourceLimits = pk2?.resourceLimits ?? null; // native ResourceLimits object
this.policyId = pk2?.policyId ?? null; // string | null
this.policyExpiresAt = pk2?.policyExpiresAt ?? null; // ISO 8601 string | null

All values are stored as native JavaScript types — no JSON parsing required.


Deprecated messages

TypeStatusReplacement
policy_updateDeprecated — kept as no-op for backward compatibilityupdate_capabilities + auth_challenge re-auth
policy_ackDeprecated — no longer sent

The policy_update message was the old mechanism for pushing signed policy documents to agents. It has been superseded by the certificate-embedding approach, which is tamper-evident and offline-verifiable.