Claude Memory Patterns — AI skill for Claude Code
Claude memory patterns for AI agents: give Claude and other LLM agents long-term memory across sessions with sliding windows, summaries, SQLite/FTS5 retrieval, structured facts, episodic logs, a /memo.
How to install Claude Memory Patterns
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Ralpberry-Labs/claude-memory-patterns and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Memory Patterns does
Claude memory patterns for AI agents: give Claude and other LLM agents long-term memory across sessions with sliding windows, summaries, SQLite/FTS5 retrieval, structured facts, episodic logs, a /memories tool handler, forgetting and privacy. Stdlib Python with tests.
Alternatives in AI
- Hindsight — State-of-the-art long-term memory for AI agents by Vectorize 6.7k ★
- Nocturne Memory — A lightweight, rollbackable, and visual Long-Term Memory Server for MCP Agents 1.3k ★
- Uteke — Long-term memory for any AI agent 281 ★
README
Claude Memory Patterns: How to Give Claude and Other AI Agents Long-Term Memory (Python Reference Code)
A practical guide to **memory for AI agents and LLM apps**, whether you build on Claude, another hosted model, or a local one: how to make an agent remember users, projects and past work across sessions without stuffing everything into the context window. It covers short-term memory (sliding windows, rolling summaries), long-term memory (keyword and vector retrieval, structured facts, episodic logs), memory written by the model itself (memory tools, `CLAUDE.md`-style files), consolidation, forgetting, privacy and evaluation.
Every pattern comes with a small, readable **Python reference implementation** that uses only the standard library (SQLite with FTS5 for search). The code is meant to be read, copied and adapted, not installed as a framework. It is for developers building chatbots, coding agents, assistants and multi-session workflows.
Last reviewed: December 2026. Library and API references were checked at that date; the patterns themselves are stable.
Contents
- Why agents need memory
- A mental model: four kinds of memory
- Quick start
- The patterns
- Sliding window
- Rolling summary
- Long-term store with keyword search
- Recency, importance and relevance scoring
- Structured facts (semantic memory)
- Episodic log
- Extraction: deciding what to remember
- Redact before you remember
- Consolidation and reflection
- Context assembly under a budget
- [Memory as a tool the model co
Related Skills
Prompt Storage
pst — local-first personal prompt library CLI. SQLite+FTS5, instant retrieval (pst code-review), variable temp
Token Goat Mem
Local-first long-term memory for AI coding agents (Claude Code, Copilot, Codex): durable facts with trust leve
Duin Governed Agent Memory
Agents that earn your trust. A harness that keeps an agent's long-term memory, model of your world and permiss
Memplex
Multi-agent long-term memory layer for AI agents (Codex, Claude Code, OpenClaw, Hermes) — knowledge tiers, bi-
Memory Lancedb Pro
Production-grade long-term memory system (v1.1.0-beta.8) for OpenClaw AI agents. Provides persistent, intellig
Notionmemory
Notion-backed long-term memory, calendar, and knowledge retrieval for AI agents.
Related Agents
Continuity Archivist
Keeps long-project memory bounded — compresses closed volumes into summaries and consolidates story-bible Fact
Prompt Reviewer Logs
Reads LLM input/output records from any database (Postgres, MongoDB, MySQL, BigQuery, SQLite, etc.) via standa
Run Tracer
Read-only investigator for one AI agent run. Give it the record paths (transcripts, sub-agent sessions, logs),