WhiteMagic is a local-first memory layer for MCP agents, primarily serving AI coding agents. It gives agents persistent project memory: recording important context, retrieving it after restarts, and carrying useful decisions forward to the next session, all without sending memory storage to any hosted service.
Purpose
WhiteMagic solves the problem of AI agents lacking persistent memory when working across sessions. Through MCP (Model Context Protocol), it provides agents with memory creation, retrieval, and session continuity capabilities, and emphasizes a local-first, governed, single-user operating mode.
Main Capabilities
- Persistent memory: records important context, retrievable after restarts, supports memory creation and lexical search without an external model.
- Session continuity: supports session record, replay, and cross-session continuity.
- Verifiable handoff: enables verifiable task handoff through signed continuity receipts.
- Audit and governance: provides a hash-chain audit ledger, as well as Landlock isolation and firebreak protection.
- Backup and migration: supports cross-device backup, export, and import; the Gen3 version has no backup/restore subcommand, so the entire storage directory must be backed up while the server is not running.
- Self-check and diagnostics: provides the wm selftest end-to-end installation invariant check and host health diagnostics.
- Privacy: no telemetry by default, no requirement to use WhiteMagic cloud services; privacy flags are used to exclude memories from responses and reasoning, and are access control rather than encryption.
Usage
Installation: download the binary and its checksum from the latest release, or use the installation script (which automatically resolves the latest version, selects the corresponding platform artifact, and verifies the checksum). Supported installation paths include Linux x86-64, Linux arm64, macOS arm64, and Windows x86_64. Linux builds are dynamically linked (glibc 2.39+).
Verify installation:
- wm grimoire verifies the environment and previews client wiring; adding --write writes the detected MCP client configuration, and --json outputs a machine-readable report.
- wm selftest runs the full invariant check (temporary storage plus host health).
Connect an MCP client: point any MCP client at this server; the server communicates over stdio. Two configuration profiles are provided:
- cyberbrain (default): 12 streamlined MCP tools, including memory_recall, memory_remember, memory_get, memory_stats, the wm meta-tool (explicitly dispatched to the catalog via route=), 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 at compile time (decision.shortlist, decision.deliberate, decision.outcome, systemone.decide). The default build reports 43 routes via wm contract --json.
Explicit routing examples:
- wm(route="memory.create", args={...})
- wm(route="session.start", args={...})
- wm(route="galaxy.list", args={})
Data storage: storage is located locally at ~/.local/share/whitemagic/gen3, and can be overridden with --store <path> or WM_STORE.
Building from source: requires Rust 1.85+.
Migrating from v26 / Gen2 (LMDB storage): use wm quarantine <file> to review the migration quarantine log; WM_STORE / --store overrides can select the target location.
Hosted Services (Separate from the Local Package)
- Remote MCP:https://mcp.whitemagic.dev/mcp(streamable-http),对精选公共语料提供只读召回;支持无密钥发现;评估密钥公布每日 50 recall credits; OAuth 2.1; x402 session leases are published at $0.01 for 5 minutes or $0.50 for 24 hours, with a published 10,000 RPM limit; memory.search_batch supports up to 10 queries in a single MCP call. Local storage is not uploaded to this read-only recall channel.
- Receipt verification and agent trust API:https://api.whitemagic.dev,无状态 POST /verify is used for continuity receipt packages (/health and /info do not require a key), and there is also a Base-oriented /erc8004/validate adapter.
- Memory Crystal client and API: scripts/crystal_client.py locally seals and opens crystal envelopes using AES-256-GCM or ChaCha20-Poly1305 (requires installing the optional dependency python3 -m pip install cryptography). This helper script is distributed as source code and is not packaged into the wm binary or platform installers. Generate a client key: python3 scripts/crystal_client.py genkey --out crystal.key, then pass that file via --key to seal and unseal. seal obtains the owner locator from the authenticated /crystals/owner-locator endpoint and requires owner credentials and an existing registry mapping; payment or a session pass does not constitute ownership. Credentials are provided via the WM_CRYSTAL_TOKEN environment variable or --token-file /path/to/credential; the token file must be a regular non-symlink file with permissions of 0600 or stricter. seal, push, pull, and lineage require authenticated owner access; seal, pull, and lineage no longer accept --tenant; keyless pull and lineage queries are no longer supported.
Use cases
- AI coding agents need to retain project context and decisions across sessions.
- Need to run a memory layer in a local, single-user, governed environment without data leaving the machine.
- Need verifiable task handoff and audit records.
- Need to back up, export, and import memory storage across multiple devices.
Limitations
- The current release channel is open alpha (wm 10.4.0 line); the version number is a compatibility signal, and the channel is an evidence claim.
- Support window: the current minor version and the previous minor version of the installation-gated lines (Linux x86-64, Linux arm64, macOS arm64, Windows x86_64) receive fixes; earlier minor versions are in archivedstatus.
- The privacy flag is access control, not encryption; anyone who can read the storage file can read the contents, and credentials should not be stored in memory.
- Conversation capture happens through explicit tool calls and is not automatic.
- Gen3 wm has no backup / restore subcommands; transaction rollback (internal to mandala/session) is a short-term undo and cannot replace backups.
- The codebase contains research systems beyond the product boundary (autonomous loops, dream consolidation, bicameral reasoning, imagination engine, self-play training loops, multilingual sidecar, signed multi-agent mesh, holographic memory coordinates, etc.); these research surfaces have no product acceptance evidence and may change or be removed.
- Persistence and retrieval success of the hosted service are not implied by local encryption support.
- Some facts (such as specific prices, platform support details, etc.) are subject to official releases; content not provided in this introduction is not yet provided.