Skip to main content

WebSocket Channels

All real-time updates flow over a single Socket.IO connection. The frontend subscribes to per-job channels (Socket.IO rooms); events are namespaced entity:event. This page catalogs every channel the backend emits, verified against websocket_emitter.py.

For how emissions travel from Celery workers to your browser, see System Architecture.

Job progress channels

ChannelEventsEmitted during
datasets/{id}/progressdataset:progress, dataset:completed, dataset:errorDataset download/processing
datasets/{id}/tokenization/{tok_id}tokenization:progress, tokenization:statusTokenization jobs
models/{id}/progressmodel:progress, model:completed, model:errorModel download/quantization
models/{id}/extractionextraction progress eventsActivation extraction (Stage 1)
trainings/{id}/progresstraining:progress, training:completed, training:failed, training:status_changedSAE training (includes live loss/L0/dead-neuron metrics)
trainings/{id}/checkpointscheckpoint:createdCheckpoint saves
trainings/{id}/deletiondeletion progressTraining deletion
extraction/{id}extraction:progress, extraction:failed, extraction:deleted, extraction:deletion_progressFeature extraction jobs (Stage 2)
sae/{id}/downloadsae:downloadSAE download from HuggingFace
sae/{id}/uploadsae:uploadSAE upload to HuggingFace
sae/{id}/extractionsae:extractionPer-SAE feature-extraction progress
labeling/{job_id}/progresslabeling progress eventsBulk labeling
labeling/{job_id}/resultsincremental resultsBulk labeling (labels stream in as they're produced)
enhanced_labeling/{job_id}enhanced_labeling:progress, enhanced_labeling:completed, enhanced_labeling:failedEnhanced two-pass labeling
steering/{task_id}steering:progress, steering:completed, steering:failedAsync steering generation
neuronpedia/{job_id}/exportexport:progressNeuronpedia ZIP export
neuronpedia/push/{push_job_id}neuronpedia:push_progress, neuronpedia:push_completed, neuronpedia:push_failedDirect push to local Neuronpedia
extractions/{id}/feature-groupsfeature_groups:progress, feature_groups:completed, feature_groups:failedCross-feature clustering precompute
mcp/approvalsapproval:created, approval:resolvedAgent steering approval queue (operator-approval mode)

Circuit runs

Circuit discovery, validation, calibration, and steering-transcript jobs run asynchronously on Celery workers and stream progress over a family of channels sharing one shape: circuit-{kind}/{id}, with events circuit_{kind}:progress, circuit_{kind}:completed, and circuit_{kind}:failed. The {kind} slug appears in both the channel and the event name (the house namespaced-event convention). Every one is emitted by the emit_circuit_run_* helpers in websocket_emitter.py.

completed and failed events are sent with delivery retries; progress events carry progress (0–100), status, and a human-readable message.

ChannelEvents{id} isEmitted during
circuit-capture/{id}circuit_capture:progress, circuit_capture:completed, circuit_capture:failedcapture run idPer-token multi-layer SAE activation capture (rung 0 input)
circuit-discovery/{id}circuit_discovery:progress, circuit_discovery:completed, circuit_discovery:faileddiscovery run idCircuit discovery (rung 0)
circuit-attribution/{id}circuit_attribution:progress, circuit_attribution:completed, circuit_attribution:faileddiscovery run idAttribution pass (rung 1)
circuit-validation/{id}circuit_validation:progress, circuit_validation:completed, circuit_validation:failedvalidation run idEdge-intervention validation (rung 2)
circuit-faithfulness/{id}circuit_faithfulness:progress, circuit_faithfulness:completed, circuit_faithfulness:failedcircuit idCircuit faithfulness scoring
circuit-calibration/{id}circuit_calibration:progress, circuit_calibration:completed, circuit_calibration:failedcircuit idUsable-band strength calibration (onset + correctness cliff)
circuit-calibration-reproduce/{id}circuit_calibration-reproduce:progress, circuit_calibration-reproduce:completed, circuit_calibration-reproduce:failedcalibration-manifest idCalibration reproduce-from-manifest run
circuit-steering-record/{id}circuit_steering-record:progress, circuit_steering-record:completed, circuit_steering-record:failedrecord-run idSteered Transcript Recorder (dial/prompt/unsteered/steered capture)

System monitoring

Emitted every 2 seconds by a Celery Beat task; all use the event system:metrics, and payloads carry a metric_type discriminator.

ChannelPayload
system/gpu/{gpu_id}Per-GPU utilization, memory, temperature, power
system/cpuCPU utilization
system/memoryRAM and swap usage
system/diskDisk I/O rates
system/networkNetwork I/O rates

Client behavior

  • Subscription: React hooks subscribe on mount, unsubscribe on unmount; handlers update Zustand stores.
  • Polling fallback: every store detects WebSocket disconnection and falls back to HTTP polling automatically, then stops polling when the socket reconnects. A refresh is never required for correctness — the stores re-fetch authoritative state from REST on load.
  • Payload conventions: progress events include progress (0–100) and job-specific fields; failure events include error.

Finalization events

ChannelEventPayload
trainings/{id}training:completedstatus, progress (the run's real progress, not always 100), current_step, finalized_from_step, completed_at
trainings/{id}training:finalize_failedtraining_id, error

training:completed is emitted both by a normal completion and by a finalize. Consumers must not assume progress = 100: a run finalized from an early checkpoint reports the progress it actually reached.