Quick Start
Why am I seeing ImportError: mem0ai is not installed...?
This error occurs when you explicitly request a memory provider that requires optional dependencies. The new behavior ensures you get clear feedback instead of silent fallbacks.
The Problem
The Solution
Install the required extras package:Explicit vs Default Behavior
| Configuration | mem0ai installed? | Result |
|---|---|---|
memory=True (default) | ❌ | ✅ Falls back to file storage |
memory="mem0" | ❌ | ❌ ImportError: mem0ai is not installed. Run: pip install 'praisonaiagents[memory]' |
memory="mem0" | ✅ | ✅ Uses Mem0 (if API key set) |
Why am I seeing ValueError: Mem0 API Key not provided?
This occurs when the mem0ai package is installed but the API key is missing.
Set the API Key
- Environment Variable
- Direct Configuration
Why is memory="mem0" returning empty search results? (MongoDB vector store)
Search results come back empty because mem0’s MongoDB vector store has an upstream signature-mismatch bug.
Symptom: Searches return [], and the logs contain Detected mem0 MongoDB vector store compatibility issue. (before this was surfaced, the adapter path returned empty results with no log at all).
Cause: mem0’s MongoDB vector store raises TypeError: unexpected keyword argument 'vectors' on .search() (mem0ai/mem0#3185); PraisonAI catches that specific TypeError, logs a warning, and returns [] so the agent keeps running. PraisonAI does not fix the upstream bug — the fix lives in mem0.
Fix: switch mem0’s vector store to Qdrant or Chroma
- Qdrant
- Chroma
Alternative: use PraisonAI’s built-in MongoDB adapter
If you need MongoDB itself, use PraisonAI’s first-party MongoDB Memory adapter — it is a separate implementation, unrelated to mem0, and unaffected by this bug.Common Error Scenarios
User Interaction Flow
Step-by-Step Resolution
- User runs
Agent(memory="mem0")without extras - PraisonAI raises
ImportError: mem0ai is not installed. Run: pip install 'praisonaiagents[memory]' - User runs the suggested install command
- User re-runs the agent code — either works or shows next error (missing API key)
- User sets
MEM0_API_KEYenvironment variable - Agent works successfully
Dakera adapter not loading
Dakera adapter not loading
Dakera adapter not loading
Symptom: Or equivalently:The exact error message when the package is missing:Explicit provider now raises immediately: Using
ImportError when using memory="dakera" or memory={"provider": "dakera", ...}.Install the extra:provider="dakera" raises this ImportError with the install hint instead of silently falling back to SQLite.If the server is unreachable: Ensure Dakera is running at the configured URL (default http://localhost:3000). See dakera-ai/dakera-deploy for Docker Compose setup.SQLite memory: errors after upgrade
ValueError: Invalid table name
AttributeError: missing connection helper
Dakera Adapter Not Loading
Dakera adapter not loading: ImportError
Dakera adapter not loading: ImportError
Symptom: Running with Fix: Install the Dakera extra:This error surfaces because explicit
provider="dakera" raises:provider="dakera" now raises a helpful hint instead of silently falling back to SQLite (fix landed in PR #2591 follow-up commit bbddfe3e).Best Practices
Start with the default, upgrade later
Start with the default, upgrade later
Begin with
memory=True for prototyping, then switch to memory="mem0" for production when you need advanced features.Pin extras in your project
Pin extras in your project
Add
"praisonaiagents[memory]" to your requirements.txt or pyproject.toml to ensure consistent environments.Set keys via environment variables in production
Set keys via environment variables in production
Use
MEM0_API_KEY environment variables rather than hardcoding API keys in your source code.Use memory=True for prototypes
Use memory=True for prototypes
The default file-based memory works great for development and doesn’t require any external dependencies or API keys.
Related
Memory Concepts
Understanding different types of memory and storage options
Advanced Memory
Multi-tiered memory with quality scoring and graph support
Dakera Memory
Self-hosted, decay-weighted vector recall via the Dakera server.

