Logo von Mempalace

Mempalace

Community
ericmjl
mempalace

Use the MemPalace CLI to persist, search, and manage AI memory across sessions. Triggers whenever the user asks to remember, recall, save, store, or retrieve information that should persist across conversations — including past decisions, preferences, facts about people or projects, conversation history, and any verbatim content the user wants preserved. Also triggers when the user mentions "palace", "wings", "rooms", "drawers", "knowledge graph", "AAAK", or when they want to search through historical context, traverse connections between topics, or check what their AI knows. Mirrors the MemPalace MCP server tools: each CLI command maps to an MCP tool with an equivalent trigger condition.

Übersicht

Herausgeberericmjl
Repositoryskills
Skill-Namemempalace
Sterne
41
Forks
5
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von ericmjl auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Mempalace in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/ericmjl/skills/tree/main/skills/mempalace
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ericmjl/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/mempalace .claude/skills/mempalace
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Mempalace in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Mempalace automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Mempalace nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

MemPalace CLI

Use MemPalace CLI commands to store and retrieve persistent memory. Each command below mirrors an MCP server tool with the same trigger condition.

Requirements

bash
pip install mempalace

Architecture

MemPalace organizes memory as a navigable building:

  • Wings — major domains (people, projects, topics)
  • Rooms — specific subjects within a wing (auth-migration, ci-pipeline, pricing)
  • Halls — memory types: hall_facts, hall_events, hall_discoveries, hall_preferences, hall_advice
  • Tunnels — cross-wing connections. Same room name in different wings = automatic link
  • Closets — summaries pointing to original content
  • Drawers — verbatim files. The exact words, never summarized

Underlying storage: ChromaDB (semantic search) + SQLite (knowledge graph). Everything local, no API key.

Commands and Triggers

Each command has a trigger condition that mirrors its MCP server counterpart.


mempalace init <dir>

Mirrors: First-time setup (no direct MCP tool — prerequisite for all tools)

Trigger: User wants to set up MemPalace for the first time, or says "initialize my palace", "set up memory", "start mempalace".

bash
mempalace init ~/projects/myapp
mempalace init ~/projects/myapp --yes    # auto-accept detected entities

Detects people and projects from file content, then detects rooms from folder structure. Creates wing config and entity registry. Must run before mining.


mempalace status

Mirrors: mempalace_status — Palace overview, total drawers, wing and room counts, AAAK spec, memory protocol

Trigger: User asks "what's in my palace?", "show me my memory status", "how many memories do we have?", "what do you know?". Also call at the start of a session to understand the user's world.

bash
mempalace status

Shows total drawers filed, wing breakdown, room counts. Use this to get oriented before any memory operation.


mempalace search "query"

Mirrors: mempalace_search — Semantic search with wing/room filters. Returns verbatim drawer content with similarity scores.

Trigger: User asks any question about past information: "what did we decide about X?", "why did we choose Y?", "find our discussion about Z", "what was the reasoning for...", "search my memory for...", "what do you know about...". Any time the user references a past decision, conversation, or fact that should exist in stored memory.

bash
mempalace search "why did we switch to GraphQL"
mempalace search "auth decision" --wing myapp
mempalace search "pricing discussion" --wing myapp --room costs
mempalace search "Kai sprint" --results 10

Returns verbatim text with similarity scores, wing/room location, and source files. Filter by --wing and --room for targeted retrieval.


mempalace wake-up

Mirrors: mempalace_status + mempalace_diary_read — Load L0 (identity) and L1 (essential story) into context

Trigger: User starts a new session and wants the AI to "remember" them, or says "wake up", "load your memory", "what do you know about me?", "recall our context". Also use when injecting palace context into a local model's system prompt.

bash
mempalace wake-up
mempalace wake-up --wing driftwood

Generates ~600-900 tokens of context: identity from ~/.mempalace/identity.txt plus essential story auto-generated from top palace drawers. Redirect to a file for local model injection:

bash
mempalace wake-up > context.txt

mempalace mine <dir>

Mirrors: mempalace_add_drawer — File verbatim content into the palace (batch operation)

