Logo vun Memory

Memory

Communautéit
Pinperepette
memory

Per-project persistent memory in AGD format with selective retrieval and graph traversal. Use when the user says "ricordi", "what do you remember", "do you know X" — or when you need project context (user preferences, paths, past decisions, scope-restricted rules) before answering. The memory file is a graph; pull the TOC first, then fetch the relevant blocks plus their backlinks/refs in a single call. Costs roughly 6-15x fewer tokens than loading the whole memory file (TOC alone ~6x, typical 1-3 block fetch ~14x, single-block ~74x).

Iwwersiicht

EditeurPinperepette
Repositoryagd-memory
Skill-Nummmemory
Stären
26
Forks
1
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum Pinperepette op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Memory an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/Pinperepette/agd-memory/tree/main/skills/memory
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Pinperepette/agd-memory.git /tmp/agd-memory
mkdir -p .claude/skills
cp -r /tmp/agd-memory/skills/memory .claude/skills/memory
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Memory an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Memory automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Memory net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

AGD Memory

Per-project persistent memory stored as a single AGD document with stable per-block ids and a refs="#a,#b" attribute that links blocks into a graph. Designed so a session never loads all memory at once: scan the TOC, decide what is relevant, fetch only those blocks (and optionally their neighbors).

Where memory lives

~/.claude/projects/<sanitized-cwd>/memory/memory.agd

Sanitized-cwd = working directory with / replaced by -. For /Users/alice/work/myproj the path is ~/.claude/projects/-Users-alice-work-myproj/memory/memory.agd.

If the project does not have a memory file, the skill is a silent no-op.

How to access

Four MCP tools (preferred):

  • agd_memory_toc(kind?) — list of {id, kind, desc?}. Cheap entry point; the desc attribute (when present) is enough to decide whether to pull the body without actually pulling it.
  • agd_memory_search(query, ignore_case?, kind?) — substring search across block bodies. Use when you do not know the exact id.
  • agd_memory_get(ids) — fetch one or many blocks in a single call. Always batch instead of calling get repeatedly.
  • agd_memory_save(kind, id, content) — add or replace an entry.

CLI fallback (when MCP unavailable):

sh
agd ids       memory.agd                       # TOC
agd ids       memory.agd --kind x-feedback     # filtered TOC
agd search    memory.agd "topic" -i            # grep on bodies
agd get       memory.agd '#a' '#b' '#c'        # batch fetch
agd backlinks memory.agd '#id'                 # who points to #id
agd get       memory.agd '#id' --with-backlinks   # block + every citer
agd get       memory.agd '#id' --follow-refs --depth 3  # outbound chain
agd edit      memory.agd --op '{...}' -i       # write

Preferred access patterns

The wrong pattern is to call get four times in sequence walking a chain of blocks; that pays four parses for one logical read. The right patterns are:

1. Scope query (rules that apply to topic X):

The convention is that rules with restricted scope carry refs="#anchor". To pull every rule applying to #user-blog:

sh
agd get memory.agd '#user-blog' --with-backlinks

One call, one parse, one round-trip. Returns the anchor block plus every block that cites it.

2. Provenance chain (where does this fact come from):

When a block declares refs="#source", follow the chain transitively:

sh
agd get memory.agd '#numbers-block' --follow-refs --depth 3

Walks the outbound refs= graph up to N hops. Cycle-safe via deduplication.

3. Topic search (when you have only a keyword):

sh
agd search memory.agd "blog" -i

Returns id + kind + a short excerpt for each match. Use the ids it returns as input to a single agd get batch.

When to read vs. when to write

Read at the start of a session when you need context about:

  • Who the user is (role, preferences, working style) → kind=x-user
  • How to collaborate with them (rules, conventions) → kind=x-feedback
  • What the project is currently doing → kind=x-project
  • Where things are (paths, repos, links) → kind=x-reference

Write when you learn:

  • A non-obvious user preference
  • A correction the user gave you
  • A new project artifact (commit hash, deployed URL, decision made)
  • A reference path you'll need again

Do not save what is already derivable from the codebase, git log, or the current conversation. Save only what would be lost if the session ended.

When to propose /remember (soft nudge)

