Quick Start
Quick Comparison
| Aspect | Conversation Store | Knowledge Store | State Store |
|---|---|---|---|
| What it stores | Chat messages | Documents & chunks | Learned facts & preferences |
| Agent param | memory={"session_id": "..."} | knowledge=[...] | memory=True |
| Lifetime | Persistent | Persistent | Persistent |
| Direction | Read + Write | Read-mostly | Read + Write |
| Search | Sequential | Semantic (RAG) | Text similarity |
| Dependencies | None | chromadb | None (file) / chromadb |
| Use case | Resume conversations | Answer from documents | Remember preferences |
Conversation Store
Saves chat messages so users can resume conversations after app restart.Supported Databases
Knowledge Store
Pre-loads documents into a vector database for semantic search (RAG). Agents find relevant information by meaning, not keywords.Supported Databases
State Store
Stores learned facts, preferences, and entities across sessions. Agents get smarter over time.Supported Databases
Which Store Do I Need?
Using Multiple Stores Together
The most powerful pattern combines all three stores.Performance
| Store Type | Setup Time | Query Time | Dependencies |
|---|---|---|---|
| Conversation | 0ms | 1-5ms | None |
| Knowledge | 1-5s per doc | 50-200ms | chromadb |
| State (file) | 0ms | 1-5ms | None |
| State (chromadb) | ~100ms | 20-100ms | chromadb |
Start with zero-dependency stores (JSON files). Add chromadb only when you need semantic search.
Best Practices
Start simple, add stores as needed
Start simple, add stores as needed
Most agents only need one store type. Add
memory={"session_id": "..."} for chat apps, knowledge=[...] for document Q&A, or memory=True for learning agents. Combine only when your use case requires it.Use meaningful session IDs
Use meaningful session IDs
Include user context in session IDs:
user-123-main, support-ticket-456. This isolates conversations and makes debugging easier.Choose the right database for production
Choose the right database for production
JSON files work for development. For production: PostgreSQL for conversation stores, ChromaDB or Qdrant for knowledge stores, Redis for fast state stores.
Keep knowledge stores focused
Keep knowledge stores focused
Load only relevant documents per agent. A support agent needs FAQs, not engineering specs. Smaller knowledge bases give faster, more accurate results.