Trigger: User wants to ingest project files or conversation exports into the palace: "import my chats", "mine this project", "ingest these conversations", "load my Claude/ChatGPT history", "add my project files to memory". Also when user says "remember everything in this folder" or "store all these conversations".

bash
# Mine project files (code, docs, notes)
mempalace mine ~/projects/myapp

# Mine conversation exports (Claude, ChatGPT, Slack)
mempalace mine ~/chats/ --mode convos

# Tag with a specific wing name
mempalace mine ~/chats/ --mode convos --wing myapp

# Auto-classify into decisions, preferences, milestones, problems
mempalace mine ~/chats/ --mode convos --extract general

# Preview what would be filed without filing
mempalace mine ~/projects/myapp --dry-run

# Limit number of files
mempalace mine ~/projects/myapp --limit 50

mempalace split <dir>

Mirrors: No direct MCP tool — preprocessing step for mempalace mine --mode convos

Trigger: User has concatenated transcript mega-files that need splitting before mining: "split my chat exports", "these transcripts are all in one file", "separate my conversation sessions". Run before mempalace mine --mode convos when exports contain multiple sessions per file.

bash
mempalace split ~/chats/
mempalace split ~/chats/ --dry-run
mempalace split ~/chats/ --min-sessions 3
mempalace split ~/chats/ --output-dir ~/chats/split/

mempalace compress

Mirrors: mempalace_get_aaak_spec — AAAK compression of palace content

Trigger: User wants to compress stored memories for token-efficient context loading: "compress my memories", "reduce token usage", "AAAK encode my palace", "make my memory smaller for context".

bash
mempalace compress --wing myapp
mempalace compress --wing myapp --dry-run
mempalace compress                         # all wings

Compresses drawers using AAAK dialect and stores in a separate mempalace_compressed collection.


mempalace repair

Mirrors: No direct MCP tool — recovery operation

Trigger: Palace is corrupted, returns errors, or ChromaDB segfaults (known on macOS ARM64): "my palace is broken", "repair my memory", "mempalace crashed", "ChromaDB error", "palace won't load".

bash
mempalace repair

Rebuilds palace vector index from stored data. Creates a backup before rebuilding.


Knowledge Graph (Python API)

Mirrors: mempalace_kg_query, mempalace_kg_add, mempalace_kg_invalidate, mempalace_kg_timeline, mempalace_kg_stats

Trigger: User asks about entity relationships, wants to store structured facts, or needs temporal queries: "what do you know about Kai?", "who works on Orion?", "add that Kai works on Orion", "Kai moved to Nova project", "show me the timeline for project X", "what was true about Y in January?"

The knowledge graph is accessible via Python API (no CLI command yet):

python
from mempalace.knowledge_graph import KnowledgeGraph

kg = KnowledgeGraph()

# Add a fact (mirrors mempalace_kg_add)
kg.add_triple("Kai", "works_on", "Orion", valid_from="2025-06-01")

# Query entity relationships (mirrors mempalace_kg_query)
kg.query_entity("Kai")
# → [Kai → works_on → Orion (current), Kai → recommended → Clerk (2026-01)]

# Temporal query — what was true on a specific date
kg.query_entity("Maya", as_of="2026-01-20")
# → [Maya → assigned_to → auth-migration (active)]

# Invalidate a changed fact (mirrors mempalace_kg_invalidate)
kg.invalidate("Kai", "works_on", "Orion", ended="2026-03-01")

# Chronological timeline (mirrors mempalace_kg_timeline)
kg.timeline("Orion")
# → chronological story of the project

# Graph overview (mirrors mempalace_kg_stats)
kg.stats()
# → entities, triples, current vs expired facts, relationship types

Run inline with uv run or python -c:

bash
python -c "from mempalace.knowledge_graph import KnowledgeGraph; kg = KnowledgeGraph(); print(kg.query_entity('Kai'))"

Search via Python API

Mirrors: mempalace_search — programmatic access to search results

Trigger: Same as mempalace search CLI, but when you need structured data instead of printed output.

python
from mempalace.searcher import search_memories

results = search_memories("auth decisions", palace_path="~/.mempalace/palace")
# Returns dict with query, filters, and results list

Palace Graph Traversal (Python API)

Mirrors: mempalace_traverse, mempalace_find_tunnels, mempalace_graph_stats

