Skip to main content

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

Python 3.11+ License: MIT Version PyPI

v25.0.0829 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

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

License

MIT — see LICENSE. Author: Lucas Bailey.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whitemagic-25.0.0.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whitemagic-25.0.0-py3-none-any.whl (4.3 MB view details)

Uploaded Python 3

File details

Details for the file whitemagic-25.0.0.tar.gz.

File metadata

  • Download URL: whitemagic-25.0.0.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

Hashes for whitemagic-25.0.0.tar.gz
Algorithm Hash digest
SHA256 4765a69cce28887af4fb34a4357820f2350a10057c8db5a8c8028e20b6e4200e
MD5 0bc76fff33bc6377a621a7ba38165960
BLAKE2b-256 10c2afae160b26ac097d684f45cf288fd525220ea58b35bad98bfa12132f4e84

See more details on using hashes here.

File details

Details for the file whitemagic-25.0.0-py3-none-any.whl.

File metadata

  • Download URL: whitemagic-25.0.0-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

Hashes for whitemagic-25.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4abf39aeacc53716a9e777f43bc005497e30dcca2a62c3788759d954f933d989
MD5 76336e397beda01cdea9bc4fc52242e4
BLAKE2b-256 7976da23d6a1b6aeeddf485eb2834c85bfc39957bd261e2dfdec0354add030d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page