Trust-aware agent memory with evidence-backed recall, self-inspection, and audit history.
io.github.Arakiss/nahuali — MCP Server
Nahuali is a trust-aware memory management server that provides evidence-backed recall, self-inspection, and audit history within an MCP (Memory Control Protocol) ecosystem. It emphasizes provenance, tamper-evidence, and signed governance for agent memory.
🛠️ Key Features
Trust-aware memory recall with evidence provenance
Self-inspection of memory items for safety
Audit history and tamper-evident governance
Local-first design with emphasis on memory governance
Rust-based implementation, integrates with SurrealDB
🚀 Use Cases
Agent-memory management with reliability guarantees
Provenance-tracked memory recalls in AI agents
Tamper-evident audit trails for memory items
MCP-server role in memory governance workflows
⚡ Developer Benefits
Clear MCP integration for memory governance
Self-inspection hooks and audit-ready data structures
Provenance and safety signals for memory items
Rust ecosystem compatibility and SurrealDB backing
⚠️ Limitations
Readme excerpt indicates beta features and CI gating; consult official docs for deployment caveats
Specific implementation details and API surface require repository reference for current status
The trust layer for agent memory. Nahuali shows what a memory is based on,
whether it is safe to use, and when an agent should refuse it.
Nahuali showing evidence-backed recall, a trust warning, self-inspection, and tamper detection
Most memory systems optimize for finding relevant context. Nahuali asks the
question that comes next: should the agent trust what it found?
It records observations, claims, relationships, procedures, and intentions in
an append-only ledger. Recall can return the supporting evidence and a
deterministic trust verdict. Self-inspection finds unsupported, stale, or
contradictory memory without silently rewriting it. The default ledger is hash
chained, and an operator can sign its tip to detect a fully rewritten history.
Nahuali is local-first, source-available, and in public beta.
Try persistent memory in one minute
Install the signed macOS or Linux binaries:
bash
curl -fsSL https://raw.githubusercontent.com/Arakiss/nahuali/main/scripts/install.sh | sh
export PATH="$HOME/.nahuali/bin:$PATH"
Record an observation, derive a claim from it, and inspect the result:
bash
nahuali remember "Lena owns the release notes" --mention Lena --tag product
nahuali claim Lena owns "release notes" --source-last --confidence 0.92
nahuali recall "Who owns the release notes?" --authority --json
nahuali self-inspect --json
This is real persistent memory. The default store lives under
~/.nahuali/data, survives process restarts, and needs no Docker, database
server, model, account, or API key. Set NAHUALI_DB_URL when you want a shared
remote SurrealDB deployment instead.
For a narrated example with no writes, run:
bash
nahuali demo
The demo shows a supported recall that certifies, an unsupported claim that
warns, a contradiction that blocks, non-mutating self-inspection, an in-place
history rewrite caught by the hash chain, and a fully re-chained history caught
by an Ed25519 checkpoint.
Why this is different
Memory failure
Nahuali response
A relevant claim has no source
Return it as unsafe, not as a trusted fact
Good and weak memories are mixed together
Give each result its own evidence and verdict
Claims conflict or become stale
Surface the affected records for explicit review
A model proposes a repair
Validate the evidence and append an audited repair event
A historical record is edited
Break the ledger chain at the next record
The history is rewritten and re-chained
Refuse the old operator-signed checkpoint
The four trust modes are deterministic:
certify: the available checks support using the result.
advisory: useful as a lead, but not safe to state without qualification.
warn: evidence or health problems require verification.
block: the result must not drive action until the conflict is resolved.
A verdict does not prove that remembered content is true. It makes the reason
for trust inspectable: evidence, provenance, confidence, freshness,
contradictions, and ledger integrity. The exact guarantees and limits live in
the trust model.
Use it from an agent
Nahuali ships a stdio MCP server with tools for capture, recall, inspection,
review, repair, intentions, backup, and ledger verification.
Run nahuali init to install the bundled skill where supported and print a
native-binary MCP configuration. The server is also published as
io.github.Arakiss/nahuali in the official MCP Registry and as an OCI image:
The named volume keeps memory across container restarts. See
MCP onboarding for native and container
configurations.
The trust loop
flowchart LR
A[Observed episode] -->|evidence| B[Claim or link]
B --> C[Authority-aware recall]
C --> D{Trust verdict}
D -->|certify| E[Use with evidence]
D -->|advisory, warn, block| F[Inspect and review]
F --> G[Explicit repair or resolution]
G --> H[Append-only audit event]
H --> C
The deterministic core never calls an LLM. A model may propose a repair, but
the engine classifies, gates, and records it. Contradictions are never silently
overwritten.
Interfaces
Interface
Purpose
Reference
nahuali
Local workflow for agents, operators, audits, backup, and migration
The local HTTP API is unauthenticated. Do not expose it to an untrusted
network. Nahuali does not currently provide accounts, hosted sync, billing, or
a managed control plane.
Storage
SurrealDB's memory_record table is the source of truth. Current memory, graph
tables, snapshots, and semantic vectors are derived and rebuildable.
Embedded SurrealKV is the zero-service default.
A remote SurrealDB endpoint supports shared deployments.
Qdrant is optional and used only for semantic recall.
Deterministic lexical recall works without Qdrant or a model.
reconcile verifies the ledger and rebuilds derived data.
Backup and restore operate on the authoritative record ledger.
The embedded store has one process owner. A long-running MCP or HTTP server owns
the local store while it is active; a second process fails clearly instead of
waiting or risking concurrent writes. Use remote SurrealDB when several
independent processes need the same memory.
Reproducible evidence
The governance benchmark suite tests provenance
coverage, contradiction and staleness detection, trust-verdict calibration,
ledger tampering, and attestation recovery against checked-in fixtures.
The vendor-neutral Agent Memory Trust Benchmark
defines an adapter contract for comparing these capabilities across memory
systems. It reports each capability separately and keeps failures and
unsupported controls visible.