Event Streams

A centralized event store that ingests events from every service. Query event history, roll it up into metrics, follow distributed traces, and stream updates in real time.

Key Concepts

Every meaningful action across the platform emits a typed event. Event Streams persists a metadata-only projection of each one, giving you a single place to answer "what happened, when, and in what order" without querying each service individually. It powers the platform activity dashboard and cross-service observability.

This service is read/observe-oriented. To react to events, use Automations; for the event model and payload shape, see the Webhooks & Events guide.

Events

Query historical events with filters for type, source service, actor, resource, and time range. Each stored event carries its event_type, originating service, the acting principal, a resource reference, and a metadata projection of the payload.

curl "https://platform.ergondata.ai/api/v1/event-streams/events?event_type=conversations.message.added&limit=50" \
  -H "Authorization: Bearer {token}"

Metrics & Traces

Beyond raw events, Event Streams exposes metrics — counters, timeseries, and distributions computed over the event history — and traces that stitch related events across services into a single causal view. Traces are invaluable for debugging multi-service flows like "inbound message → automation → agent invocation → outbound reply".

Real-Time Stream

Subscribe over WebSocket to receive events as they are ingested. This backs live activity feeds and dashboards without polling the query API.

const ws = new WebSocket(
  `wss://platform.ergondata.ai/api/v1/event-streams/ws/stream?token=${token}`
);

ws.onmessage = (event) => {
  const evt = JSON.parse(event.data);
  console.log(evt.event_type, evt);
};

Ready for field-level detail? See the Event Streams API Reference.