⚡ Agent Memory

3 lines to remember anything

v3.1 Released
~200
Lines of Code
0
LangChain Dependency
4
Storage Backends

The Problem

AI agents need to remember context across conversations, but existing solutions are either too complex (LangChain memory), too coupled (framework-specific), or too heavy (many dependencies).

The Solution

🔹 SQLite Backend

Production-ready persistence with zero setup

⏰ String TTL

Auto-expire memories: "7d", "1h", "30m"

🔐 Encryption

Fernet AES encryption for sensitive data

🔴 Redis

Distributed memory for multi-agent systems

Code Example

# Install: pip install agent-memory
from agent_memory import Memory

# Initialize with SQLite (recommended)
m = Memory(storage="sqlite", path="./memory.db", ttl="7d")

# Add memory with auto-expiry (1 hour)
m.add("User prefers dark mode", ttl="1h")

# Add encrypted memory
m.add("api_key_xxx", encrypt=True)

# Search memories
results = m.search("theme preferences")

# Get context for your agent
context = m.get_context(max_tokens=2000)

🔍 People Search For

View on GitHub →

Why Not LangChain?

LangChain.memory is powerful but comes with 100+ transitive dependencies. If you just need memory — not the entire framework — Agent Memory is your lightweight alternative.

Use Cases

• Give your Claude/Custom GPT agent persistent memory
• Build multi-agent systems with shared memory
• Store user preferences across sessions
• Create AI assistants that remember context
• Implement conversation history for chatbots