main answers you in a direct message and in a group, strangers cannot reach it, and you are the owner with full permissions.
Slack is the recommended channel (Connect Slack). Use WhatsApp when the people you work with live there.
WhatsApp runs through Omni, a separate service that
ravi setup installs. Omni holds the WhatsApp session as a linked device and runs the NATS server Ravi uses (omni-nats) plus an API (omni-api). A native WhatsApp channel without Omni is planned work and is not in this release.wa-main is the instance (Ravi’s record of the number), main is the agent, and 5511987654321 stands for your personal number: country code, area code and number, digits only, no + or spaces.
1
Check what you need
- A dedicated number with WhatsApp or WhatsApp Business active on a phone. Ravi links to it as a linked device, so the phone keeps the number.
- A second number to talk from. Messages sent from the connected number count as the agent’s own and never start a turn. You write to the agent from your personal number.
-
Ravi installed and answering in the terminal. Follow Install Ravi, then confirm:
If this fails, fix the provider first. WhatsApp will not work until this does.
-
Omni running.
ravi daemon statuslistsomni-natsandomni-apiasonline.
omni install uses a local pgserve (autopg) server when one is on your PATH and prints how to install it when it is not. To use a database you already run, pass it explicitly: omni install --database-url postgresql://user:pass@host:5432/omni.2
Link the number
With the daemon running:On the phone with the dedicated number, open WhatsApp, go to Settings > Linked devices > Link a device, and scan the latest code in your terminal. The command ends with
✓ Connected as <profile name>.- It waits up to 120 seconds. On
Timed out waiting for instance connection., run it again. connectcreates the instance in Omni and in Ravi. Do not runravi instances createfirst.- If the agent in
--agentdoes not exist,connectcreates it, so check the spelling. - In scripts,
--jsonreturns at the first QR ("status": "qr_required") and does not wait for the scan. Check the result later withravi instances status wa-main.
3
Lock who can reach the agent
status output, check that Connected is true, Agent is main, DM Policy is pairing and Group Policy is allowlist.pairing: only contacts with statusallowedreach the agent in DMs. Everyone else is saved for your review.allowlist: only groups you approved (an explicit route) reach the agent. Other groups are saved for review.
open, anyone who messages the number, and any group someone adds it to, reaches the agent. The WhatsApp policy questions in ravi setup do not configure instances. Policies are also what makes ravi contacts block work: under open, a blocked contact still reaches the agent. Change an existing instance with ravi instances set; re-running ravi instances create on it wipes its Omni id, agent and policies.4
Make yourself the owner
full-accesssets the agent’s ceiling: what any turn can do at most.contacts addcreates you with statusallowed, so you passpairingand your messages resolve to you. Without a contact, the agent still answers but runs with no tools. Do not pass--agenthere: it restricts the contact to the listed agents.permission-ownergives youadmin:system:*and makes you the person who can approve requests in chat.
5
Test a DM
From your personal phone, send Ask the agent to run Approving a contact only marks it
hi to the dedicated number. The agent replies within a few seconds. Then check from the terminal:ravi agents list. If it says it cannot use tools, your number did not resolve to your contact.No reply? Look at the review queue:allowed. If the daemon log says No route for message, saved as pending, the instance has no agent: run ravi instances set wa-main agent main.6
Add a group
- Group you create in the app
- Group Ravi creates
Create a group in WhatsApp with you and the dedicated number, then send a message in it. Under
allowlist it waits for review:pending list shows the group under Pending chats with its route pattern. Approving creates the route group:120363012345678901 → main. Send a new message after approving.You can also route a group directly. Find its id first:--account wa-main to ravi whatsapp group. Without it, the command uses the first enabled instance in alphabetical order, which is slack-main if you also connected Slack.How the agent behaves in groups
- There is no mention gate. Every message in a routed group reaches the agent.
- When a group has three or more known members, the agent is told to mostly stay silent and to answer when it is @mentioned or clearly useful. This is an instruction to the model, not a filter. In a group with only you and the number, it answers everything.
-
A contact’s reply mode (
autoormention) is stored but not enforced. Do not rely on it. -
Debounce combines messages that arrive close together into one prompt:
-
Start a message with
!!to record it without starting a turn, or with>>to deliver it when the current turn ends.
Optional: a group with other people
In a group without per-chat grants, every member whose number resolves to a contact gets the agent’s full ceiling. To keep tools to yourself, grant yourself a profile in that chat. The first grant makes the chat governed: other members keep chatting but get no tools until they receive their own grant.ravi.bot@latest. See Permissions for grants, denials and approvals.
Smoke test
Troubleshooting
More in Troubleshooting and Instances and routing.
Risks of using a personal number
Use a dedicated number. If you link your personal number instead:- Every DM and group of that number reaches Ravi. Right after a connect the policies are
open, so all your contacts get answers from the agent until you redo step 3. - You cannot talk to the agent from that number, because its messages count as the agent’s own.
- If the number is also linked to Omni as another instance, Omni drops its messages to prevent loops.
- Omni links through an unofficial WhatsApp client. WhatsApp can log the device out or ban the number.
- Your contacts and chats are stored in Ravi’s database as messages arrive.
dmPolicy closed (or pairing) and groupPolicy allowlist, and check them after every connect.