Skip to main content

Memory Configuration

This page provides comprehensive documentation for configuring the PraisonAI memory system, including graph database integration, quality scoring mechanisms, and embedder options.

Memory System Overview

The memory system in PraisonAI supports multiple storage backends and sophisticated retrieval mechanisms:
  • Short-term Memory: Recent interactions and context
  • Long-term Memory: Persistent knowledge storage
  • Entity Memory: Relationship and entity tracking
  • Graph Memory: Complex relationship networks
  • User Memory: User-specific preferences and history

Core Configuration

Basic Memory Setup

Installing Optional Providers

Most memory providers require optional dependencies:
If you try to use a provider without the required packages, you’ll see:
When a provider is explicitly requested (e.g. "provider": "mem0"), PraisonAI will raise this error instead of silently falling back. The default provider ("provider": "rag") falls back gracefully to built-in storage.

Provider Configuration

Graph Store Configuration

Graph Database Setup

Graph Schema Definition

Advanced Graph Queries

Quality Score Configuration

Quality Scoring System

Quality Score Components

Relevance Scoring

Recency Scoring

Confidence Scoring

Embedder Configuration

Embedder Options

Memory sizes its vector store from get_dimensions(embedding_model). Before PraisonAI PR #3027 (releases after 2026-07-14), two lookup bugs produced dimension mismatches on memory / RAG upsert:
  • Case-sensitive keysall-MiniLM-L6-v2 and sentence-transformers/all-MiniLM-L6-v2 fell through to the 1536 default even though the model emits 384.
  • Substring collisionvoyage/voyage-3-lite (512) matched the shorter voyage-3 (1024) entry first, so memory collections were sized 1024 while the model emits 512. Any voyage-3-lite, bge-small-en-v1.5, or other short-suffix model created on an older release needs to be re-created after upgrading.
Upgrade praisonaiagents and re-create the collection to fix either failure mode.
voyage-3-lite was affected by a related bug on the same release: the substring lookup returned 1024 (voyage-3’s dimension) instead of 512. Fixed in the follow-up commits of PR #3027 (praisonaiagents after 1.6.151). Same recovery — upgrade praisonaiagents and re-create any collection that was created 1024-dim with a voyage-3-lite embedding.

Multi-Modal Embedding

Storage Configuration

Database Paths and Structure

Memory Persistence

Performance Optimization

Caching Configuration

Indexing Strategy

Memory Cleanup and Maintenance

Cleanup Configuration

Complete Configuration Example

Environment Variables

Troubleshooting

Common Issues

  1. Graph connection failures
  2. Memory retrieval too slow
  3. Quality scores too low

See Also