Memory
What rh builds on your sessions, and how to move it.
Every capture is stored as a conversation of messages, owned by the person who made it, and kept as it was. The workers build search, summaries, topics and a wiki on top. None of it replaces the original.
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 vector. Without an embedding endpoint, search answers keyword results and marks them degraded.
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.
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. Entities (people, hosts, models, services, repositories and the like) are kept apart from the work tree, under their own types.
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 each, 48 history lines), and what a rewrite drops is archived. On Postgres the pages are a git repository.
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 failing leaves the queue as a flagged record, so the jobs behind it still run.
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 session text you send it.
Under memory.sqlite | Adds |
|---|---|
workers: true | the embedder and the summarizer |
tagging: true | the categorizer: filing and Tidy proposals |
wiki_dir: <dir> | the wiki builder, writing pages under that directory |
embed_endpoint, embed_model | vector and hybrid search |
runtime:
default_agent: memory
agents:
memory: { provider: local, model: example-model }
providers:
local: { type: openai-compatible, base_url: http://127.0.0.1:8000/v1, model: example-model }
memory:
sqlite:
workers: true
tagging: true
wiki_dir: ~/.rivethub/wiki
embed_endpoint: http://127.0.0.1:8001/v1
embed_model: example-embedding-modelCheck it with rh config validate.
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 <file> [--session <id>]… | Packages the owner’s sessions, or chosen ones, for another RivetHub to ingest. New in 0.8. |
rh memory sanitize <file> --out <file> | Writes a copy of a bundle with secrets scrubbed, and a report of every change. It is best-effort: read the report before a bundle leaves your machine. |
rh memory ingest-bundle <file> [--dry-run] | Posts a bundle to this node. It refuses raw bundles unless forced. Sanitized findings hold the import with exit 3; see receiving. |
rh memory merge-store --from <url> --owner <user> [--dry-run] | Folds another Postgres store into this one in one transaction, private to that person. |
$ rh memory merge-store --from postgres://…/old-store --owner alice --dry-runFor encrypted sharing, review sharing selected sessions. On a standalone node the whole record is one SQLite file. Back it up with sqlite3 ~/.rivethub/memory.sqlite ".backup <file>" while it runs. rh memory --help lists every administration command.