# Haematite

A versioned record store with branches, checked queries, relations, vectors and configurable history retention.

Haematite keeps records in named collections. Every write adds a new version. Nothing is edited in place. A record can be read as it was while that version is retained.

History retention decides how long old versions stay readable. Reclaim returns space after no retained root reaches it. A branch is a line of versions you can fork, write on and merge back. A query is a short pipeline, checked word by word before anything is read.

[Install and run](/haematite/getting-started/install/)

Install the command, create a store and start it.
[Write your first records](/haematite/getting-started/first-records/)

Define a collection, write two records, read them back.
[Connect an agent](/haematite/getting-started/connect-an-agent/)

MCP over stdio or HTTP, repository plugins and installed bundles.
[Studio and the door](/haematite/getting-started/studio-and-the-door/)

Sign in through Lys and use the browser areas.
[The query language](/haematite/query-language/)

Short pipelines in jq
[Sign-in and permissions](/haematite/concepts/sign-in-and-permissions/)

Passes, grants and the store
[Relations and the graph](/haematite/concepts/relations-and-the-graph/)

Declare relations, link records and walk directed edges.
[History and time](/haematite/concepts/history-and-time/)

Retained versions, release policy and offline history tools.
[Configuration](/haematite/reference/configuration/)

Every accepted service, door and HTTP setting.
[Refusals](/haematite/reference/refusals/)

Source-derived diagnostic names and command outcomes.
[Backup and migration](/haematite/operations/backup-restore-and-migration/)

Copy a stopped store, verify a restore and handle older chunking formats.
[Reference](/haematite/reference/cli/)

Every command and every tool, in the command

## What you get

**One command.** The same `haematite` binary runs the store, serves the Studio for people, and serves MCP for agents.

**Versions you can trust.** A record's history is kept. A reader can ask for any retained version a branch has seen.

**Branches.** Fork a branch, let a person or an agent work on it, review the difference, merge it. The merge checks the supplied source version and refuses a changed target.

**Reclaim.** The vacuum plans from every known pin and refuses policy blockers before deleting.

**Checked queries.** A wrong stage is refused with its name and the span of text that caused it. Nothing is guessed.

**Search by meaning.** Records can carry vectors. Two stages read them by cosine, Euclidean or dot distance.

## One query, end to end

**Two hops across relations**

```text
match (c:patients)-[:admitted_to]->(w:wards)<-[:staffed_by]-(n:nurses)
```


That reads patients, the wards they were admitted to, and the nurses staffing those wards. Two edge hops across three records, in one line.

> Published on crates.io
> The [haematite library](https://crates.io/crates/haematite/0.20.1) is published as 0.20.1 under Apache-2.0. The command is in the repository package haematite-cli. Use an operator bundle for the verified binary installation path.
