Mempalace mempalace
MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.
install
source · Clone the upstream repo
git clone https://github.com/MemPalace/mempalace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/MemPalace/mempalace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/integrations/openclaw" ~/.claude/skills/milla-jovovich-mempalace-mempalace-772b8e && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/MemPalace/mempalace "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/integrations/openclaw" ~/.openclaw/skills/milla-jovovich-mempalace-mempalace-772b8e && rm -rf "$T"
manifest:
integrations/openclaw/SKILL.mdsource content
MemPalace — Local AI Memory System
You have access to a local memory palace via MCP tools. The palace stores verbatim conversation history and a temporal knowledge graph — all on the user's machine, zero cloud, zero API calls.
Architecture
- Wings = people or projects (e.g.
,wing_alice
)wing_myproject - Halls = categories (facts, events, preferences, advice)
- Rooms = specific topics (e.g.
,chromadb-setup
)riley-school - Drawers = individual memory chunks (verbatim text)
- Knowledge Graph = entity-relationship facts with time validity
Protocol — FOLLOW THIS EVERY SESSION
- ON WAKE-UP: Call
to load palace overview and AAAK dialect spec.mempalace_status - BEFORE RESPONDING about any person, project, or past event: call
ormempalace_search
FIRST. Never guess from memory — verify from the palace.mempalace_kg_query - IF UNSURE about a fact (name, age, relationship, preference): say "let me check" and query. Wrong is worse than slow.
- AFTER EACH SESSION: Call
to record what happened, what you learned, what matters.mempalace_diary_write - WHEN FACTS CHANGE: Call
on the old fact, thenmempalace_kg_invalidate
for the new one.mempalace_kg_add
Available Tools
Search & Browse
— Semantic search across all memories. Always start here.mempalace_search
(required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.query
: filter by wingwing
: filter by roomroom
: max results (default 5)limit
— Check if content already exists before filing.mempalace_check_duplicate
(required): text to checkcontent
: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)threshold
— Palace overview: total drawers, wings, rooms, AAAK specmempalace_status
— All wings with drawer countsmempalace_list_wings
— Rooms within a wing (optional wing filter)mempalace_list_rooms
— Full wing/room/count treemempalace_get_taxonomy
— Get AAAK compression dialect specificationmempalace_get_aaak_spec
Knowledge Graph (Temporal Facts)
— Query entity relationships. Supports time filtering.mempalace_kg_query
(required): e.g. "Max", "MyProject"entity
: date filter (YYYY-MM-DD) — what was true at that timeas_of
: "outgoing", "incoming", or "both" (default "both")direction
— Add a fact: subject -> predicate -> objectmempalace_kg_add
,subject
,predicate
(required)object
: when this became truevalid_from
: source referencesource_closet
— Mark a fact as no longer truemempalace_kg_invalidate
,subject
,predicate
(required)object
: when it stopped being true (default: today)ended
— Chronological story of an entitymempalace_kg_timeline
: filter by entity name (optional — all events if omitted)entity
— Graph overview: entities, triples, relationship typesmempalace_kg_stats
Palace Graph (Cross-Domain Connections)
— Walk from a room, find connected ideas across wingsmempalace_traverse
(required): room to start fromstart_room
: connection depth (default 2)max_hops
— Find rooms that bridge two wingsmempalace_find_tunnels
,wing_a
(required)wing_b
— Graph connectivity overviewmempalace_graph_stats
Write
— Store verbatim content into a wing/roommempalace_add_drawer
,wing
,room
(required)content
: optional source referencesource_file- Checks for duplicates automatically
— Remove a drawer by IDmempalace_delete_drawer
(required)drawer_id
— Write a session diary entrymempalace_diary_write
(required): your name/identifieragent_name
(required): what happened, what you learned, what mattersentry
: category tag (default "general")topic
— Read recent diary entriesmempalace_diary_read
(required)agent_name
: number of entries (default 10)last_n
Setup
Install MemPalace and populate the palace:
pip install mempalace mempalace init ~/my-convos mempalace mine ~/my-convos
OpenClaw MCP config
Add to your OpenClaw MCP configuration:
{ "mcpServers": { "mempalace": { "command": "python3", "args": ["-m", "mempalace.mcp_server"] } } }
Or via CLI:
openclaw mcp set mempalace '{"command":"python3","args":["-m","mempalace.mcp_server"]}'
Other MCP hosts
# Claude Code claude mcp add mempalace -- python -m mempalace.mcp_server # Cursor — add to .cursor/mcp.json # Codex — add to .codex/mcp.json
Tips
- Search is semantic (meaning-based), not keyword. "What did we discuss about database performance?" works better than "database".
- The knowledge graph stores typed relationships with time windows. Use it for facts about people and projects — it knows WHEN things were true.
- Diary entries accumulate across sessions. Write one at the end of each conversation to build continuity.
- Use
before storing new content to avoid duplicates.mempalace_check_duplicate - The AAAK dialect (from
) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat markers as emotional context.mempalace_status
License
MemPalace is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.