Trigger: User wants to explore connections between topics across projects: "what's connected to auth-migration?", "how do these projects relate?", "find cross-project connections", "show me tunnels between wings", "what topics bridge my personal and work wings?"

python
from mempalace.palace_graph import traverse, find_tunnels, graph_stats
import chromadb

client = chromadb.PersistentClient(path="~/.mempalace/palace")
col = client.get_collection("mempalace_drawers")

# Walk from a room across wings (mirrors mempalace_traverse)
traverse("auth-migration", col=col, max_hops=2)

# Find rooms bridging two wings (mirrors mempalace_find_tunnels)
find_tunnels("wing_code", "wing_team", col=col)

# Graph connectivity overview (mirrors mempalace_graph_stats)
graph_stats(col=col)

Memory Stack (Python API)

Mirrors: 4-layer memory protocol from mempalace_status — L0 identity, L1 essential story, L2 on-demand, L3 deep search

Trigger: User wants layered memory loading: "load my identity", "get my essential context", "retrieve on-demand memories for project X", "deep search for..."

python
from mempalace.layers import MemoryStack

stack = MemoryStack()

# L0 + L1 wake-up (~600-900 tokens) — same as `mempalace wake-up`
stack.wake_up()

# L2 on-demand retrieval by wing/room
stack.recall(wing="driftwood", room="auth-migration")

# L3 deep semantic search
stack.search("pricing change")

AAAK Dialect

AAAK is a lossy abbreviation system for token-efficient memory storage. Used by mempalace compress and agent diaries.

  • Entities: 3-letter uppercase codes (ALC=Alice, JOR=Jordan, KAI=Kai)
  • Emotions: *action markers* (*warm*=joy, *fierce*=determined, *raw*=vulnerable, *bloom*=tenderness)
  • Structure: Pipe-separated fields. FAM: family | PROJ: projects | ⚠: warnings
  • Dates: ISO format. Counts: Nx = N mentions. Importance: ★ to ★★★★★
SESSION:2026-04-08|fixed.auth.bug.in.OAuth|KAI→reviewed|ALC→approved.deploy|★★★★

All Commands Quick Reference

mempalace init <dir>                               # set up palace from project
mempalace mine <dir>                               # mine project files
mempalace mine <dir> --mode convos                 # mine conversation exports
mempalace mine <dir> --mode convos --wing myapp    # tag with wing name
mempalace mine <dir> --mode convos --extract general  # auto-classify
mempalace split <dir>                              # split concatenated transcripts
mempalace search "query"                           # semantic search
mempalace search "query" --wing myapp              # search within a wing
mempalace search "query" --room auth-migration     # search within a room
mempalace wake-up                                  # load identity + essential story
mempalace wake-up --wing driftwood                 # project-specific wake-up
mempalace compress --wing myapp                    # AAAK compress
mempalace repair                                   # rebuild corrupted index
mempalace status                                   # palace overview

All commands accept --palace <path> to override the default palace location.

Key Principles

  1. Store verbatim — never summarize when mining. The 96.6% recall score comes from raw mode
  2. Search before asserting — run mempalace search before stating facts about people or projects. Wrong is worse than slow
  3. Update facts, don't duplicate — use kg.invalidate() + kg.add_triple() when facts change
  4. Wake up first — run mempalace wake-up at session start to load context
  5. Filter for precision — use --wing and --room on search for targeted retrieval

Häufig gestellte Fragen

Was macht der KI-Skill Mempalace?

Use the MemPalace CLI to persist, search, and manage AI memory across sessions. Triggers whenever the user asks to remember, recall, save, store, or retrieve information that should persist across conversations — including past decisions, preferences, facts about people or projects, conversation history, and any verbatim content the user wants preserved. Also triggers when the user mentions "palace", "wings", "rooms", "drawers", "knowledge graph", "AAAK", or when they want to search through historical context, traverse connections between topics, or check what their AI knows. Mirrors the Me...

Warum Mempalace in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Mempalace besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Mempalace in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/ericmjl/skills/tree/main/skills/mempalace ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Mempalace nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Mempalace verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Mempalace damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Mempalace kostenlos?

Ja. Der Skill wird von ericmjl auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