You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream PR merged: MervinPraison/PraisonAI#2190 — "fix: memory search/store schema mismatch after backend fallback to SQLite" (fixes #2189).
Decision
Content update — no new page needed. Update docs/features/advanced-memory.mdx to document the memory backend fallback behavior that this PR makes reliable. The existing docs/concepts/memory.mdx is HUMAN-ONLY per AGENTS.md rule 1.8 and must NOT be edited by AI agents.
Why this needs documentation
The PR is technically a bug fix, but it stabilizes a user-visible behavior that is currently undocumented:
When users configure MemoryConfig(backend="redis") (or any non-default backend) and the dependency is unavailable, PraisonAI silently falls back to SqliteMemoryAdapter.
Before this fix, that fallback path raised sqlite3.OperationalError: no such table: short_mem on the first search/store, because the adapter creates short_term_memory/long_term_memory tables while the legacy code paths queried short_mem/long_mem.
After this fix, search_short_term(), search_long_term(), and store_long_term() correctly delegate to the active adapter when provider in ("sqlite", "in_memory").
Users hitting this scenario today (Redis not installed, MongoDB unreachable, etc.) had no documented explanation for either the original error or the fallback that resolves it. The advanced-memory page already lists backend: "redis" as an option without describing what happens when it can't connect.
What to change
Target file
docs/features/advanced-memory.mdx
Section to add
Insert a new top-level section titled "Backend Fallback" between "Configuration Options" and "Quality Scoring System".
PraisonAI automatically falls back to SQLite when a configured backend (Redis, MongoDB, Chroma, Mem0) is unavailable, so your agent keeps working without crashing.
Hero Mermaid diagram using the standard color scheme. Suggested flow:
graph LR
Config[📋 MemoryConfig backend=redis] --> Try{🔍 Redis available?}
Try -->|Yes| Redis[(🗃️ Redis)]
Try -->|No| Adapter[💾 SqliteMemoryAdapter]
Adapter --> Tables[(short_term_memory<br/>long_term_memory)]
classDef config fill:#6366F1,stroke:#7C90A0,color:#fff
classDef decision fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef storage fill:#10B981,stroke:#7C90A0,color:#fff
class Config config
class Try decision
class Redis,Adapter,Tables storage
Loading
Behavior table. Document which providers go through the adapter and which keep dedicated write paths (extracted from PR diff):
Configured backend
Fallback when unavailable
Search/store path
redis
SQLite (adapter)
memory_adapter.search_* / store_*
sqlite
n/a (native)
memory_adapter.* (delegates)
in_memory
n/a (native)
memory_adapter.* (delegates)
chromadb
dedicated write path retained
direct Chroma calls
mem0
dedicated write path retained
direct Mem0 client
mongodb
dedicated write path retained
direct Mongo client
Agent-centric quick example (top of the section per AGENTS.md principle 9):
frompraisonaiagentsimportAgent, MemoryConfig# Configure Redis — if redis-py isn't installed,# PraisonAI falls back to SQLite automatically.agent=Agent(
name="Assistant",
instructions="You remember user preferences.",
memory=MemoryConfig(backend="redis", user_id="user_123")
)
agent.start("Remember I prefer dark mode")
What changed in v(release containing #2190) callout using <Note>:
Before this release, configuring backend="redis" without redis-py installed produced sqlite3.OperationalError: no such table: short_mem on the first memory call. The adapter now owns the schema for sqlite and in_memory providers, so fallback is transparent.
Add a Troubleshooting accordion (or extend the existing Best Practices block) covering:
Symptom: no such table: short_mem or no such table: long_mem
Cause: pre-fix version with non-default backend that silently fell back to SQLite
Fix: upgrade to the release containing PR #2190 (or install the configured backend's dependency)
What NOT to do
❌ Do not modify docs/concepts/memory.mdx — AGENTS.md rule 1.8 marks docs/concepts/ as HUMAN-ONLY.
❌ Do not create a new top-level page — the fallback is a sub-behavior of advanced memory, not a standalone feature.
❌ Do not document internals like _get_stm_conn, short_mem table, or the legacy fallback path that the adapter call now bypasses. User-facing only.
❌ Do not invent backends. The PR only touches sqlite/in_memory adapter delegation; other providers (chroma, mem0, mongodb) keep their existing dedicated write paths.
SDK ground truth (read before writing)
Per AGENTS.md rule 1.2 ("SDK-First Documentation Cycle"), read these files before writing the docs:
src/praisonai-agents/praisonaiagents/memory/memory.py — search_short_term, search_long_term, store_long_term (the methods modified in PR #2190).
src/praisonai-agents/praisonaiagents/memory/adapters/ — adapter base class and SqliteMemoryAdapter for table names and method signatures.
src/praisonai-agents/praisonaiagents/config/feature_configs.py — MemoryConfig for the canonical backend enum.
Verify every parameter, type, and default against the source. Do not guess.
Trigger
Upstream PR merged: MervinPraison/PraisonAI#2190 — "fix: memory search/store schema mismatch after backend fallback to SQLite" (fixes #2189).
Decision
Content update — no new page needed. Update
docs/features/advanced-memory.mdxto document the memory backend fallback behavior that this PR makes reliable. The existingdocs/concepts/memory.mdxis HUMAN-ONLY perAGENTS.mdrule 1.8 and must NOT be edited by AI agents.Why this needs documentation
The PR is technically a bug fix, but it stabilizes a user-visible behavior that is currently undocumented:
MemoryConfig(backend="redis")(or any non-default backend) and the dependency is unavailable, PraisonAI silently falls back toSqliteMemoryAdapter.sqlite3.OperationalError: no such table: short_memon the first search/store, because the adapter createsshort_term_memory/long_term_memorytables while the legacy code paths queriedshort_mem/long_mem.search_short_term(),search_long_term(), andstore_long_term()correctly delegate to the active adapter whenprovider in ("sqlite", "in_memory").Users hitting this scenario today (Redis not installed, MongoDB unreachable, etc.) had no documented explanation for either the original error or the fallback that resolves it. The advanced-memory page already lists
backend: "redis"as an option without describing what happens when it can't connect.What to change
Target file
docs/features/advanced-memory.mdxSection to add
Insert a new top-level section titled "Backend Fallback" between "Configuration Options" and "Quality Scoring System".
Content requirements (follow
AGENTS.mdstyle rules)One-sentence intro. Example:
Hero Mermaid diagram using the standard color scheme. Suggested flow:
graph LR Config[📋 MemoryConfig backend=redis] --> Try{🔍 Redis available?} Try -->|Yes| Redis[(🗃️ Redis)] Try -->|No| Adapter[💾 SqliteMemoryAdapter] Adapter --> Tables[(short_term_memory<br/>long_term_memory)] classDef config fill:#6366F1,stroke:#7C90A0,color:#fff classDef decision fill:#F59E0B,stroke:#7C90A0,color:#fff classDef storage fill:#10B981,stroke:#7C90A0,color:#fff class Config config class Try decision class Redis,Adapter,Tables storageBehavior table. Document which providers go through the adapter and which keep dedicated write paths (extracted from PR diff):
redismemory_adapter.search_*/store_*sqlitememory_adapter.*(delegates)in_memorymemory_adapter.*(delegates)chromadbmem0mongodbAgent-centric quick example (top of the section per
AGENTS.mdprinciple 9):What changed in v(release containing #2190) callout using
<Note>:Add a Troubleshooting accordion (or extend the existing
Best Practicesblock) covering:no such table: short_memorno such table: long_memWhat NOT to do
docs/concepts/memory.mdx—AGENTS.mdrule 1.8 marksdocs/concepts/as HUMAN-ONLY._get_stm_conn,short_memtable, or the legacy fallback path that the adapter call now bypasses. User-facing only.sqlite/in_memoryadapter delegation; other providers (chroma,mem0,mongodb) keep their existing dedicated write paths.SDK ground truth (read before writing)
Per
AGENTS.mdrule 1.2 ("SDK-First Documentation Cycle"), read these files before writing the docs:src/praisonai-agents/praisonaiagents/memory/memory.py—search_short_term,search_long_term,store_long_term(the methods modified in PR #2190).src/praisonai-agents/praisonaiagents/memory/adapters/— adapter base class andSqliteMemoryAdapterfor table names and method signatures.src/praisonai-agents/praisonaiagents/config/feature_configs.py—MemoryConfigfor the canonicalbackendenum.Verify every parameter, type, and default against the source. Do not guess.
PR-level details for reference
src/praisonai-agents/praisonaiagents/memory/memory.py(+94, -18)Memory.search_short_term()— adapter delegation forsqlite/in_memoryMemory.search_long_term()— adapter delegation forsqlite/in_memoryMemory.store_long_term()— adapter-first storage path mirroringstore_short_term()tests/unit/test_memory_system_fixes.py,tests/unit/test_memory_history_separation.py(41 passing).Quality checklist for the implementing agent
Per
AGENTS.md§9:#6366F1config,#F59E0Bdecision,#10B981storage, white text)docs/concepts/