Nine memory strategies.
Two mischievous agents.
One playground.
No extra tokens to lose.
A playground for exploring how AI agents remember and forget over time. Compare two agents side by side, each powered by a different memory strategy: sequential, sliding window, summarization, RAG, graph, compression, hierarchical, memory-augmented, or OS-style paging.
- Run:
cp .env.example .env(add your API keys), then./start.sh - Ports: Backend 8000, frontend 3000
- Manual: Backend
python3 api.py; frontendcd frontend && npm install && npm run dev
- 9 Memory Strategies: Compare different approaches to managing conversation history
- Dual Agent Comparison: Run two agents side-by-side with different strategies
- Real-time Performance Metrics: Track retrieval time, generation time, and token usage
- Interactive Dark UI: Modern minimalist design with glassmorphism effects
- Sequential Memory: Stores complete conversation history
- Sliding Window: Maintains only the N most recent turns
- Summarization Memory: Periodically summarizes old conversations
- OS-Style Paging: Simulates RAM/disk with intelligent paging
- RAG Memory: Vector-based semantic search
- Compression Memory: Intelligent information compression
- Graph Knowledge Memory: Relationship-based knowledge graph
- Hierarchical Memory: Combines working memory + long-term storage
- Memory-Augmented: Sliding window + persistent memory tokens
| Shortcut | Action |
|---|---|
Cmd/Ctrl + Enter |
Send message (to focused agent) |
Cmd/Ctrl + Shift + Enter |
Send message to both agents |
Cmd/Ctrl + K |
Clear agent memory |
Cmd/Ctrl + / |
Focus message input |
- FastAPI - Modern Python web framework
- OpenAI API - LLM and embeddings
- FAISS - Vector similarity search
- NetworkX - Graph-based memory
- Tiktoken - Token counting
GET /api/strategies # List available strategies
POST /api/agent/create # Create agent with strategy
POST /api/chat # Send message to agent
GET /api/agent/{id}/stats # Get memory statistics
POST /api/agent/{id}/clear # Clear agent memory
DELETE /api/agent/{id} # Delete agent
- Select agents and memory strategies: Use the config panel to set the desired memory strategy and model for each agent (for example, Agent A: "Sequential Memory", Agent B: "Sliding Window").
- Compose and send messages: Enter a message in the input box. Use Cmd/Ctrl + Enter to send to the focused agent, or Cmd/Ctrl + Shift + Enter to send to both agents at once.
- Observe agent responses: Compare how each agent responds based on their configured memory strategies.
- Explore agent memory: Use the "Clear agent memory" shortcut (Cmd/Ctrl + K) as needed, and switch between strategies to see how memory impacts responses.
- Monitor key metrics: Track retrieval time, generation time, and token usage beneath each agent's chat to evaluate performance and efficiency of different strategies.
- Experiment and iterate: Try out various strategies, models, and message types to see how the UI and agents behave in different scenarios.
Once you start prompting, the metrics area under each agent window will show:
| Metric | Description |
|---|---|
| Retrieval time | Time to fetch context from memory (e.g. vector search for RAG, graph lookup) before the LLM runs. |
| Generation time | Time the LLM took to produce the reply. |
| Token usage | Prompt and completion tokens so you can compare strategies by latency and token use. |
Built for devs allergic to misbehaving agents 🎡
