WebSocket streaming (search & delta)

WebSocket streaming (search & delta)

Quick Search and Deep Research can be run over a WebSocket to receive live, streamed results (investigation steps, progress, and the answer token by token) instead of waiting for one HTTP response. Delta (multi-file comparison) streams the same way.

These endpoints need a signed-in console session, not an API key. They authenticate with the session token the console holds, and an API_KEY header is refused with a 403. This page documents the protocol the console uses; it isn’t currently callable from an API-key integration.

If you’re integrating over the API, run the same searches over HTTP (POST /api/v1/files/{fileId}/searches/quick or /deep, see the quickstart) and use webhooks to be told when a long investigation finishes.

Connecting

Open a WebSocket to one of:

EndpointPurpose
GET /ws/v1/search/quickStreamed Quick Search
GET /ws/v1/search/deepStreamed Deep Research
GET /ws/v1/delta/quickStreamed Delta quick comparison
GET /ws/v1/delta/researchStreamed Delta deep comparison

Authenticate with a short-lived JWT as the token query parameter (API keys are header-only and not accepted in a URL, see Authentication):

wss://api.logcat.ai/ws/v1/search/deep?token=<jwt>

Sending the request

After the socket opens, send one JSON frame describing what to investigate:

{
  "query": "Why did this device reboot during video playback?",
  "entity_type": "bugreport",
  "entity_id": "a1b2c3d4-..."
}

entity_id is the file (or bundle/delta) id you’re investigating, and entity_type says what kind of thing it is.

You don’t have to work entity_type out yourself: send back the file_type that GET /api/v1/files/{fileId} returned for that file. The platform classifies every upload on ingest, and the value it reports is the value this frame expects.

The full set:

entity_typeThe file it belongs to
bugreportAn Android bugreport
logcatA logcat capture
dmesgA kernel log
logAny other text log: syslog, journalctl, candump, and most vendor text exports
perfettoA Perfetto trace
pcapA network capture (pcap/pcapng, btsnoop)
ramdumpA kernel ramdump
configA device or network config file
bundleA multi-file archive, searched across all its files

Any other value is rejected.

Receiving the stream

The server streams back a sequence of JSON messages, each of the shape:

{ "type": "<message-type>", "data": { ... }, "error": null }

type is one of seven values:

TypeMeaning
stepAn investigation step the agent took (Deep Research).
stageA high-level pipeline stage transition.
progressIncremental progress update.
query_intentThe interpreted intent / plan for a query.
report_chunkA chunk of the final answer, streamed as it’s generated.
completeThe stream is finished; the full result is available.
errorSomething failed; error carries the detail.

Concatenate report_chunk payloads to assemble the final answer as it streams. Stop on complete (success) or error (failure).

Next steps

  • API quickstart: the non-streaming HTTP search equivalents.
  • Webhooks: get told when an investigation finishes, without holding a connection open.