Universal Memory System

Agent Memory

Give your agents sophisticated state management and persistence. Short-term, long-term, episodic memory with GEPA-powered optimization that works across all 8 frameworks.

Works with:
🔷 DSPy
🤖 OpenAI SDK
👥 CrewAI
🔍 Google ADK
💠 Microsoft
🧠 DeepAgents
🐍 Pydantic AI
60%
Token Reduction
5000 → 2000 tokens
55%
Relevance Improvement
30% → 85%
30-50%
Task Success Boost
Higher accuracy
<100ms
Optimization Speed
Per query
Four Memory Types

Complete Memory Architecture

Four integrated memory components working together to give your agents human-like memory capabilities.

Short-Term Memory

Manages temporary, session-based information with automatic eviction policies.

LRU Cache with automatic eviction
Conversation history tracking
Working memory for current tasks
Configurable retention policies
Use Cases:
Recent conversation context, temporary task state, session preferences

Long-Term Memory

Persistent knowledge storage with semantic search capabilities.

Knowledge categorization
Semantic search with embeddings
Flexible tagging system
Importance scoring
Use Cases:
Learned facts, user preferences, domain knowledge, historical patterns

Episodic Memory

Tracks experiences and temporal sequences for pattern analysis.

Episode management
Detailed event logging
Pattern analysis
Timeline reconstruction
Use Cases:
Interaction tracking, performance analysis, learning from experiences

Context Manager

Manages hierarchical context across different scopes.

Global, session, task, local scopes
Context stack management
Automatic persistence
Intelligent context merging
Use Cases:
Agent characteristics, session data, task state, function-specific context
Storage Backends

Flexible Storage Options

Choose the backend that fits your deployment. From simple file storage to high-performance Redis.

🗄️

SQLite

Default backend with relational storage and automatic cleanup

Best For:
Most use cases, development, production
📁

File

JSON/pickle file-based storage with TTL support

Best For:
Simple deployments, debugging
⚡

Redis

High-performance in-memory storage for production

Best For:
High-throughput, distributed systems
GEPA-Powered

Memory Optimization

GEPA intelligently selects the most relevant memories within your token budget. No more context overflow or irrelevant information diluting agent focus.

❌

Without Optimization

Query: "What happened with my shipping issue?"
All 20 memories included (5000+ tokens)
Relevance: 6% (300/5000 tokens useful)
Result: Context overflow!
Context overflow exceeds token limits
Low signal-to-noise ratio
Wasted tokens on irrelevant data

With GEPA Optimization

Query: "What happened with my shipping issue?"
6 memories selected (1010 tokens)
Relevance: 89% (900/1010 tokens useful)
Result: Fits budget perfectly!
80% token reduction
83% relevance improvement
Higher quality responses

How GEPA Scores Memories

Relevance (0.0-1.0)

Keyword overlap, semantic similarity, phrase matches, GEPA Chain of Thought reasoning

Importance (0.0-1.0)

User-defined priority, VIP status, critical info, business rules weighting

Recency (0.0-1.0)

Exponential decay over time, 1-hour half-life, more recent = higher score

Task TypeRelevanceImportanceRecency
Q&A60%30%10%
Conversation30%20%50%
Knowledge Search40%50%10%
Customer Support35%35%30%
Configuration

Easy Setup

Add memory to any agent with simple YAML configuration. Works the same across all frameworks.

# Enable memory with defaults
spec:
  memory:
    enabled: true  # Uses SQLite with standard settings

CLI Commands

$ super agent compile <agent>Memory automatically configured
$ super agent evaluate <agent>Test with memory persistence
$ super agent optimize <agent> --auto mediumGEPA optimizes memory-enhanced agents
$ super agent run <agent>Use with memory persistence

Memory Use Cases

💬

Customer Support Agent

Remember customer history, preferences, and past issues. GEPA prioritizes recent interactions and VIP status.

max_tokens: 2000
task_type: customer_support
📚

Knowledge Base Agent

Store domain knowledge with semantic search. GEPA prioritizes relevance and importance for accurate answers.

max_tokens: 4000
task_type: knowledge
🤖

Conversational Agent

Maintain conversation continuity across sessions. GEPA prioritizes recency for natural dialogue flow.

max_tokens: 3000
task_type: conversation

Key Features

Multi-Backend Support

File, SQLite, Redis. Easy to extend with new backends.

Semantic Search

Sentence-transformer embeddings for similarity-based retrieval.

Automatic Context

Hierarchical scopes with intelligent merging and TTL expiration.

Interaction Tracking

Episode-based management with pattern recognition.

Learning Capabilities

Insight extraction, feedback integration, continuous improvement.

Production Ready

Thread-safe, automatic cleanup, comprehensive error handling.

Give Your Agents Memory

From simple session memory to sophisticated GEPA-optimized context. Start building smarter agents today.