Логотип Memory Architecture

Memory Architecture

Спільнота
d-padmanabhan
memory-architecture

Design and review persistent memory and knowledge systems for AI agents, including durable project knowledge, team knowledge bases, retrieval, provenance, conflict handling, retention, and tenant isolation. Use when architecting agent memory across sessions, deciding where knowledge should persist, or reviewing memory quality and security. Do not use for ordinary note-taking or short-lived task context.

Огляд

Видавецьd-padmanabhan
Репозиторійagent-engineering-handbook
Назва навичкиmemory-architecture
Зірки
20
Форки
3
Файли в пакеті
5
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 5

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: d-padmanabhan. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Memory Architecture у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/memory-architecture
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/memory-architecture .claude/skills/memory-architecture
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Memory Architecture в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Memory Architecture, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Memory Architecture не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Memory Architecture

Design persistent memory as a governed knowledge system, not as a larger prompt. Separate evidence from claims, choose storage from durability and trust requirements, filter before retrieval, cite what is used, and measure whether memory improves outcomes.

When to Use

Use this skill for:

  • Agent or assistant memory that persists across sessions
  • Durable project or team knowledge bases
  • Retrieval pipelines that assemble context automatically
  • Note deduplication, contradiction handling, supersession, or retention
  • Security and privacy reviews of persistent AI memory

Do not use it for:

  • One-off questions or ordinary documentation
  • Current-task handoff files such as tmp/active-context.md
  • Web research refreshes whose storage architecture is already defined
  • Model-provider API syntax without a memory-system design decision

For temporary coding-agent context, use agent workflow context management. For bounded web refreshes, use web-research-kb-refresh. For trust-boundary reviews, compose with zero-trust.

Non-Negotiables

  1. Raw input is untrusted evidence, not ground truth. Preserve its provenance and scan it for prompt injection, sensitive data, and malformed content.
  2. Ephemeral context is not durable memory. A gitignored tmp/ directory is appropriate for replaceable session state, not the only copy of team knowledge.
  3. Evidence and claims are separate records. A claim cites evidence; changing a claim does not rewrite the source.
  4. Trust never escalates automatically. Models and background jobs may propose claims or flag conflicts, but only an authorized human or deterministic policy may approve higher-trust states.
  5. Tenant and authorization filters run before semantic retrieval. Similarity does not grant access.
  6. Similarity is a candidate signal. It does not prove duplication, agreement, or contradiction.
  7. Supersession preserves lineage. Do not move or delete records in a way that breaks stable identifiers and citations.
  8. Every retrieved claim is attributable. Return stable claim IDs and source citations with generated context.
  9. Deletion is a designed operation. Remove the canonical record, derived chunks, embeddings, caches, and replicas according to policy.
  10. Quality is measured. Evaluate retrieval relevance, groundedness, freshness, conflict handling, and isolation before calling the system reliable.

Architecture Decision Workflow

1. Classify the Memory Need

Choose one primary class before selecting technology:

ClassLifetimeTypical storageExamples
Session contextHours or days; replaceableGitignored local files or session storeCurrent task, handoff, temporary plan
Durable local knowledgeMonths; single operator or repositoryVersioned files or local database with backupDecisions, project facts, curated notes
Shared or production memoryPolicy-defined; multi-user or multi-agentAuthorized database, object store, and search indexTeam KB, customer memory, operational knowledge

If the requested persistence, recovery, sharing, or access controls do not match the proposed store, stop and redesign the storage layer.

2. Define the Trust and Data Boundaries

Record:

  • Principals: writers, reviewers, retrievers, administrators, and downstream agents
  • Tenants and authorization scopes
  • Data classifications, including personal data, secrets, and regulated data
  • Evidence sources and external processing, including embedding providers
  • Retention, deletion, legal hold, backup, and recovery requirements
  • Worst-case outcomes from poisoned, stale, leaked, or cross-tenant memory

