agent-memory-architecture
БесплатноБез исполняемых скриптовНе проверенDesign tiered agent memory — core / recall / archival — with backend selection (mem0, Letta, Zep/Graphiti, LangMem) and temporal vs snapshot tradeoffs. Use…
от akillness★ 63 звезды на GitHubОб этом скилле
Agent Memory Architecture
Overview
Conversation history ≠ memory. Production agents need tiered stores: hot in-context, warm vector recall, cold archival, plus temporal knowledge graphs for facts that change over time. This skill picks the backend and tier layout.
When to use
- Agent needs to remember user preferences across sessions
- Multi-session task continuity (Ralph, long-running research)
- Personalization that survives restarts
- Multi-tenant agents with strict isolation
- Facts change over time (price, status, relationships) → temporal KG needed
Backend selection
| Backend | Strength | Pick when |
|---|---|---|
| mem0 | Self-improving, fact extraction, OSS | Personalization, conversational memory |
| Letta (MemGPT) | OS-style tiered memory, persistence | Agent-as-process, long-lived agents |
| Zep / Graphiti | Temporal knowledge graph, bi-temporal | Facts change over time, need history |
| LangMem | LangGraph-native, simple | Already on LangGraph, no extra service |
| Postgres + pgvector | Roll your own, full control | Compliance / on-prem requirements |
Tier design
┌─────────────────────────────────────────────┐
│ Core (in context) — identity, rules │ <2k tokens
├─────────────────────────────────────────────┤
│ Recall (vector search) — last N sessions │ 100k+ items
├─────────────────────────────────────────────┤
│ Archival (cold store) — full history │ unbounded
└─────────────────────────────────────────────┘
Promotion rule: archival → recall on retrieval; recall → core on repeated use. Eviction rule: core → recall on token pressure; recall → archival on staleness.
Temporal vs snapshot
- Snapshot: latest value wins (mem0 default). Simple, loses history.
- Temporal (bi-temporal): every fact has
valid_from,valid_to,recorded_at. Required when "what did the agent believe yesterday?" matters.
Graphiti / Zep give you bi-temporal out of the box. Hand-rolled needs (entity, relation, value, t_valid_start, t_valid_end, t_recorded) tuples.
Privacy patterns
- Per-tenant memory namespace, never share embeddings across users
- PII detection (Presidio) before embedding
- TTL on recall tier (e.g. 90 days), explicit retention for archival
- User-initiated forget: hard-delete from all tiers + reindex
Quick start — mem0
from mem0 import Memory
m = Memory()
m.add("User prefers concise answers in Korean.", user_id="jeo")
results = m.search("language preference", user_id="jeo")
Quick start — Graphiti (temporal)
from graphiti_core import Graphiti
g = Graphiti(neo4j_uri, neo4j_user, neo4j_pwd)
await g.add_episode(name="session_1", episode_body="User joined Acme Corp 2026-03-01", reference_time=datetime.now())
nodes = await g.search("where does the user work?")
Further reading
- mem0 — fact extraction, semantic search
- Letta (MemGPT) — OS-style memory blocks
- Graphiti / Zep — bi-temporal knowledge graph
- LangMem — LangGraph-native memory primitives
Установить agent-memory-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agent-memory-architecture?
Design tiered agent memory — core / recall / archival — with backend selection (mem0, Letta, Zep/Graphiti, LangMem) and temporal vs snapshot tradeoffs. Use when an agent needs persistent context across sessions, personalization, or temporal knowledge graphs.
Как установить скилл agent-memory-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-memory-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic