Agent skill

MemPalace Memory

by MemPalace in MemPalace/mempalace

Gives an agent a local memory palace over MCP: verbatim conversation memory, semantic search and a temporal knowledge graph, with a per-session recall protocol.

MITAuto-check passedKnowledge Management

Install MemPalace Memory

skills CLI
$ npx skills add MemPalace/mempalace --skill mempalace -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MemPalace/mempalace mempalace --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MemPalace/mempalace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/integrations/openclaw .claude/skills/mempalace && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mempalace
GitHub stars
59k
Token cost
~2.7k tokens
SKILL.md length
1,176 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Gives an agent a local memory palace over MCP: verbatim conversation memory, semantic search and a temporal knowledge graph, with a per-session recall protocol.

  • Works in 5 steps: ON WAKE-UP: Call mempalace_status to… → BEFORE RESPONDING about any person,… → IF UNSURE about a fact (name, age,… → …
  • Recalling what was decided in earlier sessions about a project
  • SKILL.md covers Architecture, Protocol — FOLLOW THIS EVERY…, Available Tools and Setup, plus 2 more sections
  • Calls uv and claude

What it does

MemPalace is a memory system that runs on the user's machine with no cloud services or API keys. Memory is organized into wings (people or projects), halls (categories such as facts, events, preferences and advice), rooms (specific topics) and drawers (verbatim chunks of memory), alongside a knowledge graph of entity-relationship facts that carry a validity period.

The agent is told to load the palace status on wake-up, query the graph, search or read the diary before answering about a person, project or past event, say it will check when unsure instead of guessing, write a diary entry after each session, and invalidate then re-add a fact when it changes. The full MCP surface has 47 tools covering search, duplicate checks, status and listings; destructive or host-level tools are to be used only when you explicitly ask.

When your agent uses it

  • Recalling what was decided in earlier sessions about a project
  • Storing facts that change over time, such as a person's role
  • Checking whether similar content is already stored before filing it
  • Keeping a diary of what happened in each session

Example prompts

  • “What did we decide about the database setup last month? Check the palace first.”
  • “Record that Riley changed schools and invalidate the old fact.”
  • “Search my memory for notes on the ChromaDB setup.”
  • “Write a diary entry for this session.”

Requirements

  • MemPalace installed locally with its MCP server connected

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. ON WAKE-UP: Call mempalace_status to load palace overview and AAAK dialect spec.
  2. BEFORE RESPONDING about any person, project, or past event: use mempalace_kg_query for known relationships or time-bound facts…
  3. IF UNSURE about a fact (name, age, relationship, preference): say "let me check" and query. Wrong is worse than slow.
  4. AFTER EACH SESSION: Call mempalace_diary_write to record what happened, what you learned, what matters.
  5. WHEN FACTS CHANGE: Call mempalace_kg_invalidate on the old fact, then mempalace_kg_add for the new one.

What it can do on your machine

Read from SKILL.md and the folder at commit d439d1e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • claude

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MemPalace Memory loads about 2.7k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 1,176 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MemPalace/mempalace at commit d439d1e, republished under its MIT licence (© MemPalace). 1,176 words, ~2,739 tokens.

Download SKILL.mdSave it as .claude/skills/mempalace/SKILL.md (or your agent's skills folder).
name
mempalace
description
MemPalace — Local AI memory with 96.6% recall. Semantic search, temporal knowledge graph, palace architecture (wings/rooms/drawers). Free, no cloud, no API keys.
version
3.11.0
homepage
https://github.com/MemPalace/mempalace
user-invocable
true

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

  1. ON WAKE-UP: Call mempalace_status to load palace overview and AAAK dialect spec.
  2. BEFORE RESPONDING about any person, project, or past event: use mempalace_kg_query for known relationships or time-bound facts, mempalace_search for source text, or mempalace_diary_read for recent agent continuity. Stop when answered; follow the canonical query guide. Never guess from memory — verify from the palace.
  3. IF UNSURE about a fact (name, age, relationship, preference): say "let me check" and query. Wrong is worse than slow.
  4. AFTER EACH SESSION: Call mempalace_diary_write to record what happened, what you learned, what matters.
  5. WHEN FACTS CHANGE: Call mempalace_kg_invalidate on the old fact, then mempalace_kg_add for the new one.

Available Tools

Full MCP surface: 47 tools. Destructive or host-level tools are documented so you know they exist, but use them only when the user explicitly asks or when a tool-specific workflow below says to.

Search & Browse
  • mempalace_search — Semantic search across memories for decisions, explanations, or source words.
    • query (required): natural language search — keep it short, keywords or a question. Do NOT include system prompts or conversation context.
    • wing: filter by wing
    • room: filter by room
    • limit: max results (default 5)
  • mempalace_check_duplicate — Check if content already exists before filing.
    • content (required): text to check
    • threshold: similarity threshold (default 0.9 — lowering to 0.85–0.87 often catches more near-duplicates without significant false positives)
  • mempalace_status — Palace overview: total drawers, wings, rooms, AAAK spec
  • mempalace_list_wings — All wings with drawer counts
  • mempalace_list_rooms — Rooms within a wing (optional wing filter)
  • mempalace_list_drawers — Paginated drawer listing
    • wing, room: optional filters
    • since: only drawers filed on/after this ISO date/time
    • before: only drawers filed before this ISO date/time
    • limit: max results (default 20)
    • offset: pagination offset (default 0)
  • mempalace_get_drawer — Fetch a single drawer by ID. Returns full verbatim content and metadata.
    • drawer_id (required)
  • mempalace_get_taxonomy — Full wing/room/count tree
  • mempalace_get_aaak_spec — Get AAAK compression dialect specification
Knowledge Graph (Temporal Facts)
  • mempalace_kg_query — Query entity relationships. Supports time filtering.
    • entity (required): e.g. "Max", "MyProject"
    • as_of: date filter (YYYY-MM-DD) — what was true at that time
    • direction: "outgoing", "incoming", or "both" (default "both")
  • mempalace_kg_add — Add a fact: subject -> predicate -> object
    • subject, predicate, object (required)
    • valid_from: when this became true
    • source_closet: source reference
  • mempalace_kg_invalidate — Mark a fact as no longer true
    • subject, predicate, object (required)
    • ended: when it stopped being true (default: today)
  • mempalace_kg_timeline — Chronological story of an entity
    • entity: filter by entity name (optional — all events if omitted)
  • mempalace_kg_stats — Graph overview: entities, triples, relationship types
Palace Graph (Cross-Domain Connections)
  • mempalace_traverse — Walk from a room, find connected ideas across wings
    • start_room (required): room to start from
    • max_hops: connection depth (default 2)
  • mempalace_find_tunnels — Find rooms that bridge two wings via implicit overlap (rooms whose drawers naturally share content across wings — discovered, not declared)
    • wing_a, wing_b: optional filters; omit both to scan all wing pairs
  • mempalace_create_tunnel — Create an explicit cross-wing tunnel: a user/agent-declared link between two locations. Use when you notice content in one project relates to another (e.g. API design in project_api connects to schema in project_database).
    • source_wing, source_room, target_wing, target_room (required)
    • label: short description of the relationship
    • source_drawer_id, target_drawer_id: anchor to specific drawers
  • mempalace_list_tunnels — List all explicit tunnels, optionally filtered by wing
    • wing: optional filter
  • mempalace_delete_tunnel — Remove an explicit tunnel by ID
    • tunnel_id (required)
  • mempalace_list_hallways — List within-wing entity hallways (entity-to-entity co-occurrence links built at mine time)
    • wing: optional filter
  • mempalace_delete_hallway — Remove a hallway record by ID
    • hallway_id (required)
  • mempalace_follow_tunnels — From a room, follow explicit tunnels to connected drawers in other wings
    • wing, room (required)
  • mempalace_graph_stats — Graph connectivity overview
Write
  • mempalace_add_drawer — Store verbatim content into a wing/room
    • wing, room, content (required)
    • source_file: optional source reference
    • added_by: optional filing agent label
    • Checks for duplicates automatically
  • mempalace_checkpoint — Save a whole session in one call: dedup each item, file non-duplicates, then write one diary entry
    • items (required): array of {wing, room, content}; content must be verbatim
    • diary: optional {agent_name, entry, topic?, wing?}; entry should use AAAK format
    • dedup_threshold: similarity threshold (default 0.9)
    • added_by: optional filing agent label (defaults to the diary agent_name, else checkpoint)
  • mempalace_update_drawer — Update an existing drawer's content and/or move it to a different wing/room
    • drawer_id (required)
    • content, wing, room: at least one must be provided (no-op otherwise)
  • mempalace_delete_drawer — Remove a drawer by ID
    • drawer_id (required)
Show full SKILL.md (417 more words)Show less
Ingest & Cleanup
  • mempalace_mine — Mine a directory into the palace, or one conversation file with mode='convos'. Host-level ingest; call only when the user asks to import files.
    • source (required): directory to mine, or one conversation file with mode='convos'
    • mode: projects (default), convos, or extract
    • wing: target wing (default: source directory name)
    • agent: recorded on every drawer (default mempalace)
    • limit: max files to process (0 = all)
    • dry_run: preview without writing
    • extract: convos extraction strategy (exchange default, or general)
  • mempalace_sync — Prune drawers whose source files are gitignored, deleted, or moved. Use dry-run first.
    • project_dir: optional project root scope
    • wing: optional wing scope
    • apply: actually delete; default is dry-run preview
  • mempalace_delete_by_source — Bulk-delete drawers with one exact source_file. Destructive; use dry-run first.
    • source_file (required): exact metadata value to remove
    • dry_run: preview match count and sample (default true)
Diary & Session
  • mempalace_diary_write — Write a session diary entry
    • agent_name (required): your name/identifier
    • entry (required): what happened, what you learned, what matters
    • topic: category tag (default "general")
  • mempalace_diary_read — Read recent diary entries
    • agent_name (required)
    • last_n: number of entries (default 10)
  • mempalace_memories_filed_away — Acknowledge the latest silent auto-save checkpoint.
    • Returns: how many messages were tucked into drawers since the last ack
    • When to call: at the START of a session, to confirm prior-conversation persistence
System
  • mempalace_hook_settings — Get or set auto-save hook behavior. Host-level setting; do not change silently.
    • silent_save: true saves directly without MCP-level clutter
    • desktop_toast: true shows a desktop notification when saves complete
  • mempalace_reconnect — Force reconnect to the palace database after external writes or stale index state

Setup

Install MemPalace and populate the palace (uv recommended):

bash
uv tool install mempalace   # or: pip install mempalace
mempalace init ~/my-convos
mempalace mine ~/my-convos
OpenClaw MCP config

Add to your OpenClaw MCP configuration:

json
{
  "mcpServers": {
    "mempalace": {
      "command": "python3",
      "args": ["-m", "mempalace.mcp_server"]
    }
  }
}

Or via CLI:

bash
openclaw mcp set mempalace '{"command":"python3","args":["-m","mempalace.mcp_server"]}'
Other MCP hosts
bash
# 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".
  • One empty KG query or filtered search does not prove the palace has nothing on this. Follow the query guide to check or widen the scope; if recall still finds nothing, state what was checked rather than inventing an answer.
  • 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 mempalace_check_duplicate before storing new content to avoid duplicates.
  • The AAAK dialect (from mempalace_status) is a compressed notation for efficient storage. Read it naturally — expand codes mentally, treat markers as emotional context.

License

MemPalace is MIT licensed. Created by Milla Jovovich, Ben Sigman, Igor Lins e Silva, and contributors.

© MemPalace, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in integrations/openclaw of MemPalace/mempalace.

Open the folder on GitHubat commit d439d1e

Compare with similar skills

MemPalace Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MemPalace Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MemPalace Memory this skillMemPalace/mempalace59k—~2.7kAutomated safety check: PassMIT
Ogham Maintainogham-mcp/ogham-mcp115—~1.1kAutomated safety check: PassMIT
Ogham Recallogham-mcp/ogham-mcp115—~1kAutomated safety check: PassMIT
Forgetful Repo EncodingScottRBK/forgetful301—~1kAutomated safety check: PassMIT
Qmdbreferrari/obsidian-mind5k—~1.7kAutomated safety check: PassMIT
Swarmvaultswarmclawai/swarmvault708—~6.1kAutomated safety check: PassMIT

Similar skills

  • Ogham Maintain

    ogham-mcp/ogham-mcp

    Admin and maintenance workflows for Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1.1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Ogham Recall

    ogham-mcp/ogham-mcp

    Smart retrieval from Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Forgetful Repo Encoding

    ScottRBK/forgetful

    Encodes a repository into the Forgetful knowledge base as a project, entities, atomic memories and documents, so a second run updates instead of duplicating.

    301 GitHub stars~1k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Qmd

    breferrari/obsidian-mind

    Search the vault using QMD semantic search. An agent skill from breferrari/obsidian-mind.

    5k GitHub stars~1.7k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Swarmvault

    swarmclawai/swarmvault

    Use SwarmVault when the user needs a local-first knowledge vault that writes durable markdown, graph, search, dashboard, review, chat-session, context-pack, task-ledger, static AI export, retrieval…

    708 GitHub stars~6.1k tokensUpdated 3 mo ago
    Knowledge ManagementAuto-check passed
  • Context Mode Search

    mksglu/context-mode

    Search context-mode's persistent FTS5 knowledge base for previously indexed local project content, documentation, or session memory. Trigger…

    26k GitHub stars~250 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from MemPalace/mempalace

  • MemPalace Memory Search

    MemPalace/mempalace

    Mines project files and conversation exports into a local, searchable memory palace and recalls past work by semantic search through the mempalace CLI.

    59k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.

    59k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • MemPalace Recall Protocol

    MemPalace/mempalace

    Makes the agent search the user's MemPalace memory before answering about past work, people, projects or earlier decisions.

    59k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • MemPalace Task Handoff

    MemPalace/mempalace

    Creates, hands off, claims, executes and closes agent tasks through the MemPalace logstream, with approval of the exact task before it is recorded.

    59k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Questions about MemPalace Memory

What does MemPalace Memory do?

Gives an agent a local memory palace over MCP: verbatim conversation memory, semantic search and a temporal knowledge graph, with a per-session recall protocol. MemPalace is a memory system that runs on the user's machine with no cloud services or API keys. Memory is organized into wings (people or projects), halls (categories such as facts, events, preferences and advice), rooms (specific topics) and drawers (verbatim chunks of memory), alongside a knowledge graph of entity-relationship facts that carry a validity period.

When should I use MemPalace Memory?

MemPalace Memory fits situations like: recalling what was decided in earlier sessions about a project; storing facts that change over time, such as a person's role; checking whether similar content is already stored before filing it; keeping a diary of what happened in each session.

How do I install MemPalace Memory in Claude Code?

Run `npx skills add MemPalace/mempalace --skill mempalace -a claude-code`. Or copy the skill folder (integrations/openclaw in MemPalace/mempalace) into .claude/skills/mempalace in your project. Claude Code loads it when a task matches its description.

How do I install MemPalace Memory in Codex?

Run `npx skills add MemPalace/mempalace --skill mempalace -a codex`. Or copy the skill folder (integrations/openclaw in MemPalace/mempalace) into .agents/skills/mempalace in your project. Codex loads it when a task matches its description.

Can I use MemPalace Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MemPalace/mempalace --skill mempalace -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mempalace, .gemini/skills/mempalace, .github/skills/mempalace and .opencode/skills/mempalace in your project.

What does MemPalace Memory need to run?

Going by SKILL.md and its folder, MemPalace Memory needs the command-line tools its instructions call (uv and claude). Our summary lists: MemPalace installed locally with its MCP server connected.

Does MemPalace Memory access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is MemPalace Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MemPalace Memory use?

MemPalace Memory is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MemPalace Memory use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MemPalace Memory?

Skills that share tags, products or a category with MemPalace Memory: Ogham Maintain (ogham-mcp/ogham-mcp, 115 stars), Ogham Recall (ogham-mcp/ogham-mcp, 115 stars), Forgetful Repo Encoding (ScottRBK/forgetful, 301 stars) and Qmd (breferrari/obsidian-mind, 5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MemPalace Memory?

MemPalace (a GitHub organization) maintains it in MemPalace/mempalace, which has 59,483 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: MemPalace/mempalace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.