<img src="https://github.com/brainfish-ai/ReasonDB/raw/v0.5.10/assets/logo.svg" alt="ReasonDB" width="140" />
The database that understands your documents.
Built for AI agents that need to reason, not just retrieve.
<a href="https://github.com/reasondb/reasondb/releases"><img src="https://img.shields.io/github/v/release/reasondb/reasondb?color=6C5CE7&include_prereleases&label=version&sort=semver&style=flat-square" alt="Version"></a>
<a href="https://github.com/reasondb/reasondb"><img src="https://img.shields.io/badge/built_with-Rust-dca282.svg?style=flat-square" alt="Built with Rust"></a>
<a href="https://github.com/reasondb/reasondb/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/reasondb/reasondb/ci.yml?style=flat-square&branch=main&label=CI" alt="CI"></a>
<a href="https://github.com/reasondb/reasondb/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-ReasonDB_v1.0-00bfff.svg?style=flat-square" alt="License"></a>
<a href="https://hub.docker.com/r/brainfishai/reasondb"><img src="https://img.shields.io/docker/pulls/brainfishai/reasondb?label=docker%20pulls&style=flat-square" alt="Docker Pulls"></a>
<a href="https://github.com/reasondb/reasondb"><img src="https://img.shields.io/github/stars/reasondb/reasondb?color=FFD700&style=flat-square&label=stars" alt="GitHub Stars"></a>
<a href="https://github.com/reasondb/reasondb"><img src="https://img.shields.io/github/downloads/reasondb/reasondb/total?color=8259dd&label=downloads&style=flat-square" alt="Downloads"></a>
<a href="https://reason-db.devdoc.sh">Docs</a>
•
<a href="https://reason-db.devdoc.sh/documentation/page/quickstart">Quick Start</a>
•
<a href="https://reason-db.devdoc.sh/api-reference/introduction">API Reference</a>
<sub>⚠️ <strong>Alpha Release</strong> — ReasonDB is under active development. APIs and features may change. We'd love your <a href="https://github.com/reasondb/reasondb/issues">feedback</a>!</sub>


ReasonDB is an AI-native document database built in Rust, designed to go beyond simple retrieval. While traditional databases and vector stores treat documents as data to be indexed, ReasonDB treats them as knowledge to be understood - preserving document structure, enabling LLM-guided traversal, and extracting precise answers with full context.
ReasonDB introduces Hierarchical Reasoning Retrieval (HRR), a fundamentally new architecture where the LLM doesn't just consume retrieved content - it actively navigates your document structure to find exactly what it needs, like a human expert scanning summaries, drilling into relevant sections, and synthesizing answers.
ReasonDB is not another vector database. It's a reasoning engine that preserves document hierarchy, enabling AI to traverse your knowledge the way a domain expert would.
Key features of ReasonDB include:
SEARCH (BM25) and REASON (LLM) clauses in a single queryAI agents today are limited by their databases:
| Approach | What It Does | Why It Fails |
|---|---|---|
| Vector DBs | Finds "similar" chunks | Loses structure. A contract's termination clause isn't "similar" to your question about exit terms - but it's the answer. |
| RAG Pipelines | Retrieves then generates | Garbage in, garbage out. Wrong chunks retrieved means wrong answers, no matter how capable the LLM. |
| Knowledge Graphs | Maps explicit relationships | Requires manual entity extraction. Can't handle the messy reality of real documents. |
The result? AI agents that hallucinate, miss critical context, or drown in irrelevant chunks.
ReasonDB solves this by letting the LLM reason through your documents - not just search them.
Results on a real-world insurance document corpus (4 policy documents, ~1,900 nodes, 12 queries across 6 complexity tiers). Full benchmark script: tutorials/data/insurance/benchmark.py.
| Metric | ReasonDB | Typical RAG |
|---|---|---|
| Pass rate | 100% (12 / 12) | 55 – 70% |
| Context recall (term match) | 90% avg | 60 – 75% |
Median latency (RQL REASON) |
6.1 s | 15 – 45 s |
"Typical RAG" = chunked-retrieval pipelines (LlamaIndex / LangChain defaults) on the same corpus. ReasonDB uses BM25 candidate selection + LLM-guided hierarchical tree traversal instead of flat similarity matching.
| Category | Avg latency | Term recall | Pass |
|---|---|---|---|
| Simple | 7.1 s | 100% | 2 / 2 |
| Specific | 5.9 s | 75% | 2 / 2 |
| Multi-condition | 5.6 s | 83% | 2 / 2 |
| Comparative | 6.2 s | 100% | 2 / 2 |
| Multi-hop | 6.5 s | 83% | 2 / 2 |
| Synthesis | 6.5 s | 100% | 2 / 2 |
ReasonDB detects and follows intra-document cross-references during ingestion (LLM-extracted during summarization) and surfaces the referenced sections alongside primary results. This closes the "answer is split across two clauses" gap that defeats flat-chunk retrieval.
| Metric | Value |
|---|---|
| Queries with ≥ 1 cross-ref surfaced | 4 / 5 |
| Avg recall, primary content only | 62% |
| Avg recall, primary + cross-refs | 80% (+18 pp) |
| Example gain | Recurrent disability query: 67% → 100% once cross-referenced policy schedule clause is included |
The benchmark above is powered by this tutorial app. It queries four insurance policy documents using REASON and shows the full traversal trace — which nodes the LLM visited, why it selected them, and how it synthesized the final answer.

