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.2
Run the setup wizard
The wizard prints “Configuração completa!” even when a step failed, so read any warning lines above it. 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 restarts the Ravi processes in PM2 (add --no-restart to skip that). 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.
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 Then continue with step 3 and Choose the model provider.
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):-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.