Skip to main content

Server-Sent Events (SSE)

The Agent's local API exposes live event streams — a client subscribes once instead of polling. Used internally by the Agent UI, and open to any local integration.

Where it lives: GET /api/v2/events/* on the agent's own API (default port 2220).

Streams​

EndpointFiresPayload
/events/offeringThe device's offering catalog changesVec<ProjectOfferingDto> — same shape as GET /device/offering
/events/deliveryAny delivery state changeThe native Delivery record
/events/deployAny deployment state changeThe native Deploy record
/events/notificationsA banner, warning, or error needs to reach the UINotificationEvent — kind, severity, category, message, optional entity reference
/events/getconfigThe device receives a new config from the serverThe full assembled config object — same shape as GET /config/file

Each stream's payload is self-contained — no follow-up REST call needed to react to an event.

Offering stream parameters​

/events/offering accepts the same query parameters as the offering REST endpoint:

ParamDefaultEffect
bypass_policyfalseSkip policy enforcement — availability is null on every release
include_updatesfalseInclude releases currently delivering, deploying, or already installed
offering_modeinstallOn a universal-platform device: install returns only this device's own platform/type offerings; download returns everything across all platforms and types

Managed-command channel (A2A / CDN)​

A separate channel, GET /api/cdn/events/managed/{device_id}, is the long-lived stream a managed child device opens after a confirmed A2A handshake. It emits typed commands (Discovery, Push, DeliveryStart, DeliveryStop, DeliveryCancel, DeliveryDelete, DeployStart, MetadataRequest) plus : ping keepalives. Registering the stream marks the device online on the parent; closing it marks it offline immediately. See A2A Parent-Side Device Management and CDN Configure.

Keepalive and cleanup​

Every SSE client is pinged every 10 seconds; a client that stops responding is pruned from the broadcast list automatically — no manual cleanup needed on either side.

See also​