mempalace-recall
GitHubMemPalace记忆宫殿召回协议,指导Agent在回答涉及过往决策、人物或项目等问题前,先通过MCP工具搜索记忆库而非依赖模型幻觉,确保答案基于存储事实。
Trigger Scenarios
Install
npx skills add MemPalace/mempalace --skill mempalace-recall -g -y
SKILL.md
Frontmatter
{
"name": "mempalace-recall",
"description": "Recall protocol for MemPalace — search the palace before answering about past work, prior decisions, people, or projects. Use when the user asks what was decided, what happened before, who someone is, what was discussed last time, or anything that may already be filed in their memory palace.",
"allowed-tools": "Bash"
}
MemPalace Recall
Search-before-answer protocol for MemPalace. Read the user's memory
palace before answering anything that may already be filed there,
instead of guessing from model memory. This complements the mempalace
skill (install / mine / status); this one covers recall only.
Step 0 — Verify MemPalace is available
mempalace --version
If the mempalace_* MCP tools are not available, tell the user the
server is not connected and point them at the mempalace skill or
/init. Do not silently fall back to answering from model memory.
When to recall
Search the palace before answering whenever the user asks about something that may be filed:
- Past work or prior decisions — "what did we decide / try / do?"
- A person, project, or entity — "who is …", "what is …"
- An earlier session — "remember when …", "last time …"
- A preference, fact, or relationship that could have changed over time
Skip recall for pure greenfield work with no memory relevance (renaming a variable, fixing a typo). Recall is question-driven, not reflexive.
Protocol
- Before responding about people / projects / past events / prior
decisions: call
mempalace_searchfirst. Usemempalace_kg_queryfor relational or time-bound facts. - If unsure about a fact: say "let me check the palace" and query.
- Return the drawer's verbatim text — never summarize or paraphrase stored content.
- After a substantive session, record continuity with
mempalace_diary_write(skip if a background hook already saved). - When a fact changes: use
mempalace_kg_supersedefor single-valued replacements,mempalace_kg_invalidatefor facts that ended without replacement, andmempalace_kg_addfor independent/coexisting facts.
Unhappy paths
- Empty results — say the palace has nothing on this; do not invent an answer. Offer to widen the search or file the new information.
- MCP error / server down — surface the error, suggest
mempalace statusor re-running/init; never fall back to guessing. - Palace index corrupt / compactor error — if the server reports an
HNSW segment-writer error, a ChromaDB compaction failure, or stays
"Not connected" after a write, the index is out of sync with
chroma.sqlite3but the rows are intact. Tell the user to stop the server and rebuild from SQLite (mempalace repair --mode from-sqlite --archive-existing --yes), not re-mine, which drops MCP-added drawers and diary entries (#1843). Do not repair in-process. - Conflicting facts — trust the knowledge graph's time-valid answer;
use
mempalace_kg_supersedefor single-valued replacements,mempalace_kg_invalidatefor facts that ended without replacement, andmempalace_kg_addfor independent/coexisting facts.
The canonical protocol, shared across all MemPalace integrations, lives
in integrations/shared/recall-protocol.md.
Version History
-
517a7a0
Current 2026-08-19 23:47
文档更新:补充了知识图谱(KG)中supersede(覆盖/替换)的使用说明及指南。
- aa89bd8 2026-07-25 05:32