Full tutorial source:
tutorials/06-insurance/
%%{init: {'theme': 'dark'}}%%
flowchart TD
subgraph Ingestion["Ingestion Pipeline (Plugin-Driven)"]
A["Documents / URLs"] -->|Extractor Plugin| B["Markdown"]
B -->|Post-Processor Plugin| C["Cleaned Markdown"]
C -->|Chunker| D["Semantic Chunks"]
P["Pre-chunked JSON"] -->|"bypasses extract + chunk"| D
D --> E["Build Hierarchical Tree"]
E -->|Bottom-up| F["LLM Summarizes Each Node"]
end
subgraph Search["Search & Reasoning"]
G["Natural Language Query"] --> G1["BM25 Candidates + Title Boost"]
G1 --> G2["Recursive Tree-Grep Pre-Filter"]
G2 --> H["LLM Ranks by Summaries + Match Signals"]
H -->|Selects relevant branches| I["Traverse Tree"]
I -->|Parallel beam search| J["Drill Into Leaf Nodes"]
end
subgraph Result["Response"]
J --> K["Extract Answer"]
K --> L["Confidence Score + Reasoning Path"]
end
Ingestion --> Search
/ingest/chunksGet from zero to intelligent document search in under 5 minutes.
Grab the latest release for your platform:
| Platform | Architecture | Download |
|---|---|---|
| macOS | Apple Silicon (M1/M2/M3/M4) | aarch64-apple-darwin |
| Linux | x86_64 | x86_64-unknown-linux-gnu |
| Linux | ARM64 | aarch64-unknown-linux-gnu |
| Windows | x86_64 | x86_64-pc-windows-msvc |
ReasonDB Client: A desktop app is also available for macOS (.dmg) and Windows (.msi).
macOS: "ReasonDB.app" Not Opened
Since ReasonDB is in alpha, the desktop app is not yet signed with an Apple Developer certificate. macOS Gatekeeper will block it on first launch. To open it:
ReasonDB.app and select OpenOr remove the quarantine attribute from the terminal:
xattr -cr /Applications/ReasonDB.app
You can also go to System Settings → Privacy & Security, scroll down, and click Open Anyway next to the ReasonDB message.
brew tap brainfish-ai/reasondb-tap
brew install reasondb
No Homebrew? Download and install directly:
# macOS Apple Silicon
curl -L https://github.com/brainfish-ai/reasondb/releases/latest/download/reasondb-$(curl -s https://api.github.com/repos/brainfish-ai/reasondb/releases/latest | grep tag_name | cut -d'"' -f4)-aarch64-apple-darwin.tar.gz | tar -xz && sudo mv reasondb /usr/local/bin/
# Linux x86_64
curl -L https://github.com/brainfish-ai/reasondb/releases/latest/download/reasondb-$(curl -s https://api.github.com/repos/brainfish-ai/reasondb/releases/latest | grep tag_name | cut -d'"' -f4)-x86_64-unknown-linux-gnu.tar.gz | tar -xz && sudo mv reasondb /usr/local/bin/
git clone https://github.com/reasondb/reasondb.git && cd reasondb
cargo build --release
To also set up the desktop app and tutorials, install JS dependencies from the repo root:
yarn install # installs apps/, packages/, and tutorials/ in one step
yarn build:packages # builds the shared @reasondb/rql-editor package
reasondb config init
| Variable | Description | Required |
|---|---|---|
REASONDB_LLM_PROVIDER |
openai, anthropic, gemini, cohere, glm, kimi, ollama, vertex, bedrock |
Yes |
REASONDB_LLM_API_KEY |
API key for the chosen provider | Yes |
REASONDB_MODEL |
Override the default model for the provider | No |
reasondb serve
Server starts at http://localhost:4444 with Swagger UI at http://localhost:4444/swagger-ui/
docker run --rm --pull always --name reasondb -p 4444:4444 \
-e REASONDB_LLM_PROVIDER=openai \
-e REASONDB_LLM_API_KEY=sk-... \
brainfishai/reasondb:latest serve
Or use the Makefile for local development:
make docker-up # Build and start
make docker-up-d # Start in background
make docker-logs # View logs
make docker-down # Stop containers
make docker-down-v # Stop and remove data volume
make docker-ps # Check health status
The repo uses a Yarn workspace — a single yarn install at the root installs all JS dependencies across apps/, packages/, and tutorials/.
# One-time setup from repo root
yarn install
yarn build:packages # build the shared @reasondb/rql-editor package
# Run the desktop app
make client-app # dev mode (Tauri + Vite)
make client-app-build # production build
# Or use yarn workspace commands directly
yarn workspace reasondb-client dev # Vite web dev server only
yarn workspace reasondb-client tauri dev # full Tauri desktop app (dev)
yarn workspace reasondb-client build # production build
Six hands-on tutoria
$ claude mcp add ReasonDB \
-- python -m otcore.mcp_server <graph>