main agent answers you in the terminal with the provider you chose, and everything comes back after a reboot.
Before you start
You need a macOS or Linux machine with:-
Bun 1.0 or newer, with
~/.bun/binon yourPATH. Install it from bun.sh, then open a new shell. Ravi runs on Bun, and the setup wizard installs global tools withbun add -g, which puts them in~/.bun/bin. - Node.js 18 or newer. Ravi runs its processes under PM2, and PM2 requires Node.js 18 or newer.
-
A model credential. For Claude: a Claude Code OAuth token (
sk-ant-oat01-..., printed byclaude setup-tokenin Claude Code) or an Anthropic API key. For Codex: thecodexCLI on yourPATH. -
PostgreSQL for Omni. Ravi needs a NATS server with JetStream, and
ravi setupgets one by installing Omni, which also bridges WhatsApp. Omni keeps its data in PostgreSQL. By defaultomni installuses an embedded server (pgserve, installed by autopg); when that is not on yourPATH, it falls back topostgresql://postgres:postgres@localhost:5432/omni. Either install autopg with the command Omni suggests, or have PostgreSQL reachable at that URL: - Free ports 4222 (NATS) and 8882 (Omni API).
These docs follow the
next release channel (ravi.bot@next). The latest channel is older and lacks Bases, the one-command ravi pages ship, the explicit-only permission profile and governed chats.Install
1
Install the CLI
ravi update --next moves it to the next channel. On a host that already runs Ravi, always update with ravi update, never with bun add -g: ravi update stops and starts the daemon and the channel runner on the new release. On a global install whose daemon wrote a boot record (3.261104.2 on), it also keeps a snapshot of the state and rolls back on its own when the new release does not come up; a source checkout or an older release has neither. ravi update --rollback shows how to go back to the release before the last update, with its state; add --execute to do it.2
Run the setup wizard
The wizard prints “Configuração completa!” even when an Omni or PM2 step ended in a warning, so read any warning lines above it. If the daemon did not prepare its state, the wizard skips steps 4 and 5 and prints “Configuração incompleta” instead: the usual cause is that
nats-server is not running, because the daemon is ready only after it connects to it. Check that, read ravi daemon logs and, once it shows Daemon ready, run ravi setup again. Its final hint, ravi agents chat main, is not a real command. Use the commands in Talk to your agent instead.3
Create the agent's instructions file
~/ravi/main/AGENTS.md, a stub you edit to tell the agent who it is and how to work, plus a CLAUDE.md bridge that points to it.Choose the model provider
The built-in default provider iscodex, but the wizard collects a Claude credential. Until you change it, ravi agents show main prints Provider: codex (runtime_default) and the Claude credential goes unused. We recommend Claude.
- Claude (recommended)
- Codex
With a Claude Code OAuth token, store it as the agent’s credential. This writes In both cases, finish with:
read -rs keeps the token out of your shell history:CLAUDE_CODE_OAUTH_TOKEN to ~/.ravi/.env and attaches it as a runtime credential for main.With an Anthropic API key, there is nothing to store if you gave it to the wizard. Otherwise:ravi agents set also moves existing sessions of main to the new provider. The restart makes the daemon reload ~/.ravi/.env. ravi daemon restart always needs -m with a reason.The OAuth credential is limited to the agents listed in
--agents (default main). When you add more agents that use Claude, run the configure command again with --agents main,<other-agent>.Check that it runs
ravi daemon status should list ravi, omni-nats and omni-api as online. ravi agents show main should show Provider: claude (agent_default), or codex if you chose Codex.
ravi doctor inspects the whole install. On a new install it reports errors for parts you have not set up yet:
Talk to your agent
main for the agent main, sends the prompt and waits for the reply. -a main is required the first time, because the session does not exist yet.
Turns you start from the terminal run with the agent’s whole permission ceiling, and nothing in them can ask for approval. The next page explains the ceiling and how to raise it.
Keep it running after a reboot
PM2 restarts Ravi’s processes if they crash. To start them again after a reboot:pm2 save again whenever PM2 gets a new process, for example after ravi channels start when you connect Slack.
Update
next build, remembers the channel, and reconciles the managed daemon and channel runner with the updated bundle. Every managed process that was online is restarted; stopped processes are not started. Restart is a required part of ravi update: there is no --no-restart bypass. Native channel intake is interrupted while the runner restarts.
Once you have run it with --next, a plain ravi update stays on next. Before that, a plain ravi update installs latest. ravi update --stable switches to latest, and --version <version> installs one exact release. After a manual package install, inspect ravi daemon status --json and ravi channels status --json; the installed version alone does not prove what either process is running.
Run without Omni (Slack only)
Run your own NATS server instead of Omni
Run your own NATS server instead of Omni
Ravi only needs a NATS server with JetStream at The daemon comes first because it is what creates the state database;
NATS_URL (default nats://127.0.0.1:4222). Omni is one way to get it. If you will only use Slack, you can run NATS yourself and skip Omni and PostgreSQL. This is an advanced path.ravi setup always tries to install Omni, whose omni-nats would compete for port 4222, so run these commands in place of the wizard (step 2 above):ravi settings set before it fails with STATE_SCHEMA_NOT_READY. On a new machine ravi daemon start returns once the daemon has prepared its state, so the next command can use it. If the daemon does not get ready within 45 seconds, the command warns on stderr and still exits 0. The usual cause is that nats-server is not running: check your nats process with pm2 ls, read ravi daemon logs, and wait for Daemon ready before ravi settings set.Then continue with step 3 and Choose the model provider. -js turns on JetStream, which Ravi requires.The daemon logs Omni not configured and Creating gateway without omni. Slack does not go through Omni, so you can ignore both. ravi daemon status shows omni-nats and omni-api as not managed by PM2; use pm2 ls to see your nats process.If NATS runs on another host or port, add NATS_URL=nats://<host>:<port> to ~/.ravi/.env (or open it with ravi daemon env) and run ravi daemon restart -m "nats url".Next
Make yourself the owner
Set the agent’s permission ceiling and make your own contact the one that can do everything and approve requests.