> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://stelltec.com/rhebok/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://stelltec.com/rhebok/docs/_mcp/server.

# rhebok

![rhebok](/rhebok/docs/_fern-files/_img/1d73f8740e7186ca3602c8b8dd1d458963cdfe7f82bd62adaa6b9bba459d4f3c.webp)

Your coding agent starts every session knowing nothing you have not pasted in.
The decision you wrote up last month, the fix you found in yesterday's
session, the paper in your Downloads folder: it can use none of them unless
you find them and hand them over.

rhebok hands them over. It indexes the folders you point it at, embeds them
with a small model running on your own machine through
[Ollama](https://ollama.com), and serves the results two ways:

* **Automatic context.** A prompt hook adds the most relevant passages to
  every prompt, but only when they clear a confidence gate.
* **On-demand search.** An MCP tool lets the agent search your knowledge base
  whenever it decides to.

It works with Claude Code, Codex, Gemini CLI, Cursor and Claude Desktop. It
also keeps durable memories (lessons and facts that carry across sessions) and
has a local web dashboard for searching, exploring and configuring everything.

## How it works

rhebok does two jobs. In the background, it keeps an index of what you point it at:

```mermaid
flowchart LR
    S["Folders, notes, papers<br />and agent sessions"] --> C["Split into<br />passages"]
    C --> E["Embedded locally<br />by Ollama"]
    E --> I[("Local index")]
```

Then, on every prompt, and whenever the agent calls the MCP search tool, it searches that index:

```mermaid
flowchart LR
    P["Your prompt<br />(prompt hook)"] --> R["Vector and<br />keyword search"]
    M["MCP search call"] --> R
    I[("Local index")] -.-> R
    R --> F["Fused and<br />ranked"]
    F --> G{"Clears the<br />confidence gate?"}
    G -- "yes, for the hook" --> A["Added to<br />the prompt"]
    G -- "yes, for MCP" --> T["Returned to the agent<br />as the tool result"]
    G -- no --> N["Left out"]
```

At the `balanced` tier and above (tiers 2 to 4), search also follows the links
between notes and the neighbouring passages of each hit. The prompt hook runs
the `fast` tier (tier 1) by default, so it skips that step. MCP search runs
the `thorough` tier (tier 3) by default, so it takes it.
[Configuration and tuning](/rhebok/docs/guides/configuration) lists what each tier does.

![rhebok answering a question from your notes](/rhebok/docs/_fern-files/stellenbosch-technologies.docs.buildwithfern.com/8c3425bad574f2436cd3d6181815cebc298399889b0eef5866b5b070685c5a7a/_dot_dot_/docs/images/demo.gif)

Nothing leaves your machine unless you set it up to: embeddings run locally
and there is no telemetry. rhebok itself goes online only to check daily for a
newer release, to download its vector-search extension the first time it
builds an index, to fetch the OCR model from ModelScope the first time it reads
a scanned PDF (oar-ocr only; Apple Vision on macOS downloads nothing),
and to fetch pages you add with `rhebok add <url>`. If you turn them on, it
also sends text to an embedding endpoint you choose and backs up to your own
S3 bucket or Google Drive.

#### [Install](/rhebok/docs/get-started/install)

Install rhebok and index your first folder in about ten minutes.

#### [Using rhebok](/rhebok/docs/get-started/usage)

Search, memories, the dashboard and connecting other agents.

#### [Configuration and tuning](/rhebok/docs/guides/configuration)

Sources, quality tiers, ranking weights and embedding options.

#### [Troubleshooting](/rhebok/docs/guides/troubleshooting)

What to check when rhebok injects nothing or an install fails.