How to Add Persistent Memory to LlamaIndex Agents
LlamaIndex chat engines lose conversation history when the process stops. Add a persistent chat store so your agents remember every conversation across sessions.
The Problem
- ✗Chat memory buffer is in-process only
- ✗Conversations start from scratch after every restart
- ✗No semantic search across past conversations
- ✗No rollback if the agent stores incorrect context
The Solution: Novyx
novyx-llamaindex provides a NovyxChatStore that drops in as a backend for any LlamaIndex chat engine. Conversations persist, search works by meaning, and you get rollback out of the box.
Quick Start
Install the integration package:
pip install novyx-llamaindexAdd persistent memory to your chat engine:
from novyx_llamaindex import NovyxChatStore
from llama_index.core.memory import ChatMemoryBuffer
from llama_index.core.chat_engine import SimpleChatEngine
chat_store = NovyxChatStore(api_key="YOUR_API_KEY")
memory = ChatMemoryBuffer.from_defaults(
chat_store=chat_store,
chat_store_key="user-123",
token_limit=3000,
)
chat_engine = SimpleChatEngine.from_defaults(memory=memory)
# Conversation persists across sessions
response = chat_engine.chat("Remember: I'm working on Project Alpha")
# Later session — agent still knows
response = chat_engine.chat("What project am I working on?")
# "You're working on Project Alpha"What You Get
Persistent Chat Store
Conversations survive restarts. Users pick up where they left off, every time.
Semantic Recall
NovyxMemory (BaseMemory) enables recall by meaning. Find relevant past context without keyword matching.
RAG Retriever
Use memories as a retrieval source in RAG pipelines. Memory-augmented generation out of the box.
Rollback & Audit
Point-in-time rollback and SHA-256 audit trail. Full control and traceability.
How It Works
Install & configure
Install novyx-llamaindex and set your API key. No infrastructure to manage.
Use NovyxChatStore
Pass it to ChatMemoryBuffer.from_defaults(). Your chat engine code stays the same.
Conversations persist
Every message is stored and indexed. Recall any past conversation from any session.
Frequently Asked Questions
How do I add persistent memory to a LlamaIndex agent?
Install novyx-llamaindex with pip, then use NovyxChatStore as your chat store or NovyxMemory as your BaseMemory. Your agent gets persistent, searchable memory that survives restarts and supports rollback.
Does LlamaIndex have built-in persistent memory?
LlamaIndex has memory components for short and long-term recall, but they live in process memory by default. Novyx provides a persistent backend that adds rollback, importance scoring, and cross-agent memory sharing.
Can I use Novyx as a RAG retriever in LlamaIndex?
Yes. novyx-llamaindex includes a RAG retriever for memory-augmented pipelines. Your agent retrieves relevant past context alongside document retrieval, improving response quality.
See all integrations on the Integrations page, or read the API docs.
Start Building with Persistent Memory
5,000 memories free. No credit card required.