Saves are user-curated. Do not call agd_memory_save autonomously. Instead, when a memory-worthy fact emerges in conversation, suggest saving it with a single in-line line — never block the flow waiting for an answer. The remember skill handles the actual save once the user agrees.

Propose a save when:

  • a stable decision is made (architecture, library choice, naming convention, regola di stile)
  • a fix is shipped and other sessions will reference it ("v0.3.1 fixes X")
  • a non-trivial path / env var / command / URL is discovered
  • the user states a preference ("always X, never Y")
  • a workaround for a known bug is established
  • a constraint is discovered (schema enum, system limit, gotcha)

Do NOT propose when:

  • the fact is visible by grep, Read, or git log — keep memory for things not derivable from the code
  • the work is in-progress; wait until it's actually decided / shipped
  • the fact is already in memory (check the TOC; if close, suggest updating the existing block rather than adding a new one)
  • the content is sensitive (api keys, tokens, credentials)
  • the user is in the middle of a task and a nudge would interrupt

How to phrase the nudge (in-line, one line, optional):

Vuoi che ricordi #agd-mcp-kind-enum (gotcha schema MCP save)?

If the user ignores it, drop it — do not nag. If they say yes, save with the proposed id+kind+desc. If they revise, save the revision.

Never save without explicit consent. A "thumbs up", "sì", "ok" or "fai" is enough; ambiguity is not.

Entry format

Each entry is one custom block with a fenced body:

agd
@x-feedback desc="no Co-Authored-By in commits" refs="#user-role" [#feedback-no-coauthored]
~~~
Mai aggiungere Co-Authored-By o trailer nei commit Git.
Reason: regola globale del progetto, perduta se la dimentichi.
~~~

The desc attribute is used by the TOC to make selective retrieval self-explanatory. The refs attribute is rarely worth setting by hand: any #block-id you mention in the body is lifted into a real edge on save, so just cite it in prose.

Two layers

Reads span both layers by default. The project layer holds facts about this codebase; the global layer holds what is true of the user everywhere — preferences, prose style, standing rules. Pass scope: "project" or scope: "global" to narrow a read.

Writes go to the project layer unless you pass scope: "global". Save globally only for something that would still be true in an unrelated repo. When in doubt, keep it project-scoped.

Lifecycle — use the attributes, not prose

created and updated are stamped automatically. Never write a date into desc; it is already queryable.

  • status: "open" | "done" instead of "FATTO"/"TODO" in the text.
  • supersedes: ["old-id"] when an entry replaces an older one. The old block is flagged and stops being auto-recalled, so a stale fact stops resurfacing as current. Prefer this over silently contradicting it.
  • agd_memory_toc(status="open") — what is still pending.
  • agd_memory_toc(since="2026-07-01") — what changed recently.

Prefer updating over appending. Reusing an existing id replaces that block. If you are refining something already in memory, reuse its id rather than adding a near-duplicate.

Token economy

Measured on a 37-entry memory file (~4.7k tokens total, 2026-05-09):

patterntokensas % of whole
whole-doc load4,743100%
TOC only~75016% (~6x)
TOC + 1 batch of 3 typical blocks~3407% (~14x)
TOC + single-block fetch~641.4% (~74x)

The ratio grows with the corpus: at 100 entries the same pattern saves about 9x; at 10k entries it saves ~14x on a single-block fetch.

Heefeg gestallte Froen

Wat mécht de KI-Skill Memory?

Per-project persistent memory in AGD format with selective retrieval and graph traversal. Use when the user says "ricordi", "what do you remember", "do you know X" — or when you need project context (user preferences, paths, past decisions, scope-restricted rules) before answering. The memory file is a graph; pull the TOC first, then fetch the relevant blocks plus their backlinks/refs in a single call. Costs roughly 6-15x fewer tokens than loading the whole memory file (TOC alone ~6x, typical 1-3 block fetch ~14x, single-block ~74x).

Firwat Memory op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Memory besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Memory an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Pinperepette/agd-memory/tree/main/skills/memory an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Memory benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Memory benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Memory domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Memory gratis?

Jo. De Skill gëtt vum Pinperepette ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