agent-memory-designer
Skill3 starsChanged 4 months agoMITView on GitHub
Design agent memory architecture: short-term context, long-term vector store, episodic logs, and retention policies with privacy controls. Use when building persistent agents, chatbots with memory, or multi-session AI assistants.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- khalilbenaz/claude-skills-collectiontheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- khalilbenaz/claude-skills-collection★ 28same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-server-generatorSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Document read/write latency and cost per tier.
- Distinctive: line 128
Start with session + explicit user profile.
- Distinctive: line 130
Run memory hygiene audits monthly.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Memory Designer
Purpose
Design agent memory architecture: what to remember, where to store it, how to retrieve it, and when to forget — with privacy and cost controls.
Input: Agent use case, session patterns, data sensitivity, latency/cost budget
Output: Memory Architecture document with tiers, schemas, retrieval flows, and hygiene rules
Examples: See examples.md for worked input/output.
Workflow
Step 1: Classify memory needs
| Memory type | Scope | Typical TTL | Example |
| Working | Current turn / task | Minutes | Tool results in context |
| Session | Single conversation | Hours | User preferences stated today |
| Episodic | Past interactions | Days–months | "User fixed bug X last week" |
| Semantic | Facts about user/domain | Long-term | Profile, project context |
| Procedural | How agent should behave | Versioned | Learned corrections |
Map each user story to required memory types.
Step 2: Choose storage tiers
| Tier | Technology pattern | When to use |
| Context window | In-prompt assembly | Hot working memory |
| Key-value / session store | Redis, DynamoDB | Fast session state |
| Vector store | pgvector, Pinecone, LanceDB | Semantic recall |
| Document store | Postgres JSONB | Structured user profiles |
| Append-only log | Event stream | Audit and episodic replay |
Document read/write latency and cost per tier.
Step 3: Design write path
Define what gets written after each agent turn:
- Extract — entities, decisions, user corrections, task outcomes
- Summarize — compress verbose turns into durable facts
- Dedupe — merge with existing memories (same key → update, not duplicate)
- Score — importance / confidence before persistence
Include triggers: user correction always writes; routine chit-chat may not.
Step 4: Design read path (recall)
Query → Intent classifier → Retrieve from tiers → Rank → Budget trim → Inject into context| Recall strategy | Use when |
| Similarity search | Open-ended "what did we discuss about X?" |
| Key lookup | Known profile fields |
| Recency-weighted | Session continuity |
| Hybrid | Production agents (default) |
Set top-k, similarity threshold, and max tokens injected.
Step 5: Define hygiene and governance
| Policy | Rule |
| Retention | TTL per memory class |
| Deletion | User request, account close, GDPR erasure |
| PII | Never store secrets; redact before write |
| Staleness | Re-validate facts older than N days |
| Compaction | Weekly summarize episodic → semantic |
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| High-sensitivity data (health, finance) | Stop; require encryption at rest + minimal retention |
| No user identity | Session-only memory; no cross-session semantic store |
| Memory bloat / high recall cost | Add compaction job and relevance threshold |
| User says "forget that" | Delete matching memories + confirm |
| Multi-agent system | Shared memory bus with namespace per agent |
| Contradictory memories | Prefer newest high-confidence; flag for user |
Validation
- Memory types mapped to user stories
- Storage tier per type with TTL documented
- Write path: extract, summarize, dedupe rules defined
- Read path: retrieval strategy and token budget set
- PII and secrets exclusion enforced at write
- User deletion and retention policies specified
- Cost estimate per 1k sessions (storage + embedding + recall)
- Failure mode: empty recall falls back gracefully
Anti-patterns
- Remember everything — unbounded logs inflate cost and inject noise.
- Vector-only memory — losing structured keys makes profile lookup unreliable.
- No TTL — stale facts poison agent behavior months later.
- Recall without ranking — dumping top-20 chunks floods context.
- Cross-user leakage — missing tenant isolation in shared vector index.
Best Practices
- Start with session + explicit user profile; add episodic memory when needed.
- Store memories as atomic facts with source turn ID and timestamp.
- Run memory hygiene audits monthly; prune low-relevance episodic entries.
- Pair with
context-engineeringfor assembly order and budget. - Log recall hits/misses for tuning thresholds.
Output Structure
# Memory Architecture: [Agent Name]
## Requirements
| Story | Memory types needed |
|-------|---------------------|
## Storage Tiers
| Type | Store | TTL | Est. cost |
|------|-------|-----|-----------|
## Write Pipeline
[Extract → Summarize → Dedupe → Persist]
## Read Pipeline
[Query → Retrieve → Rank → Inject]
## Schemas
[Memory record JSON examples]
## Hygiene Policies
| Policy | Rule |
|--------|------|
## Security
[PII, encryption, tenant isolation]Next Skills
| Outcome | Recommended Skill |
| Assemble recalled context | ai/context-engineering |
| Multi-agent shared memory | ai/multi-agent-planner |
| Privacy / compliance review | security/ai-governance-advisor |
| Evaluate memory impact on quality | ai/ai-evaluation-builder |
| RAG corpus vs agent memory boundary | rag/rag-architecture-designer |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

