agent-memory-systems · davila7 — Claude Code skill: agent memory and retrieval
A skill on agent memory architecture: short-term and long-term stores, vector databases, chunking, and getting the right fact back.
npx claude-code-templates@latest --skill ai-research/agent-memory-systemsWhat agent-memory-systems does
This skill treats agent memory as a system rather than a bucket. It walks through memory types: short-term (the context window), long-term (vector stores), working, episodic, semantic and procedural memory. Memory formation, retrieval and decay each get their own pass.
The author's core claim is that a memory failure reads as an intelligence failure. When an agent forgets something or contradicts itself, retrieval is usually the culprit, not storage. So the skill covers patterns for picking a vector store, strategies for chunking documents, and anti-patterns such as keeping everything forever or chunking without testing retrieval.
A sharp-edges table rates each problem by severity: contextual chunking, testing chunk sizes, filtering by metadata before the search, temporal scoring, conflict detection on write, token budgets per memory type, and recording the embedding model in metadata. Related skills it points to are autonomous-agents, multi-agent-orchestration, llm-architect and agent-tool-builder. Build agent memory or RAG without retrieval tests and you will hit these same walls.
What it helps with
- pick a memory type for each kind of agent data
- choose a vector store that fits the workload
- split documents into chunks that retrieval can actually find
- diagnose why an agent keeps losing a fact
- fit token budgets across several memory types
Example prompts for the agent
- Work out which memory type fits chat history and which fits the knowledge base
- Suggest a chunking strategy for long documents and how to test it
- The agent gives inconsistent answers — check whether storage or retrieval is at fault
How to install agent-memory-systems
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/agent-memory-systems2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill agent-memory-systems -a claude-code3Manually: put the files in place
~/.claude/skills/agent-memory-systems/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agent-memory-systems/
Manually: put the files in place
.agents/skills/agent-memory-systems/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/agent-memory-systems/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates agent-memory-systems2Manually: put the files in place
.github/skills/agent-memory-systems/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/agent-memory-systemsManually: put the files in place
.devin/skills/agent-memory-systems/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agent-memory-systems
How do I install agent-memory-systems in Claude Code?
Run npx claude-code-templates@latest --skill ai-research/agent-memory-systems. Or use npx skills add davila7/claude-code-templates --skill agent-memory-systems -a claude-code. The skill lands at ~/.claude/skills/agent-memory-systems/SKILL.md.
What does agent-memory-systems do?
It lays out agent memory architecture: memory types, vector stores, chunking, embeddings and retrieval strategies. Useful when you need to explain why an agent drops facts and what to change.
How is it different from a general RAG guide?
It frames memory as a retrieval problem first. The skill ships anti-patterns and a severity-rated table of sharp edges, from contextual chunking to token budgets.
Similar skills
All skills for Agent setup: memory, context, orchestration →agent-memory-systems by other authors comes first.