All pages

Search

Search the docs.

Every page and section of these docs. Type words to keep the entries that contain all of them. The search runs in your browser.

Filtering needs JavaScript. Without it, this page lists every section of the docs, grouped by page.

  • Overview

    Install rh and capture your first session.

    Developer docs for rh, the RivetHub runtime that captures your coding agents’ sessions into one record you own: quickstart, capture, memory, the datahub, the…

  • Overview

    One command to start

    Linux or macOS $ curl -fsSL https://get.rivethub.io/local.sh | bash It verifies the release against its checksums, installs rh into ~/.local/bin and starts a…

  • Overview

    One binary, a few jobs

    Part What it does Capture rh capture hook, run from a tool’s own hook, posts the session to your node and spools it to disk when the node is down. Gateway rh…

  • Overview

    Two ways to run it

    One person, one machine Standalone rh local: one process and one SQLite file at ~/.rivethub/memory.sqlite. The fastest way to start. Quickstart Several…

  • Overview

    Where to look

    Sharing · Keeping the node running · Upgrading · Troubleshooting · Command-line reference · Operations reference · Memory service reference. Capture Which…

  • Quickstart

    From install to your first captured session.

    Install rh with one command, wire a coding tool with rh harness connect, and confirm your first captured session. No model, database or account needed.

  • Quickstart

    Install rh

    The installer picks the archive for your machine, verifies it against the release’s SHA256SUMS, puts rh and rivethub-migrate in ~/.local/bin and starts a…

  • Quickstart

    Connect a tool

    rh harness status lists the tools it finds on this machine. rh harness connect adds capture and recall where supported; it prints the diff and backs the file…

  • Quickstart

    See your first captured session

    Do a short task in the tool you connected, then read the capture log. Each capture appends one line: Claude Code; other tools write codex-capture.log,…

  • Quickstart

    Recall from any other MCP client

    Anything that speaks MCP can read the record. Add this entry to the client’s MCP configuration: { "mcpServers": { "rivethub": { "command": "rh", "args":…

  • Quickstart

    Next

    On Linux with a usable systemd user session, the installer leaves the node running as an enabled rivethub.service. It says whether the node starts at login or…

  • Capture

    The whole session, without changing how you work.

    How rh capture hook takes whole sessions (prompts, tool calls and results) from Claude Code, Codex, Grok Build, OpenCode and DeepSeek Harness into memory.

  • Capture

    Wiring a tool

    $ rh harness connect claude-code Command Does rh harness status [--json] Shows which tools are found, how each captures, whether recall is wired, and the last…

  • Capture

    Supported tools

    Codex: Open Codex in a terminal after connecting. When it says “Hooks need review”, choose “Trust all and continue”. Until you trust the hooks, codex exec…

  • Capture

    What you can rely on

    Delivery failures spool. A missing config or failed delivery exits 0. If the batch cannot be saved to disk, the hook exits 1 with capture batch was NOT saved;…

  • Capture

    Who owns a captured session

    Every captured row records its owner. A local hook sends the owner token and captures as the node’s owner, named by ownerUserId in the users file. Without a…

  • Capture

    Capturing to a node on another machine

    A machine that runs no node can capture straight to a datahub’s gateway. It posts over HTTPS only, trusts only the certificate you name, and captures as the…

  • Capture

    Missing your tool?

    Adding one means teaching rh capture hook where that tool keeps its sessions. Ask for a tool explains how to ask for one or add it.

  • Memory

    What rh builds on your sessions, and how to move it.

    What rh builds on top of captured sessions, how to turn each part on, and how to export, import, bundle and merge your record.

  • Memory

    Search

    Hybrid ranking over full text, trigram, vectors (messages, message chunks and summaries) and recency. One mode can be asked for alone: fts, trigram, regex or…

  • Memory

    Summaries

    Each conversation gets a tree of leaf, branch and root summaries, written as it goes idle. A summary hit in search expands back to the messages it came from.

  • Memory

    Topics, decisions and entities

    Sessions are filed into work topics, nested up to four levels, by you or by the categorizer, which never overrides your placement. Topics carry decisions.…

  • Memory

    Wiki

    The wiki builder extracts each summary into topic and entity pages. A page is rewritten, not appended to, within fixed budgets (article 16 KiB, sections 4 KiB…

  • Memory

    Tidy

    Changes that need a person (merge, move, rename, close, delete, a new topic or type) wait as proposals until you approve or reject them. A job that keeps…

  • Memory

    Turning the workers on (standalone)

    Capture and keyword search need nothing. The rest needs a model you choose; any OpenAI-compatible endpoint works, local or hosted, and it will receive the…

  • Memory

    Your data, portable

    Command Does rh memory export [--out <file>] [--since <iso>] Writes a store out. rh memory import <file> [--dry-run] Reads one in. rh memory bundle --out…

  • Datahub

    One record for all your machines, or your team.

    Running rh on Postgres: migrations, configuration, the memory workers, users, spaces and row-level security.

  • Datahub

    Set up a node

    Prepare the database: the vector and pg_trgm extensions and the LEAKPROOF operator marks need a superuser once per database. Operations reference has the…

  • Datahub

    Workers

    Run one rh worker --role <role> process per role, usually as systemd units next to Postgres. Each uses the model of its configuration’s runtime.default_agent.…

  • Datahub

    Tenancy

    gateway.users_file (or RIVETHUB_USERS_FILE) names the node’s users. The file holds only SHA-256 digests of bearer tokens, never a token itself: {…

  • Datahub

    Backups

    Dump Postgres as a superuser: a role under forced row-level security cannot pg_dump its own tables. The wiki is git; back up each scope’s repository.…

  • API & MCP

    Reading the record back.

    The rh gateway and its authentication, the memory tools rh mcp serves to agents, and what rh reports about itself.

  • API & MCP

    Gateway

    Binds 127.0.0.1:5174 by default. Off loopback it refuses to start without TLS ( gateway.tls_cert, gateway.tls_key). Loopback alone grants no access. Local…

  • API & MCP

    MCP

    { "mcpServers": { "rivethub": { "command": "rh", "args": ["mcp"] } } } Tool Does memory_search hybrid, full-text, trigram, regex or vector search over messages…

  • API & MCP

    What rh reports

    Capture stays on your chosen storage; configured model endpoints receive session text, and sharing sends selected bundles. Runtime reporting is separate from…

  • Sharing

    Share selected sessions

    Package selected sessions, sanitize and read the report, then send an encrypted bundle. Receiving runs checks before it imports anything.

  • Sharing

    Review before sending

    Use a conversation id from the sessions API. Bundle writes a raw archive; sanitize writes a separate best-effort scrubbed copy and a local report. Read the…

  • Sharing

    Receive and review

    $ rh memory receive <share-code> --dry-run A dry run writes no sessions; retain the same machine’s inbox for the import because the server download is…

  • Sharing

    Cloud and team policy

    Cloud features are on by default. To disable cloud sign-in, reporting, cloud update checks and the cloud drop box for a hub, add this to its config and restart…

  • Keep the node running

    Keep the node running

    On Linux with a usable systemd user session, the installer leaves your node running as an enabled service. It reports login or boot startup.

  • Keep the node running

    What a new install already has

    The current one-line installer first starts a detached node, then hands it to rivethub.service. You do not need to initialize or start a second service after a…

  • Keep the node running

    Older installs and manual setup

    If you installed before the service handover was added, run the one-line installer again. On Linux with a usable systemd user session and rh 0.8.4, it moves an…

  • Keep the node running

    Environment settings

    In 0.8.4, the generated unit’s EnvironmentFile directive is accepted by systemd and loads ~/.rivethub/.env. Protect that file with mode 0600. rh service…

  • Keep the node running

    macOS, no systemd and opting out

    On macOS, WSL without systemd, a container without a usable systemd user session, or with --no-service, the installer leaves a detached node and says it will…

  • Upgrading

    Upgrade safely

    Back up first, choose the correct release channel, and check the node after updating. 0.8.12 is the current regular release; plain <code>rh update</code>…

  • Upgrading

    Back up and choose a channel

    For SQLite, stop the node before copying ~/.rivethub/memory.sqlite, or use SQLite’s backup command while it runs. Back up config, users file and the configured…

  • Upgrading

    Standalone: 0.8.3 to 0.8.4

    After backing up, run rh update. The released upgrade was tested from 0.8.3: SQLite migrations apply, both binaries are replaced, and the command restarts a…

  • Upgrading

    Datahub: schema 62 to 75

    0.8.4 requires Postgres schema 75, up from 62 in 0.8.3. A migration from 62 to 75 passed a three-person hub rehearsal. Back up as a superuser and back up every…

  • Upgrading

    Earlier upgrade notes

    0.8.0 to 0.8.1: credentials are required on loopback. Owner tokens work only directly on loopback with a loopback Host and no forwarded headers. Team drop…

  • Troubleshooting

    Troubleshoot a first session

    Start with the symptom, check the evidence and apply the smallest fix. These checks describe released runtime 0.8.7, including the capture limits that remain.

  • Troubleshooting

    No captured session

    Check: rh status, rh doctor, rh harness status, the tool’s capture log and rh capture spool. The quickstart shows how to query /api/sessions with the owner…

  • Troubleshooting

    Node disappears after reboot or service loops

    Check: rh service status and rh service logs. The current Linux installer sets up an enabled service when a systemd user session is usable; its output says…

  • Troubleshooting

    Browser page or account sign-in

    A site-installed 0.8.4 node has no browser UI. rh open says so, and GET / answers 200 with an explanation. Use the authenticated sessions API and MCP to verify…

  • Troubleshooting

    No model or no capture history

    No model is needed for capture and keyword recall. In 0.8.4, ordinary commands no longer print memory.models is not set; rh doctor explains the missing model…

  • Troubleshooting

    Codex or OpenCode does not capture

    Codex: Open Codex in a terminal after connecting. When it says “Hooks need review”, choose “Trust all and continue”. Until you trust the hooks, codex exec…

  • Troubleshooting

    Receive imports nothing, or update says already newer

    Check: Exit 3 with a held report means receive’s safety checks found something; review decisions in receiving. A stable update resolving an older version is…

  • Command line

    Command-line reference

    Every rh command with its arguments, and how the standalone node, capture, services, updates and the database commands behave.

  • Command line

    Commands

    Every command validates configuration with one rule: runtime, agents and providers are optional, and a node without them has no model. rh local never invents…

  • Command line

    Receiving bundles

    rh memory receive <code> and rh memory ingest-bundle <path> check a bundle for secrets and prompt injection before they write anything. A bundle with findings…

  • Command line

    Standalone node

    rh local --ensure starts a standalone node on demand for launchers and capture hooks that run without a service manager. It adopts legacy state as rh local…

  • Command line

    Capture

    rh capture hook is the entry point for a Claude Code hook command. It reads one hook payload from stdin and captures it through the capture library's hook: it…

  • Command line

    Services

    --check on rh gateway, rh worker or rh mcp validates its configuration and exits without serving. rh gateway serves the gateway and runs its node's tasks. rh…

  • Command line

    Browser origins

    The gateway answers a request that carries an Origin header only when that origin is the gateway's own origin or is listed in the gateway's allowed_origins…

  • Command line

    Platforms

    rh targets Linux and macOS (Apple Silicon). CI builds rh and runs the cli tests on macos-latest. rh service manages systemd units only. On macOS running rh…

  • Command line

    Status, stop and doctor

    rh doctor reads the schema status read-only. It never runs migrations or opens a store for writing. An unreachable backend and an old or unsupported schema…

  • Command line

    Updating

    rh update [--channel stable|beta|nightly] [--source rivethub-cloud|github] [--version TAG] [--no-restart] updates Linux x86_64 and aarch64 and macOS…

  • Command line

    Database

    rh db migrate|status [--config FILE] [--url URL | --path FILE] uses the migration library for the selected Postgres or SQLite backend. Without an explicit…

  • Command line

    Authentication

    rh auth token-path prints the path of <state>/local-owner.token ( --json prints {"path": "..."}) and rh auth token prints the token itself, so a script can…

  • Operations

    Operating RivetHub on Postgres

    For whoever runs a datahub: preparing Postgres, migrations, upgrade notes, backups, workers, several people on one store, and keeping data on your network.

  • Operations

    The database

    rh connects as an ordinary role that owns the database and its tables, never as a superuser. Row-level security is forced on the owned tables, so the owner is…

  • Operations

    Migrations

    rivethub-migrate postgres --url "$RIVETHUB_PG_URL" # or --config FILE (its connection_string, else RIVETHUB_PG_URL) rivethub-migrate status postgres # current,…

  • Operations

    Updating from 0.8.4 on Linux with the service

    rh update on 0.8.4 leaves a node that runs as rivethub.service down: it rewrites the unit's ExecStart to <path>/rh (deleted), which systemd cannot start. After…

  • Operations

    Upgrading from 0.8.4: OpenCode and Codex capture

    OpenCode capture: the plug-in 0.8.3 wrote loads only on OpenCode 2.x. OpenCode 1.x, which npm install opencode-ai installs, refused it, and nothing was…

  • Operations

    Upgrading from 0.8.2 to 0.8.3

    0.8.3 needs no schema migration. It fixes what a new user on a standalone SQLite node (the one local.sh installs and rh local --ensure starts) ran into: rh…

  • Operations

    Upgrading from 0.8.1 to 0.8.2

    0.8.2 needs no schema migration. It fixes capture on a node whose gateway serves TLS from a certificate that lists another name before localhost: on 0.8.1 the…

  • Operations

    Upgrading from 0.8.0 to 0.8.1

    0.8.1 needs no schema migration. It is also a security release, so these things behave differently after the upgrade. Local access Loopback is not the owner…

  • Operations

    Refused requests

    The gateway refuses a request in one of three ways, and a client can tell them apart from the response alone: Kind Status WWW-Authenticate Body unauthorized…

  • Operations

    Backups

    Postgres. pg_dump turns row-level security off for its reads, and a role that is subject to forced row-level security then fails on the first secured table…

  • Operations

    Workers

    Run one rh worker --role <role> process per role ( embedder, summarizer, categorizer, wiki-builder) as its own systemd unit next to Postgres. Each worker's…

  • Operations

    Wiki packing

    The wiki writers run git with gc.auto=0 and maintenance.auto=false, so packing never runs inside a worker (where it would count against the worker's memory…

  • Operations

    Several people on one store

    List the people and the SHA-256 digests of their bearer tokens in the users file ( gateway.users_file). Rows captured with a bearer token take that person as…

  • Operations

    Standalone nodes

    rh local migrates its SQLite file itself before opening it; rivethub-migrate sqlite --path <file> does the same by hand and keeps a <file>.v<N>.bak copy before…

  • Operations

    Keeping data on your network

    RivetHub Cloud features are on by default: sign-in, crash reports and usage counts, update checks against rivethub.cloud, and sharing through the…

  • Memory service

    Memory service

    What every node serves as a memory service: the routes, the contract version clients check, a model per memory job, and shared database files.

  • Memory service

    What a node serves

    Every node is a memory service: capture, recall, and the organizer (topics, entities, the wiki, tags, and Tidy), with attribution kept on the stored rows. The…

  • Memory service

    Contract version

    Memory HTTP responses carry x-rivethub-contract: 1. GET /api/memory/contract returns { "contractVersion": 1 }. Recall tools stamp the same number on…

  • Memory service

    Models per job

    Each memory job can run on its own model. Set them under memory.models: memory: models: default: provider: main model: big-model summarizer: provider: local…

  • Memory service

    Shared database files

    rh db status prints a foreign: line. A file RivetHub created alone reports foreign: none. A file that also holds another program's virtual table (for example…

  • Memory service

    More than one node

    RIVETHUB_HOME is the state directory for that process. It must be an absolute path with no.. components. Two processes with different RIVETHUB_HOME values use…

  • Contributing

    Working on the runtime.

    Building, checking and testing rivethub-runtime, and the rules every change is held to before it merges.

  • Contributing

    Build and check

    cargo xtask install-hooks # pre-commit and commit-msg hooks cargo xtask check # what CI runs first: fmt, clippy, dylint, cargo-deny, privacy, secrets cargo…

  • Contributing

    The rules every change is held to

    Crates depend only downward: foundation, kernel, adapters and services, composition. deny.toml fails the build when a Cargo.toml breaks that. Production code…

  • Contributing

    These docs

    This site is plain static HTML generated with Node from src/pages.mjs. Its look comes from the shared RivetHub design system, vendored in vendor/design/. Fixes…

Not running a node yet?

The quickstart installs one and captures a first session.