Retrieve
Find the right memory with its source and revision.
It does not generate an answer.
Product
StewardMem does four jobs: retrieve, govern, prove, and erase. Everything else is a surface on top of those four.
One Rust process · One SQLite file · No embedding API
The four jobs
Each job has a boundary. Stating the boundary is part of shipping the job.
Find the right memory with its source and revision.
It does not generate an answer.
Turn agent writes into proposals a human can decide.
It does not make the decision.
Keep a verifiable record of what changed and who approved it.
It does not certify your organization.
Remove a subject’s data and produce a certificate.
It does not reach copies you made outside the system.
Retrieval
Every recall runs lexical search, vector similarity, and graph traversal. The ranked lists are fused with reciprocal rank fusion. The result carries its source, revision, lifecycle, and retrieval path.
FTS5 · BM25
Exact terms, phrases, code paths, and exclusions. The part of search that does not guess.
sqlite-vec
A local static embedding model. No embedding API, no network call, no per-query bill.
Personalized PageRank
Graph traversal with hub dampening and edge-type weights. A third leg, not a replacement.
RRF · k=60
Deterministic reciprocal rank fusion. The same query over the same state returns the same order.
When the evidence is too weak to support a claim, recall returns decision: "low_confidence" with no hits. A calibrated abstention is better than a confident guess.
Each hit carries its source URI, revision, heading path, line span, valid interval, lifecycle, and authority. The model cannot invent a source; the server returns the record.
Governance
The write path is a sequence, not a switch. Content is screened, scored, and stored as a candidate. A human approves the exact bytes. Only then does a knowledge row exist.
Injection patterns, invisible characters, and bidi tricks.
A quarantine flag if suspect
Novelty, conflict, and salience scoring.
A proposal row; no knowledge row
A human sees content, source, and digest.
A review decision
The digest must match the displayed bytes.
Knowledge + audit row, one transaction
A new fact replaces an old one.
Old row historical; new row current
Every proposal returns a SHA-256 content_digest. Approval requires it. If the content changed after the reviewer saw it, the server returns 409 and nothing is promoted.
BRAIN_WRITE_POSTURE defaults to open for trusted pipelines. Set it to review when agents or untrusted sources can write. This site never claims the gate is always on when it is not.
BRAIN_APPROVAL_QUORUM=2 requires a second principal. Domain-scoped queues prevent a reviewer from deciding a proposal in a domain they do not own.
Audit
Every consequential action appends a row to a keyed SHA-256 hash chain. The chain covers every registered domain. GET /audit/verify recomputes the links and the head pin. A database without its chain key fails closed.
Read events can be recorded too, so “who saw this, and when” is answerable.
The chain is append-only. There is no edit endpoint.
An off-host witness can hold the head, so a rewritten local chain is detectable.
The chain proves integrity relative to the key and the witness. It does not prove that the original human input was true.
Deletion
A DSAR runs as one atomic workflow: locate every record for the subject, export a portable bundle, purge the content and its derived rows, and return a certificate that re-verifies the chain on read.
Content rows by owner, plus transitive derived_from descendants.
A portable JSON bundle.
Content, vector index, graph edges, pointers, in one transaction.
Tombstone root, purged ids, held ids, chain head.
GET /dsar/{id}/certificate returns chain_verifies.
Backups you took, copies you exported, and downstream systems you sent data to are outside the server’s boundary. The certificate states what the server purged; it does not claim to reach your other systems.
A held record is not purged. The certificate lists it with the reason, so a “deleted” response never silently leaves data behind.
Decision
POST /workflow/decision-runs normalizes the request, retrieves evidence, generates candidates, applies a local decision model and a deterministic policy, optionally re-ranks, and then either acts or escalates to a human.
The local decision model is a deterministic rules table today. A learned model is expressible behind the same interface, but it is not shipped. The optional re-rank here is a stable candidate re-order; the cross-encoder lives in retrieval behind a feature gate.
A decision run stores its trace. POST /workflow/decision-runs/{id}/replay-diff re-executes it. A divergent outcome is reported, not hidden.
Architecture
Rust and Axum. SQLite with FTS5, sqlite-vec, and the knowledge graph. The HTTP API, MCP server, CLI, OpenClaw plugin, and desktop console are all clients of the same authority.
One SQLite file. WAL mode. FTS5 shadow tables. vec0 int8 and binary indexes. Encrypted backup and restore with AES-256-GCM and Argon2id.
HTTP/OpenAPI, MCP stdio and HTTP/SSE, the brain CLI, the OpenClaw memory plugin, and a Tauri + SvelteKit desktop console.
Single binary, loopback by default. Put a TLS-terminating reverse proxy in front for remote access. Warm standby with a rehearsed promote; no hot failover claim.
No at-rest encryption, mTLS, multi-team tenancy, or A2A federation yet. These are named ceilings, not surprises.
Boundaries
A category is a promise. Here is what we are not promising.
| It is not | Because |
|---|---|
| An open-domain chatbot | The Mac app answers only from your memory, with citations attached. General conversation belongs to your agent. |
| An agent framework | It does not plan, orchestrate, or run tools. |
| A hosted memory API | It runs on your hardware; there is no vendor account. |
| An LLM | It calls no model in the recall path. |
| A RAG library | It is a server with governance, audit, and deletion built in. |
| A vector database | Vectors are one leg of hybrid retrieval, not the product. |
| A certification | It produces evidence; an auditor produces a certificate. |