Documentation

Docs

Quickstart

60 seconds, zero credentials

Terminal · tested in a fresh clone
git clone https://github.com/unifyWeb3/recallguard
cd recallguard
npm install --ignore-scripts
npm run recall:checked -- --sample sui-clock-revision-lifecycle

Expected output (recorded Mainnet evidence, offline):

RecallGuard · recorded Mainnet lifecycle · read-only
STALE → FRESH → STALE
Predecessor: obs-sui-clock-341742424 · goZjQJ36yLVBG6oPyHqR6wgYQ9HbmISoe-3HWkVB1AY · checkpoint 341742424
Correction:  cor-sui-clock-341742463 · mjxZQ1X2xn5Xlvd-gBsBAIrD5rkUDwFCAn1NEX0gbWY · checkpoint 341742463

Requirements: Node.js ≥ 24. No .env, wallet, API key or network access needed for the recorded samples.

CLI

recallguard: command reference

Installed bins: recallguard (alias of recall_checked, the stable contract name) and recallguard-mcp (the MCP server). recall_checked remains available for compatibility.

recall_checked [--sample <name>] [--query <text>] [--json]
FlagDefaultMeaning
--sample [name]sui-clock-changedReplay labelled recorded Mainnet evidence offline. Also: sui-clock-revision-lifecycle. Never writes. Never touches the network.
--liveoffRecall from Walrus Memory and verify through Tatum Sui Mainnet GraphQL. Needs TATUM_API_KEY, MEMWAL_ACCOUNT_ID, MEMWAL_AGENT_ID, MEMWAL_PRIVATE_KEY (env or .env in cwd). Read-only. Runs a credential self-test first; refuses on failure.
--allow-mainnet-writesoffOnly with --live. Permits correction/policy memories to be written to Walrus. This can incur Mainnet cost; owner approval required.
--query <text>per-sample defaultThe claim to recall and check (≤ 512 chars).
--jsonoffPrint the stable recall_checked/v1 or recall_checked_lifecycle/v1 JSON contract.
--help, -hn/aUsage.

npm scripts: npm run recall:checked · npm run mcp · npm run mcp:smoke · npm test · npm run audit:secrets · npm run export · npm run proof:offline

JavaScript API

Stable recall_checked/v1 contract

import { recallChecked } from "recallguard";
import { recallCheckedSample } from "recallguard";

// Offline: replay the recorded Mainnet evidence (no credentials)
const result = await recallCheckedSample({ sample: "sui-clock-changed" });
// result.verdict === "STALE", result.withheld === true, result.writes.length === 0

// Live: inject the store and Tatum transport (see src/runtime.mjs)
const live = await recallChecked("Is the Sui Clock memory still true?", {
  store, tatum, allowWrites: false, mode: "live-mainnet",
});

Exports: recallChecked, recallCheckedSample, recallCheckedLifecycleSample, RECALL_CHECKED_SCHEMA, AVAILABLE_RECORDED_SAMPLES, and ./core (src/answer.mjs). Writes never happen without allowWrites: true. The package is ESM only; Node ≥ 24.

MCP

Six tools over stdio, read-only by default, verified with Claude Code and Codex. Installation, tested client configuration, tool reference and troubleshooting:

MCP setup →  docs/mcp.md →

Architecture

Deterministic, fail-closed, no LLM in the answer path

query
  │
  ├─ recall candidate from Walrus Memory (MemWal SDK)
  │    └─ parse the FR-v1 proof envelope
  ├─ load per-class policy memory (FALSE-STALE widens · MISSED-CHANGE tightens)
  ├─ freshness gate (fail closed)
  │    ├─ latest Sui checkpoint via Tatum GraphQL     · at most 1 cached read
  │    ├─ current subject version + digest            · at most 1 read
  │    └─ wall-clock backstop
  ├─ FRESH → answer from verified memory
  └─ STALE / WITHHELD_UNVERIFIED → withhold and explain
       └─ correction write only with explicit allow-writes + approval

The freshness window itself is a memory in Walrus Memory (fc-policy-SLOW-v2, blob Zne2mnjAy6uOtOhJ6o5QAxH963EqXQaMMtYWOPBkK_4): the system rewrites it from observed decay. That is deterministic policy evaluation, not autonomous learning. Walrus Memory stores the memories and the revision history; Tatum Sui Mainnet GraphQL provides the current-state evidence; the gate enforces the decision. MCP exposes the same gate to agents.

Security model

What is trusted, what is not

Troubleshooting

Common failures

CLI and library failures
SymptomCauseFix
unknown sampleTypo in --sample--sample sui-clock-changed or --sample sui-clock-revision-lifecycle
credential self-test failed (live)Missing/invalid Tatum or MemWal credentialsFix .env; the CLI refuses to recall on failure by design
WITHHELD_UNVERIFIEDCheckpoint or pin read failed, or proof incompleteFail closed is the correct behaviour; check Tatum availability and the proof fields
429 / rate limitedTatum quotaBuilt-in exponential backoff; the checkpoint read is cached for 1 s. Stop tight-looping the CLI
--allow-mainnet-writes rejectedWrite flag without --liveWrites exist only in live mode; recorded samples are always read-only
MCP client red/disconnectedBad path / node missingSee MCP troubleshooting

Honest limitations

What this release does not claim

Source lives on GitHub: src/ (gate, policy, recall contract, MCP server), test/ (node:test suite), docs/ (mcp.md, blog.md, judge-60s.md), CLAIMS.md (claim ledger).