Using rhebok
Index and search
Re-indexing is incremental, like git status: files are stat-fingerprinted
before they are read, and unchanged chunks reuse their stored embeddings. A
run where nothing changed costs zero seconds; an appended transcript pays only
for the appended text. rhebok status shows a live progress line (percent,
chunks, ETA) for any index in progress, including one started by a session
hook you never saw.
Prompts take priority over indexing: a query holds a marker that indexing workers yield to between batches, so the hook keeps injecting even while a long re-index runs.
Or, from inside Claude Code, use the slash commands below. Once indexed, the prompt hook runs automatically on every turn.
The agent reaches the same index through MCP tools:
rhebok_get_contextgets the excerpts that belong with your message.rhebok_search_knowledgeruns a query that the agent writes.rhebok_read_documentreads one document’s sections in order, 20 at a time, withnextfor the following page.rhebok_list_relatedfollows a document’s links.rhebok_get_statusreports whatrhebok statusdoes: counts, the model, the last index time, whether a run is in progress, the sources, skipped files and config problems.rhebok_update_indexrunsrhebok index(modechanges, the default),rhebok index --backfillwith a two-minute budget for starting new batches (backfill), orrhebok index --compact(compact).
In 0.2.3 and earlier the tools had shorter names, such as rhebok_search. The old
names still answer, but only the new ones are listed.
Memory
Alongside retrieval over your files, rhebok keeps durable memories: things
worth remembering across sessions that were never written down as a note.
There are three kinds — a lesson is a correction or rule about how you
want work done, a fact is something durable about you or your setup, and an
episode is what happened in a session and what was decided, distilled
automatically from finished Claude Code and Codex transcripts. Memories live in their own database
beside the index and are searchable the moment they are saved — no
rhebok index run required.
By default a memory is scoped to the current project directory — only
sessions started there see it in <rhebok-lessons> — pass --global to apply
it everywhere, or --project <dir> to name a directory explicitly. rebuild
re-embeds every memory with the currently configured model and republishes;
export/import move memories as JSON lines, for backup or for carrying them
to another machine.
From inside Claude Code, three MCP tools drive the same store: rhebok_save_memory
saves a lesson, fact or episode and returns its id, rhebok_list_memories lists
what is saved (by kind or scope, newest first, with ids), and rhebok_delete_memory
deletes one by id when you say it no longer applies. /rhebok-remember <rule> and
/rhebok-memories [kind] are the matching slash commands.
Every lesson that applies to the current project is shown at the start of a
session, inside a <rhebok-lessons> block printed as plain text (not JSON) so
other session-start output can precede it on stdout:
Each lesson is one line: its id, the date it was saved, its scope (global
or the project directory), who saved it (saved by the user, saved by Claude or distilled from a session), and its text, with any line breaks
turned into spaces. A lesson Claude saved with a confidence below
min_confidence is left out, and the block adds a line such as
(2 lessons Claude saved below the min_confidence floor of 80 are not shown).
If no lesson is left, no block is printed. rhebok memory list still shows
every lesson. Security model explains why.
When a newer rhebok release is available, session start also prints an update notice. If no lesson applies, the notice is one JSON object, and Claude Code shows it to you as a message. If lessons apply, the notice is a plain-text line before the block, so stdout is never JSON followed by text. The trade-off: in that case the notice reaches Claude as context, but Claude Code does not show it to you as a message.
Beyond session start, every memory — lesson, fact or episode — is also retrieved by
relevance on ordinary prompts and MCP searches, alongside your notes, ranked
and gated by the same relevance score. In a <rhebok-context> block, a
memory carries a line such as
(memory: lesson, 2026-09-01, global, saved by the user, id a1b2c3d4e5f6).
The same confidence floor applies there: a memory Claude saved below
min_confidence is not retrieved. Episodes decay: an old one still
matches, but with less weight than a recent one, controlled by
episode_half_life_days and episode_decay_floor below.
Distillation runs on its own only while index_transcripts, enabled and
distill_episodes are all true, which is the default. It needs its model in
Ollama (about 2.5 GB): ollama pull qwen3:4b-instruct. rhebok install
offers to pull it, but only when it asks you interactively. Until the model
is there, rhebok status lists it as optional, and each background index
writes a line to db.log saying distillation stopped and why. Set
distill_episodes = false to stop distilling.
Exploring memories

