Prerequisites
Install the NATS CLI:Streams Overview
MESSAGE, INSTANCE, REACTION, SESSION_PROMPTS.
Inspect a Stream
Read Messages
Last message on a subject
Specific sequence number
Pretty-print JSON payload
Consumer Status
All consumers with positions
Ravi consumers
ravi-messages (MESSAGE), ravi-instances (INSTANCE), ravi-reactions (REACTION), ravi-prompts (SESSION_PROMPTS).
Live Subscribe
Watch events in real time (plain NATS pub/sub, not JetStream):Replay Messages
Create a temporary consumer
Subscribe and receive all messages from a specific sequence:Force reprocessing
Delete the ravi consumer and restart the daemon. Ravi recreates consumers withDeliverPolicy.New on startup:
Check IngestMode
New messages should haveingestMode: "realtime". History-sync messages have ingestMode: "history-sync" and are skipped by ravi.
Using ravi events stream
Ravi has a built-in event streaming command that wraps NATS subscriptions with formatting:
Using ravi events replay
Use replay for persisted JetStream history. It reads stored stream messages, applies filters, then prints a chronological slice:
--stream MESSAGE,CUSTOM,SYSTEM--subject "message.received.>"--since 15m,--since 2026-04-19T11:35:00Z, or epoch milliseconds--until 5m--contains "text"--where "path=value;path~=text;path!=value"--session,--chat,--agent--jsonor--raw
--session attempts to resolve a Ravi session locally. When found, it matches the session name, session key, and channel chat id, so a replay can include both internal session events from RAVI_EVENTS and channel events from MESSAGE/REACTION/SYSTEM.
For complete session reconstruction, include RAVI_EVENTS. MESSAGE alone only captures channel events; it does not capture internal runtime events such as consumed prompts, turn interrupts, tool activity, responses, delivery, or abort requests.
Delivery events use status: "delivered" | "failed" | "dropped" so replay can distinguish a sent response from a silent/drop/missing-target/send-error case.
Common Debugging Scenarios
Messages not arriving
- Check if omni is publishing:
nats sub "message.received.>" --server nats://127.0.0.1:4222 - Check consumer position:
nats consumer report MESSAGE --server nats://127.0.0.1:4222 - Check ingestMode: history-sync messages are skipped
- Check daemon logs:
ravi daemon logs -f
Bot not responding
- Check if prompts are being published:
nats sub "ravi.session.*.prompt" --server nats://127.0.0.1:4222 - Check SESSION_PROMPTS consumer:
nats consumer report SESSION_PROMPTS --server nats://127.0.0.1:4222 - Check if responses are being emitted:
nats sub "ravi.session.*.response" --server nats://127.0.0.1:4222 - Check Gateway delivery:
ravi daemon logs -f | grep gateway
Trigger not firing
- Check if events match the topic:
nats sub "<trigger-topic>" --server nats://127.0.0.1:4222 - Check cooldown: trigger may be in cooldown window
- Check blocked topics:
.prompt,.response,.claudetopics are blocked - Test manually:
ravi triggers test <id>