See security and privacy for the threat model and control checklist.

3. Separate the Planes

  • Evidence plane: original content plus source identity, hash, acquisition time, and classification
  • Knowledge plane: atomic claims, review state, confidence rationale, validity, and evidence links
  • Index plane: replaceable chunks, keywords, and embeddings derived from authorized records
  • Context plane: request-specific, token-bounded, attributed material assembled after policy checks
  • Lifecycle plane: review, conflict resolution, supersession, retention, deletion, and reindexing

4. Define the Record Contract

Require stable IDs and enough metadata to answer:

  • What is the claim?
  • Which evidence supports it?
  • Who or what created and approved it?
  • Which tenant and classification own it?
  • When was it valid, reviewed, and retrieved?
  • What supersedes or conflicts with it?
  • When must it be reviewed or deleted?

Use the data model as a starting contract. Extend it for the domain instead of weakening its provenance or isolation fields.

5. Design Retrieval

Apply the retrieval sequence in this order:

  1. Authenticate the caller and resolve tenant, purpose, and policy.
  2. Apply authorization, classification, validity, retention, and deletion filters.
  3. Generate candidates with keyword, metadata, graph, or embedding retrieval.
  4. Rerank using relevance, evidence authority, freshness requirements, and review state.
  5. Detect incompatible claims and surface unresolved conflicts.
  6. Enforce a context token budget and diversity limits.
  7. Return claim IDs, source citations, and ranking reasons with the selected context.

Do not use a universal ranking such as human_confirmed > inferred > raw. Authority and freshness depend on the claim, source, domain, and request. See retrieval and evaluation.

6. Design Writes and Lifecycle

  • Validate and classify before storing.
  • Make ingestion idempotent with stable source IDs and content hashes.
  • Treat similarity matches as review candidates.
  • Keep conflict state separate from supersession state.
  • Use optimistic concurrency or version checks for reviewed records.
  • Rebuild derived indexes after approval, supersession, deletion, or policy changes.
  • Archive only when policy permits; never use archival to evade deletion.
  • Audit writes, approvals, retrievals, conflicts, exports, and deletions.

For a lightweight repository implementation, use the local-file pattern.

7. Define Evaluation and Exit Criteria

Before rollout, create a representative query set with expected claims and prohibited results. Measure:

  • Retrieval precision and recall at the configured context budget
  • Citation and claim groundedness
  • Stale or superseded claim retrieval rate
  • Conflict detection and surfacing rate
  • Cross-tenant and unauthorized retrieval rate, which must be zero
  • Deletion propagation across canonical and derived stores
  • Latency, index freshness, token use, and cost

Test poisoning, malicious source instructions, ambiguous identity, stale claims, conflicting approved claims, index lag, provider outage, and deletion failure.

Design Review Output

Produce:

  1. Memory class and storage decision with rejected alternatives
  2. Principals, tenants, data classifications, and trust boundaries
  3. Evidence and claim schemas
  4. Ingestion, retrieval, write, conflict, and deletion flows
  5. Security and privacy controls
  6. Evaluation dataset, metrics, thresholds, and rollback criteria
  7. Open risks, owners, and reversal conditions

References

Related Handbook Guidance

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Memory Architecture?

Design and review persistent memory and knowledge systems for AI agents, including durable project knowledge, team knowledge bases, retrieval, provenance, conflict handling, retention, and tenant isolation. Use when architecting agent memory across sessions, deciding where knowledge should persist, or reviewing memory quality and security. Do not use for ordinary note-taking or short-lived task context.

Навіщо використовувати Memory Architecture у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Memory Architecture — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Memory Architecture у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/memory-architecture. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Memory Architecture?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Memory Architecture?

Зі скількома забажаєте. У TypingMind ви можете використовувати Memory Architecture із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Memory Architecture?

Так. На GitHub цю навичку публікує d-padmanabhan за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