Discover topics on your install
The topic list changes between releases, so ask the CLI instead of trusting a copy:ravi events replay reads the persisted streams. It defaults to the last 15 minutes and 100 events; --where 'path=value' and --contains <text> narrow it further.
To act on an event, create a trigger. The topic is a NATS pattern (* is one token, > is the rest), and --filter tests the event data:
The catalog is a set of templates, not a whitelist: a trigger can listen on any subject. Three rules prevent loops. Triggers never subscribe to
ravi.session.*. Events whose topic contains :trigger: (published from a trigger’s own session) are skipped. Events whose data carries _trigger: true are skipped.Topic families
“Trigger” means the family is meant for triggers. “Replay” means it is kept in theRAVI_EVENTS stream for ravi events replay.
The
ravi.session.* and internal families are for observing and debugging. Do not build triggers on them.
Streams
Ravi creates these JetStream streams:
Omni owns three streams that the daemon reads with durable consumers. Each consumer starts at new messages, so the daemon does not replay history when it first connects.
Omni subjects
Omni publishes<eventType>.<channelType>.<instanceId>, for example:
metadata.ingestMode is realtime or history-sync. History-sync messages are recorded in Ravi’s chat history but never start a turn. Omni reactions are republished as ravi.inbound.reaction, and pairing events as ravi.whatsapp.qr.<instanceId> and ravi.whatsapp.connected.<instanceId>, so you can trigger on the Ravi topics instead of Omni’s.
Native Slack does not go through Omni subjects. Its reactions and interactions arrive on the same ravi.inbound.* topics.
Payloads you will use
Trigger filters and message templates address the payload asdata.<path>.
ravi.inbound.reaction
reaction_added. targetMessageId is the id of the message that got the reaction; keep your own mapping from message id to business state if a routine needs it.
ravi.audit.denied
missingPrincipals and recommendedGrantSubjects name who lacks the permission and who to grant it to if the denial was wrong. See Permissions.
CLI command audit
When an agent session runs a command, Ravi publishesravi.<sessionKey>.cli.<group>.<command>, for example ravi.agent:main:main.cli.contacts.add. Commands run outside a session publish ravi._cli.cli.<group>.<command>.
tool is <group>_<command> (for example contacts_add). outcome is succeeded, blocked, usage_error, denied or failed. Inputs, and the output of session commands, are sanitized and truncated before they are published.
ravi.console.inbox.item
When you are logged in to the Console, the daemon polls the agent inbox every 15 seconds and publishes each item here:
ravi.watch.<connector>.<eventType>, for example ravi.watch.console.bug.status for a bug report you follow.
Bases events have category: "bases". Turn them on per base with ravi bases subscribe <base> (optionally filtered with --events, --props and --view, and with --trigger to create the trigger too).
Related
- Triggers: create, test and tune triggers.
- Architecture: which process publishes what.
- Troubleshooting: tracing a message that got no answer.