Skip to content

WebSocket Events

Atomic broadcasts realtime events over a WebSocket endpoint:

ws://localhost:8080/ws?token=<token>

Use wss:// when Atomic is behind HTTPS.

The WebSocket token is passed as a query parameter:

/ws?token=<your-token>

Use a dedicated token for long-running integrations where possible.

Server events are JSON objects with a type field:

{
"type": "EmbeddingComplete",
"atom_id": "uuid"
}

The React frontend normalizes these to kebab-case event names, but raw WebSocket clients receive the original server event shape.

Raw server event types:

  • EmbeddingStarted
  • EmbeddingComplete
  • EmbeddingFailed
  • TaggingComplete
  • TaggingFailed
  • TaggingSkipped
  • BatchProgress
  • PipelineQueueStarted
  • PipelineQueueProgress
  • PipelineQueueCompleted
  • EventsLagged

Frontend-normalized names include embedding-started, embedding-complete, tagging-complete, batch-progress, pipeline-queue-started, pipeline-queue-progress, pipeline-queue-completed, and server-events-lagged.

  • AtomCreated
  • AtomUpdated

These are emitted when atoms are created or updated through API, bulk create, or MCP paths that broadcast lifecycle events.

  • ImportProgress
  • IngestionFetchStarted
  • IngestionFetchComplete
  • IngestionFetchFailed
  • IngestionSkipped
  • IngestionComplete
  • IngestionFailed
  • FeedPollComplete
  • FeedPollFailed

These power progress UI for Obsidian import, URL ingestion, browser clipping, iOS share ingestion, and feed polling.

  • ChatStreamDelta
  • ChatToolStart
  • ChatToolComplete
  • ChatComplete
  • ChatCanvasAction
  • ChatError

The message send endpoint returns a final response, but the UI receives streaming deltas and tool events over WebSocket.

  • BriefingReady

The payload includes db_id and briefing_id.

The server uses a broadcast channel. If a client falls behind, it can receive an EventsLagged event with the number of skipped events. Clients should reconcile state by refetching the relevant resource, such as atoms, pipeline status, or the latest briefing.