rhebok dashboard has a Memories tab that lists every memory with its kind,
date and scope, filters them, and creates, edits and deletes them. On the
graph, memories are drawn in their own colours, one per kind, joined to the
session they were distilled from and the project they are scoped to. Saving a
memory embeds it, so Ollama must be running to create one or change its text or
kind. A lesson’s or fact’s
id comes from its kind and text, so editing either gives it a new id.
Dashboard


rhebok dashboard opens a local web dashboard (127.0.0.1 only): the knowledge
graph with your notes, links, tags and entities; a search view that shows the
whole pipeline — what vector, keyword and graph retrieval each found, how
fusion ordered it, and exactly what cleared the injection gate; and a health
view with index counts, skipped files, live re-index progress, and the last
rhebok bench results, and the installed version with an Update button when a
newer release exists. --port N pins the port, --no-open skips the
browser. The dashboard opens the store per request, so it never blocks the
prompt hook. It answers only requests addressed to 127.0.0.1, localhost
or [::1] on its own port, so an SSH tunnel must use the dashboard’s port at
its local end and a reverse proxy must rewrite Host; see
Security model.

The Settings tab edits config.toml without a terminal: sources (with a
Re-index now button and live progress), retrieval tier, threshold and token
budget for the hook and for MCP, the embedding backend (local Ollama or a
remote endpoint with a write-only token, and a Test connection button),
memory, PDF/OCR, updates and backup, ranking weights, and a raw TOML view.
Every field shows its default and can be reset to it; values are checked as
you type, a save shows the diff first, and a file edited by hand while the
page was open is never overwritten. Comments in the file survive a save, and
the hook picks the change up on its next prompt. Changing the embedding model
or dimensions offers a full re-index.

The Integrations tab has a card for each coding agent rhebok found on this
machine: its version, whether rhebok is connected (or needs repair, and why),
what the connection gives it (MCP tools, context on every prompt, session
start, indexed sessions), and the config file it lives in. Connect,
Disconnect and Repair run the same code as rhebok connect, and the card then
lists the files it wrote, the .rhebok-bak copies it kept and anything left
for you to do, such as trusting Codex’s hook once or restarting Claude
Desktop. A config file rhebok cannot parse is refused and left as it was. The
Codex card has an opt-in checkbox for the AGENTS.md guidance block. Agents
that are not installed are listed under “Not installed”, and a last card has
the JSON and TOML snippets for any other MCP client.

Health has an Install card with the same checks as rhebok status: the
installed binary, the plugin files, the Claude Code marketplace and
registration, and rhebok on PATH. Each failed check shows its fix, a Connect
Claude Code button where that repairs it and the exact command otherwise. It
also tests the embedding endpoint and lists any problem in config.toml,
each with a button that opens the Settings field it names.
On a machine with nothing indexed and no sources, the dashboard opens a
three-step setup instead of the graph: pick folders (checked as you type and
saved to config.toml), connect the agents it found, then index with live
progress, which ends on Search with a first query taken from your own notes.
“Skip setup” goes back to the normal tabs and is remembered in this browser;
the graph’s empty state can open the setup again.
Connect other agents
rhebok install connects Claude Code, as it always has, then looks for the
other coding agents it knows and asks before connecting each one it finds
(--yes connects them all without asking). The same thing, one agent at a
time:
Every entry runs the installed binary by its absolute path
(<data>/rhebok/bin/rhebok mcp), so run rhebok install first. Connecting
touches only rhebok’s own entries: every other key, server and hook in the file
is kept, the first time rhebok rewrites a file it keeps the original beside it
as <file>.rhebok-bak, connecting twice changes nothing, and a file that does
not parse (a JSON file with comments, say) is refused with an error that names
it rather than rewritten. rhebok disconnect removes only what rhebok added.
If the file holds only rhebok’s entries, and held nothing else before rhebok
first changed it, disconnect deletes the file and its backup instead of leaving
an empty file behind. A file reached through a symlink is never deleted.
rhebok uninstall disconnects every agent. Codex asks you to trust a new hook
once (/hooks); Claude Desktop needs a restart to load the server. The
dashboard’s Integrations tab (through /api/agents) drives the same code.
Claude Desktop saves claude_desktop_config.json from memory while it runs,
so a change made to the file then is lost. On macOS, rhebok therefore refuses
any connect, disconnect or uninstall that would change that file while
Claude Desktop is running, and says so. Quit it (⌘Q), run the command from a
terminal, then open it again. If you run Claude Code inside the Claude app,
quitting it ends that session too, so use a separate terminal. An old br8n
server entry left in Claude Desktop’s, Cursor’s or Gemini CLI’s config shows
as stale in rhebok agents, and connecting replaces it.