Skip to main content

Prerequisites

Install the NATS CLI:
Connection shortcut:

Streams Overview

Streams: MESSAGE, INSTANCE, REACTION, SESSION_PROMPTS.

Inspect a Stream

Shows subjects, retention policy, message count, consumer count, and first/last sequence.

Read Messages

Last message on a subject

Specific sequence number

Pretty-print JSON payload

Consumer Status

All consumers with positions

The “ack floor” shows the last processed sequence number.

Ravi consumers

Consumer names: 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:
Or from the beginning:

Force reprocessing

Delete the ravi consumer and restart the daemon. Ravi recreates consumers with DeliverPolicy.New on startup:
This only reprocesses new messages arriving after restart.

Check IngestMode

New messages should have ingestMode: "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:
Useful flags:
  • --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
  • --json or --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

  1. Check if omni is publishing: nats sub "message.received.>" --server nats://127.0.0.1:4222
  2. Check consumer position: nats consumer report MESSAGE --server nats://127.0.0.1:4222
  3. Check ingestMode: history-sync messages are skipped
  4. Check daemon logs: ravi daemon logs -f

Bot not responding

  1. Check if prompts are being published: nats sub "ravi.session.*.prompt" --server nats://127.0.0.1:4222
  2. Check SESSION_PROMPTS consumer: nats consumer report SESSION_PROMPTS --server nats://127.0.0.1:4222
  3. Check if responses are being emitted: nats sub "ravi.session.*.response" --server nats://127.0.0.1:4222
  4. Check Gateway delivery: ravi daemon logs -f | grep gateway

Trigger not firing

  1. Check if events match the topic: nats sub "<trigger-topic>" --server nats://127.0.0.1:4222
  2. Check cooldown: trigger may be in cooldown window
  3. Check blocked topics: .prompt, .response, .claude topics are blocked
  4. Test manually: ravi triggers test <id>