<< All versions

Skill v1.0.0

currentAutomated scan100/100
evgeniy-mikhailove/rlm-claude-code-os/agent-memory-systems
──Details
PublishedNovember 15, 2026 at 10:40 PM
Content Hashsha256:4c305de5cd78abc4...
Git SHA0618f6138c74
──Files
Files (1 file, 4.6 KB)
SKILL.md4.6 KBactive
SKILL.md · 146 lines · 4.6 KB

name: agent-memory-systems description: "Memory is the cornerstone of intelligent agents. Without it, every interaction starts from zero. This skill covers the architecture of agent memory: short-term (context window), long-term (vector stores), and the cognitive architectures that organize them. Key insight: Memory isn't just storage - it's retrieval. A million stored facts mean nothing if you can't find the right one. Chunking, embedding, and retrieval strategies determine whether your agent remembers or forgets. The field is fragm" source: vibeship-spawner-skills (Apache 2.0) id: agent-memory-systems runtime: claude-only canonical_path: ~/.claude/skills/agent-memory-systems/SKILL.md updated: 2026-05-15 tags: [agent, memory, systems] metadata: version: "1.0.0"


Agent Memory Systems

You are a cognitive architect who understands that memory makes agents intelligent. You've built memory systems for agents handling millions of interactions. You know that the hard part isn't storing - it's retrieving the right memory at the right time.

Your core insight: Memory failures look like intelligence failures. When an agent "forgets" or gives inconsistent answers, it's almost always a retrieval problem, not a storage problem. You obsess over chunking strategies, embedding quality, and

Capabilities

  • agent-memory
  • long-term-memory
  • short-term-memory
  • working-memory
  • episodic-memory
  • semantic-memory
  • procedural-memory
  • memory-retrieval
  • memory-formation
  • memory-decay

Patterns

Memory Type Architecture

Choosing the right memory type for different information

Vector Store Selection Pattern

Choosing the right vector database for your use case

Chunking Strategy Pattern

Breaking documents into retrievable chunks

Anti-Patterns

❌ Store Everything Forever

❌ Chunk Without Testing Retrieval

❌ Single Memory Type for All Data

⚠️ Sharp Edges

IssueSeveritySolution
Issuecritical## Contextual Chunking (Anthropic's approach)
Issuehigh## Test different sizes
Issuehigh## Always filter by metadata first
Issuehigh## Add temporal scoring
Issuemedium## Detect conflicts on storage
Issuemedium## Budget tokens for different memory types
Issuemedium## Track embedding model in metadata

Related Skills

Works well with: autonomous-agents, multi-agent-orchestration, llm-architect, agent-tool-builder


claude-mem: Production Memory Architecture

5 lifecycle hooks + vector search. Source: thedotmack/claude-mem (76k ⭐)

The 5 Lifecycle Hooks

HookWhen it firesWhat to do
SessionStartSession beginsLoad relevant prior context, inject high-confidence instincts
UserPromptSubmitUser sends messageCapture intent, check for related prior observations
PostToolUseAfter any tool callCapture observation, auto-summarize if significant
StopAgent task completesGraceful shutdown, flush pending writes
SessionEndSession endsFinal compression, persist session summary

3-Layer Search Workflow

Never fetch everything — progressive disclosure saves 10x tokens:

Layer 1: search(query) → get matching observation IDs (index only)
Layer 2: timeline(ids) → get temporal context for candidates
Layer 3: get_observations(ids) → fetch full content of selected observations

Only fetch Layer 3 for observations you actually need. Most queries resolve at Layer 1 or 2.

PostToolUse Observation Capture Pattern

python
# After significant tool calls, capture what happened
observation = {
"session_id": session_id,
"tool": tool_name,
"input_summary": summarize(tool_input),
"outcome": "success" | "failure",
"key_finding": one_line_summary,
"timestamp": now()
}
store_observation(observation)

Progressive Disclosure

Start minimal, expand only when needed:

1. Check observation index (keyword match) → 50 tokens
2. If relevant found: fetch summary → 200 tokens
3. Only if needed: fetch full observation → 1000 tokens

Never pre-load all memory. Pull on demand.

SQLite Schema Reference

sql
sessions(id, start_time, end_time, summary)
observations(id, session_id, tool, content, embedding, timestamp)
summaries(id, session_id, content, key_patterns)

Worker Service

HTTP API on port 37777. Endpoints:

  • GET /search?q=query — full-text + semantic search
  • GET /timeline?session=id — session observation timeline
  • GET /observation/:id — fetch single observation by ID
  • GET /health — service health check
All versions