mcp server
agent-memory-kit
Memory patterns, context strategies, and persistence recipes for AI agents. Sliding window, vector recall, hybrid memory, MCP memory servers, and more.
Set up
Runs on your computer. Pick your agent and operating system.
This project does not publish an install method we can turn into a config. Follow the README instead.
README
synced Oct 27, 2026Agent Memory Kit — Memory Patterns for AI Agents
Memory patterns, context strategies, and persistence recipes for AI agents. The #1 unsolved pain point in production AI agents — session persistence and context management.
Why Agent Memory?
Agent memory is the hottest unsolved problem in AI engineering (2026). Three repos in this space hit 220K+ stars in a single week. Every production agent eventually needs:
- Remembering what happened last turn
- Surfacing relevant past conversations
- Managing context windows without losing information
- Persisting state across sessions
- Choosing what to forget
This kit solves that. Patterns, not abstractions. Grab what works.
What's Inside
Memory Patterns
| Pattern | Use Case |
|---|---|
| Sliding Window | Keep last N turns — simple, cheap, works for short sessions |
| Summary Compression | Summarize older context to fit within token limits |
| Vector Recall | Semantic search over past conversations using embeddings |
| Hybrid Memory | Short-term window + long-term vector recall combined |
| Episodic vs Semantic | Separate specific events from general knowledge |
Memory Strategies
| Strategy | Description |
|---|---|
| Session Persistence | Save/load agent state across restarts |
| Cross-Session Recall | Remember user preferences and past sessions |
| Context Windowing | Manage context windows for long-running agents |
| Cache-Aware Design | Maximize prompt caching for memory operations |
MCP Integration
| Guide | Description |
|---|---|
| MCP Memory Server Config | Configure MCP memory servers for agent persistence |
| MCP Memory Integration | Connect MCP tools to agent memory systems |
Memory Prompts
| Prompt | Use Case |
|---|---|
| Memory Injection | System prompt patterns for injecting memory context |
| Context Summarization | Prompts for summarizing conversation history |
| Recall Instructions | Instructions for agents to recall and use past info |
Framework Guides
| Framework | Description |
|---|---|
| LangGraph Memory | Memory patterns in LangGraph agents |
| LlamaIndex Memory | Memory in LlamaIndex workflows |
| CrewAI Memory | Memory in CrewAI multi-agent systems |
Quick Start
git clone https://github.com/FreeAutomation-Tech/agent-memory-kit.git
cd agent-memory-kit
# Browse memory patterns
ls patterns/
# Use a pattern
cat patterns/sliding-window.md
# Run an example
python examples/chat-memory.py
# Test memory patterns
python -m pytest tests/
Structure
patterns/ # Core memory patterns
strategies/ # Memory management strategies
mcp/ # MCP memory server integration
prompts/ # System prompts for memory
frameworks/ # Framework-specific guides
examples/ # Runnable Python examples
tools/ # Memory analysis tools
tests/ # Test files
Usage
# Read a pattern
cat patterns/hybrid-memory.md
# Try the chat memory example
python examples/chat-memory.py
# Analyze your context usage
python tools/context_analyzer.py --log conversation.log
# Test memory patterns
python tools/memory_test.py --pattern sliding-window
Related Repositories
- claude-marketing-kit — Claude Marketing Skills + Python engine (copy, CRO, analytics, email, social, brand)
- claude-seo-kit — Claude SEO Skills + Python engine (audits, schema, sitemap, hreflang, GEO)
- agent-security-kit — Security patterns for AI agents
- claude-prompt-kit — Prompt engineering patterns
License
MIT — see LICENSE.
If you find this useful, please consider giving it a star ⭐ — it helps others discover it too!
Thank you for your support! 🙏