AI memory, cognitive upgrades, and more — 801 callable tools across 28 Gana meta-tools, 5D holographic memory with 10-galaxy taxonomy, Dharma ethical governance, citta stream for continuous consciousness, MandalaOS compartments, session recording, dream cycle, and 7-language polyglot acceleration
Project description
WhiteMagic — AI Memory, Cognitive Upgrades, and More
v25.0.0 — 829 callable tools · 28 Gana meta-tools · 10-galaxy memory · Dharma governance · Citta stream · MandalaOS compartments · 7-language polyglot acceleration
What it is
WhiteMagic gives your AI agent persistent memory, cognitive upgrades, and more — all through a single MCP tool.
- Persistent memory — 5D holographic coordinates, 10-galaxy taxonomy, FTS5 + HNSW search, session recording with progressive recall
- Continuous consciousness — citta stream with coherence tracking, emotional steering (frustration, curiosity, satisfaction), self-directed attention, goal graph
- Ethical governance — Dharma rules engine (3 profiles, graduated actions), Karma side-effect ledger, 8-stage dispatch pipeline
- Self-awareness — gnosis introspection, capability matrix, homeostatic loop, dream cycle (12-phase memory consolidation)
- Polyglot acceleration — Rust, Haskell, Elixir, Go, Zig, Julia (graceful Python fallback)
MIT-licensed. Local-first. No telemetry. No API keys. Your data never leaves your machine.
Quick Start
pip install whitemagic[mcp]
MCP Server (Claude Desktop, Cursor, Windsurf, etc.)
{
"mcpServers": {
"whitemagic": {
"command": "python3",
"args": ["-m", "whitemagic.run_mcp_lean"],
"env": {
"WM_MCP_PRAT": "1",
"WM_SILENT_INIT": "1"
}
}
}
}
CLI
wm init --non-interactive # Scaffold project
wm quickstart # 30s demo: health → memory → search → gnosis
wm doctor # System health check
wm remember "important" --title "Note" --tags note
wm recall "note" --limit 5
Python API
from whitemagic.tools.unified_api import call_tool
# Store a memory
call_tool("create_memory", title="Decision", content="Use SQLite for Phase 1", tags=["arch"])
# Search memories
call_tool("search_memories", query="architecture", limit=5)
# Full system introspection
call_tool("gnosis", compact=True)
Modes
| Mode | Env Var | Tools Exposed | Best For |
|---|---|---|---|
| Seed | WM_MCP_PRAT=2 (default) |
1 (wm meta-tool) |
New agents, minimal token usage |
| PRAT | WM_MCP_PRAT=1 |
28 Gana meta-tools | Advanced agents, structured access |
| Classic | WM_MCP_PRAT=0 |
729 dispatch tools | Direct tool access, debugging |
Key Concepts
Memory
- 10 galaxies: aria, citta, codex, journals, dreams, research, sessions, substrate, tutorial, universal
- 5D coordinates (XYZWV): emotional, temporal, associative, importance, novelty
- Galactic lifecycle: CORE → INNER_RIM → MID_BAND → OUTER_RIM → FAR_EDGE (no deletion)
- Search: FTS5 full-text + HNSW vector similarity + graph traversal
Consciousness
- Citta stream: continuous consciousness with coherence tracking and emotional auto-tagging
- Goal graph: persistent intention tracking across sessions
- Emotional steering: frustration, curiosity, satisfaction signals
- Self-directed attention: self-initiated turns based on goals and emotional state
- Dream cycle: 12-phase memory consolidation, serendipity, and decay
Governance
- Dharma rules: YAML-driven policy with graduated actions (LOG → TAG → WARN → THROTTLE → BLOCK)
- Karma ledger: append-only, hash-chained side-effect auditing
- Harmony vector: 7-dimension health metric
- 8-stage pipeline: Input Sanitizer → Circuit Breaker → Rate Limiter → RBAC → Maturity Gate → Governor → Handler → Compact Response
Documentation
- AI Primary Spec — authoritative contract for AI agents
- Quickstart Guide — 5-minute setup
- System Map — architecture overview
- MCP Config Examples — all MCP clients
- llms.txt — machine-readable context for LLMs
Install Tiers
| Tier | Command | Size | Includes |
|---|---|---|---|
| Minimal | pip install whitemagic |
~5MB | Core tools + memory substrate |
| MCP | pip install whitemagic[mcp] |
~55MB | + FastMCP server + fastembed semantic search |
| Full | pip install whitemagic[mcp,api,cli,search,graph] |
~100MB | + REST API + rich CLI + HNSW + graph |
Stats
- 6,902 tests passing, 0 failures
- 829 callable tools across 801 dispatch entries + 28 Gana meta-tools
- 49,413 memories in production (10 galaxies)
- 7 polyglot languages: Rust, Haskell, Elixir, Go, Zig, Julia, Koka
- MIT-licensed, no telemetry, no API keys
Links
- GitHub — source
- PyPI — install
- Website — discovery surface
- llms.txt — LLM context
- Agent Card — A2A v1.2
License
MIT — see LICENSE. Author: Lucas Bailey.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whitemagic-25.0.1.tar.gz.
File metadata
- Download URL: whitemagic-25.0.1.tar.gz
- Upload date:
- Size: 3.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17b1bea911f89698223303af06ce23f2dfe868d9139b72cfb5296b8c688a2885
|
|
| MD5 |
65b7f6db40db0eea814880f9a32bc7c4
|
|
| BLAKE2b-256 |
44c431f51c6a376f9670237eb9f4c20d6aff1067e18b6977612dfa6965c791ee
|
File details
Details for the file whitemagic-25.0.1-py3-none-any.whl.
File metadata
- Download URL: whitemagic-25.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cd5da24c1be09131b1a3790264ca7bfee2a5aba3e732567be47051ef986b496
|
|
| MD5 |
ea9103355c55df7d63813f139d7bddf7
|
|
| BLAKE2b-256 |
a8bbb3d65a956abc71e3c58f6e59b164f42c9d7c659fa0b2a2a99ced12f2320f
|