Governed local-first memory and continuity for AI agents — signed receipts, optional hosted lane.
A local-first memory layer for MCP agents.
WhiteMagic gives an AI agent durable project memory over MCP: record important context, find it after restart, and carry useful decisions into the next session — without sending your memory store to any hosted service.
You are an agent reading this repo? Start with skill.md (five-minute operational onboarding) and llms.txt (machine-readable index).
{
"mcpServers": {
"whitemagic": {
"command": "wm",
"args": ["serve", "--profile", "cyberbrain"]
}
}
}
Remote MCP — https://mcp.whitemagic.dev/mcp (streamable-http):
read-only recall over a curated public corpus; keyless discovery; evaluation
keys with a published 50 recalls/day allowance; OAuth 2.1; x402 session lease
options published as $0.01 for 5 minutes or $0.50 for 24 hours, with a
published 10,000 RPM limit; and memory.search_batch for up to 10 queries in
one MCP call. These limits and options are described by the live server
card; the batch
tool is also present in the live tools/list response. Your local store is
not uploaded to this read-only recall lane.
Receipt verification and agent trust API — https://api.whitemagic.dev:
stateless POST /verify for continuity-receipt bundles (/health and /info
keyless), plus a published /erc8004/validate adapter targeting Base. See the
API's live service metadata and endpoint
documentation for the advertised contract.
Memory Crystal client and API — scripts/crystal_client.py
seals and opens crystal envelopes locally with AES-256-GCM or
ChaCha20-Poly1305 (install the optional dependency with
python3 -m pip install cryptography). The API documentation
lists crystal store, fetch, and lineage endpoints; successful hosted
persistence and retrieval are not implied by local encryption support.
The helper is distributed as source in this repository; it is not bundled
into the wm binary or platform installers. Use the helper from the source
revision matching the server/API you intend to use. Generate a client key
into a protected file with
python3 scripts/crystal_client.py genkey --out crystal.key, then pass that
file to seal and unseal with --key.
seal obtains the owner locator from the authenticated
/crystals/owner-locator endpoint. This requires an owner credential and an
existing registry mapping; a payment or session pass does not establish
ownership. If an existing crystal is unmapped, use the contact page
to request a manual ownership review.
Supply the bearer credential through the WM_CRYSTAL_TOKEN environment
variable or --token-file /path/to/credential. Token files must be regular,
non-symlink files with mode 0600 or stricter. Do not put credentials in
command-line arguments or send plaintext or encryption keys to support.
seal, push, pull, and lineage require authenticated owner access;
seal, pull, and lineage no longer accept --tenant; keyless pulls and
lineage queries are no longer supported. The former tenant-hash CLI flow is
a breaking change.
WhiteMagic Gen3 (the wm 10.5.0 line). Release channel: open
alpha — public alpha for MCP agents. The version number is a compatibility
signal; the channel is an evidence claim (beta and stable each require their
own exit conditions, not a version milestone).
v9.3.4 release line while v10 ONNX Runtime packaging is Linux glibc 2.39+ and macOS arm64). Releases also publish gzipped distributables (~58% smaller) that the installer prefers on slow links. macOS installs through the same checksum-verified installer (hardware smoke evidence in issue #2); Windows installs the stable line through scripts/install.ps1. Every gated installer path in the active matrix is certified against the published release in CI.SECURITY.md.The supported alpha contract:
wm selftest) with host-health diagnostics;Download the binary and its checksum from the
latest release, then
(substituting your platform's artifact name — for example
wm-linux-x86_64, wm-linux-aarch64, or wm-macos-aarch64; the
.gz variants decompress with gunzip -c <file>.gz > <file>):
sha256sum -c wm-linux-x86_64.sha256
chmod +x wm-linux-x86_64
mkdir -p ~/.local/bin && mv wm-linux-x86_64 ~/.local/bin/wm
If ~/.local/bin is not on your PATH:
export PATH="$HOME/.local/bin:$PATH"
Or use the install script (resolves the latest release, picks the right artifact for your platform, and verifies the checksum automatically):
curl -fsSL https://www.whitemagic.dev/install.sh?ref=readme | sh
npx whitemagic-mcp serve # npm (no global install)
cargo install whitemagic # crates.io
docker run -i lbailey94/whitemagic:9 serve # Docker Hub
Adoption snapshot (2026-10-16): 5,680 npm downloads · 6,173 Docker Hub pulls · 322 crates.io downloads. Package installs are independent of the installer and grew without any website CTA — the memory layer chooses its own doors.
Verify the installation and see the product work end to end:
wm --version # wm 10.5.0
wm status # display substrate status, epoch, record counts, and store health
wm grimoire proves the environment and previews client wiring; add --write
to write detected MCP client configurations (--json for a machine-readable
report). wm selftest runs the full invariant check (a throwaway store plus
host health); see docs/SELFTEST_AND_HOST_HEALTH.md.
wm status # store, epoch, record counts, store health
wm selftest # install invariant + host health (--json, --strict)
wm remember "decision text" # record a memory (--galaxy, --source, --kind)
wm recall "query" # search memories (--limit, --historical, --scope)
wm session list # sessions: checkpoint | record | continuity | list
wm serve # MCP stdio server (--profile cyberbrain is the default)
The v9-only commands (doctor, connect, setup, quickstart, backup,
restore, update, seal, verify, trust, anchor) belong to the wm9
binary line, not the Gen3 wm documented here.
Point any MCP client at:
wm serve # cyberbrain profile (default)
wm serve --profile full # full curated catalog
The server communicates over stdio. Two profiles exist:
cyberbrain (default) — 12 lean MCP tools: memory_recall,
memory_remember, memory_get, memory_stats, the wm meta-tool
(explicit route= dispatch to the catalog), session_checkpoint,
session_continuity, session_record, session_list, galaxy_list,
galaxy_fork, mesh_sync.full — 40 curated routes covering memory CRUD, search, sessions,
receipts, galaxies, mandala, gnosis, sangha, and mesh; optional features add
gated routes (decision.shortlist, decision.deliberate,
decision.outcome, systemone.decide) when compiled in. A default build
reports 43 routes via wm contract --json (the route count is whatever the
running binary registered — that manifest is the authority).Explicit routing is the dependable contract:
wm(route="memory.create", args={...})wm(route="session.start", args={...})wm(route="galaxy.list", args={})~/.local/share/whitemagic/gen3 (override with
--store <path> or WM_STORE). Nothing is sent to WhiteMagic-operated
services; there is no telemetry by default (any future sharing is opt-in,
previewable, and schema-bound).The Gen3 wm has no backup/restore subcommands (wm backup, wm restore,
wm doctor, wm seal, and wm verify are part of the v9 wm9 line). Back up
the whole store directory while no server is running:
# Stop any `wm serve` first, then copy the store root:
cp -a ~/.local/share/whitemagic/gen3 /path/to/external/disk/gen3-$(date +%F)
wm selftest and inspect it with
wm status.mandala/session internals) is a short-lived undo, not
a substitute for backups.The codebase contains a larger research system beyond the product boundary:
autonomous cycles, dream consolidation, bicameral reasoning, an imagination
engine, self-play training loops, polyglot sidecars (Julia/Haskell/Zig/Koka),
a signed multi-agent mesh, holographic memory coordinates, and the rest of the
route catalog reachable via wm serve --profile full plus the optional
feature-gated routes. wm contract --json is the authority for the compiled
route set. These are research surfaces without product acceptance evidence;
they may change or be removed. Only surfaces documented in this README are part
of the product contract.
Requires Rust 1.85+:
cargo build --release
cargo test # full test suite
cargo clippy --all-targets
benchmarks/pinned_task_eval.py runs 32 authored scenarios, eight each for continuity, conflict, record-addressed repair, and cue-guided deterministic migration. The final frozen run is tied to public source commit 766edb2, a local source-derived candidate whose exact version and binary hash are recorded in the task report. It is not the separately signed release binary; this run does not qualify the current public-main release. The final task report and machine-readable results are archived with the evaluation. The historical 19169fa result JSON remains available separately.
agent_context.text stayed within a 1,120 UTF-8-byte cap (largest 1,091; mean of per-context ceil(bytes/4) estimates 266.625). This is a byte-based estimate, not a tokenizer guarantee; transport/debug metadata is excluded.These are scripted authored cases, not an open-ended model study: there is no connected model, unseen holdout, or autonomous-agent evaluation. Structured files tie WhiteMagic on continuity, governed conflict, and discovery; baseline wire overheads differ. Salience and discovery use bounded text patterns that can misread quoted, negated, stale, speculative, or unfamiliar phrasing; they do not independently prove authority or truth. Latency includes fresh process startup and unequal tool batches, so the run establishes no latency or cost advantage.
Reproduce with the reviewed candidate binary and the archived harness:
WM_BINARY=/absolute/path/to/reviewed/wm python3 benchmarks/pinned_task_eval.py
python3 -m unittest discover -s benchmarks -p test_pinned_task_eval.py
docs/INDEX.md — map of the documentation treedocs/SELFTEST_AND_HOST_HEALTH.md — wm selftest checks, thresholds, and --strict/--json contractsbenchmarks/pinned_task_eval.py — 24-scenario continuity, conflict resolution, and surgical repair evaluation harnessINSTALL.md — source build, store setup, optional model layerskill.md — five-minute agent onboardingllms.txt — machine-readable indexdocs/CHARTER.md — binding constitutional coredocs/NUCLEUS.md — frozen nucleus snapshotcontinuity-receipt — signed, offline-verifiable records of governed tasks (separate spec repo, Apache-2.0)CHANGELOG.md — release notesSECURITY.md — reporting vulnerabilitiesIf you ran the retired Python version (v26) or an earlier Gen2 line, audit and
migrate its LMDB store (the directory containing data.mdb) into Gen3:
wm census ~/.whitemagic/users/local/galaxies/lmdb # zero-dependency audit
wm migrate --source ~/.whitemagic/lmdb --dry-run # preview
wm migrate --source ~/.whitemagic/lmdb # migrate into the Gen3 store
wm migrate-all --source-root <projects-root> --target-root ~/.local/share/whitemagic/gen3-projects
wm quarantine <file> reviews the migration quarantine log; a WM_STORE/--store
override selects the destination.
Local memory → governed execution → verifiable continuity
whitemagic — local-first memory and session continuity for AI agentscontinuity-receipt — portable, offline-verifiable evidence for governed tasks (Apache-2.0)mandalaos-gate-lite — bounded agent execution that emits receipts (review snapshot)whitemagic-plugins — client integrations and adaptersEach repository stands on its own: WhiteMagic does not require MandalaOS, and
Continuity Receipt does not require WhiteMagic. Three entrances — use it →
whitemagic; review a protocol → continuity-receipt; attack the
security architecture → mandalaos-gate-lite.
MIT © Lucas Bailey and WhiteMagic Contributors
0x213b6bB4fB073E86167c58DA6Cb6E9477557DaA8 · XRPL tip jar
raakfKn96zVmXqKwRTDTH5K3j5eTBp1hPy — see
https://www.whitemagic.dev/support. Services are paid via x402 or
evaluation keys; the tip jar unlocks nothing.CONTRIBUTING.mdSource-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y whitemagic-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-lbailey94-whitemagic-mcp": {
"command": "npx",
"args": [
"-y",
"whitemagic-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencewhitemagic-mcpnpmWhiteMagic — governed local memory for agent continuity works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.