Memory Designのロゴ

Memory Design

コミュニティ
nahid-sparktales
memory-design

Decide what an agent should remember, which layer holds it, who it is scoped to, and how a stale or contradicted memory is detected and retired. Use when an agent forgets something across sessions, when a memory or persistent-context feature is being designed, or when stored memories have grown noisy, wrong, or are leaking between users. Not for retrieval over a document corpus, not for prompt or context-window packing, and not for conversation transcript storage.

概要

公開者nahid-sparktales
リポジトリagent-dispatcher
スキル名memory-design
スター
58
フォーク
5
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    nahid-sparktalesがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Memory Design」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/ai/memory-design
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/ai/memory-design .claude/skills/memory-design
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでMemory Designを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にMemory Designを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Memory Designは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Memory design

Memory is the only part of an agent that keeps being wrong after you stop looking. A retrieval bug shows up in the next answer; a stale memory sits there being quietly confident for months. Design the retirement path before the write path.

When this fires

An agent needs a fact to survive past the current context — across turns, tasks or sessions — or an existing memory store has grown noisy, contradictory, or is surfacing one subject's data to another. It does not fire for retrieval over a document corpus (that is retrieval-rag), and not for keeping a transcript: a transcript is a log, not memory.

Procedure

  1. Name the repeat failure first. What did the agent forget, how often, and what did it cost — a re-asked question, a redone decision, a wrong assumption. Memory added without a named repeat failure is speculative storage, and storage you cannot justify is storage you will not prune.
  2. Classify what is actually worth keeping, because the class decides everything after it:
    • stable facts and preferences — this user's stack, conventions, how they want to be addressed
    • decisions and their rationale — true until explicitly reversed, and the rationale is the part that matters later
    • working state — what this task is mid-way through; it dies with the task
    • derived summaries — regenerable from the source; store only when regeneration is expensive Everything else is a log. Do not promote a log to memory.
  3. Put each class in the shallowest layer that holds it. Working state belongs in a task file or thread state, not a long-term store. Stable facts and decisions belong in a durable record. If the store is a vector index, it is a retrieval system and inherits the retrieval-rag procedure, including the requirement to measure recall — unevaluated vector memory is a wish.
  4. Scope every record explicitly at write time: the subject it is about (this user, this project, this repository, this organization) and who may read it. Default to the narrowest scope. Widening a memory's scope so it crosses users or tenants is a data boundary change — raise it and get an explicit decision, do not infer permission from convenience.
  5. Write memories as assertions with provenance, not as free prose: the claim, when it was learned, what it was learned from (session, message, file, commit), and what would make it false. A memory with no source cannot be retired safely, because nothing can be checked against the thing it came from.
  6. Choose the write trigger deliberately. Writing on every turn produces noise that buries the few records that matter. The triggers that earn a write: the user says to remember, a decision is settled, a correction is issued, or a fact was expensively discovered. A user correcting the agent is the highest-value write there is — never drop one.
  7. Refuse to store secrets and sensitive personal data. Credentials, tokens, keys, payment and identity data do not go into memory, even when they appeared in the conversation. If one is already stored, stop and tell the user rather than quietly acting on it.
  8. Check for staleness at read time, not only on a schedule. Three detectors, cheapest first: contradiction — a new statement conflicts with a stored one; expiry — the record was time-boxed at write (current sprint, active branch, "for now"); reference decay — it names a file, person, project or setting that no longer exists. Verify a load-bearing memory against the live source before acting on it.
  9. Supersede rather than silently overwrite. The replacing record points at what it replaced and says why. History of a reversed decision is often more useful than the decision.
  10. Treat deletion as destructive. Retiring or clearing memory the user gave you removes something they may be relying on. Propose the retirement with the list of what would go, and ask. Never bulk-delete a memory store to fix a formatting problem.
  11. Bound the store and measure usefulness. Set a cap and an eviction rule based on when a record was last read, not when it was written. Track what fraction of stored memories have been read at all in the last N sessions; a large unread tail is cost with no return, and it is the signal to tighten the write trigger from step 6.
  12. Exercise the full loop before calling it done: write a memory, start a genuinely fresh session, confirm it is retrieved and used. Then change the underlying fact and confirm the old record is superseded rather than duplicated, and that the new answer reflects the new fact.

Checklist

  • The repeat failure this memory exists to fix is named
  • Each stored class mapped to a layer, with working state kept out of the durable store
  • Every record carries subject scope and read visibility
  • Every record carries source, timestamp, and a falsification condition
  • Write triggers are explicit; corrections are always captured
  • Secrets and sensitive personal data excluded at the write path
  • Contradiction, expiry and reference-decay checks run before a memory is acted on
  • Supersession preserves what was replaced and why
  • Deletion is proposed to the user, never performed silently
  • Cross-session round trip exercised, including the changed-fact case

Failure handling

  • Two memories contradict each other — do not pick by recency alone. Check both against the live source; if it cannot be resolved, surface the conflict to the user rather than acting on a coin flip.
  • The agent recalls a fact that is no longer true — the defect is in the retirement path, not in retrieval. Fix the expiry or contradiction detector; deleting the one bad record leaves the next one to be found by the user.
  • A memory from one subject surfaced under another — stop, treat it as a data exposure, report it with the scope that was wrong. Do not continue the feature work first.
  • The store is large and nothing is measurably better — that is a result. Report the unread fraction and propose narrowing the write trigger.
  • No durable store is available in this environment — say so, keep the fact in the task's own working state, and do not describe behaviour as persistent when it is not.

Evidence to report

The classes stored and the layer each lives in; a sample record showing scope, source, timestamp and falsification condition; the write triggers as implemented; the staleness checks that run and where they run; the cross-session round trip actually performed, including the changed-fact case, with what was recalled; and the read-rate of the store if it has been running long enough to have one. "It remembers now" without a fresh-session round trip is a claim, not evidence.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Memory Design」では何ができますか?

Decide what an agent should remember, which layer holds it, who it is scoped to, and how a stale or contradicted memory is detected and retired. Use when an agent forgets something across sessions, when a memory or persistent-context feature is being designed, or when stored memories have grown noisy, wrong, or are leaking between users. Not for retrieval over a document corpus, not for prompt or context-window packing, and not for conversation transcript storage.

TypingMindでMemory Designを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Memory Designはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにMemory Designをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/ai/memory-designを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Memory Designを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Memory Designで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもMemory Designを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Memory Design」は無料ですか?

はい。nahid-sparktalesがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