Quick Start
1
Reset the knowledge base
2
Delete all scoped memories
3
Inspect change history
How It Works
Knowledge erasure calls route to the underlying memory adapter. Unsupported operations fail loudly instead of raising AttributeError.
Adapter Capabilities
Support differs per adapter — verify againstpraisonaiagents/knowledge/adapters/ before relying on an operation.
Since PraisonAI PR #4020,
Knowledge.reset() warns instead of raising AttributeError, and delete_all() / history() raise NotImplementedError on unsupported adapters instead of AttributeError. Wrap history() and delete_all() in try/except when your code should work across adapters.Since PraisonAI PR #4991,
Knowledge.reset() returns bool — True when the backend actually reset, False when the adapter has no reset() and the call was a silent no-op. On destructive paths, check the return value before telling a user their data was erased: a False means nothing was cleared. Existing callers that ignore the return value are unaffected.Common Patterns
Guard erasure calls so your code works across adapters:Best Practices
Reset between sessions
Reset between sessions
Call
agent.knowledge.reset() at the end of a session to clear context for privacy-sensitive workflows. reset() returns True when the backend actually reset, and False when the adapter had no reset — it warns and no-ops instead. On destructive paths check the return value before telling a user their data was erased; a False means nothing was cleared.Wrap delete_all() and history()
Wrap delete_all() and history()
Both raise
NotImplementedError on adapters that don’t support them. Wrap them in try/except so multi-adapter code degrades gracefully.Use Mem0 for history
Use Mem0 for history
Only Mem0-backed knowledge implements
history(memory_id). Choose Mem0 when you need an audit trail of memory changes.Check logs after upgrade
Check logs after upgrade
reset() returns False and logs a warning when the adapter can’t reset. Prefer the return value over log-scraping — it’s a reliable signal that the tier was actually cleared (True) or silently skipped (False).Related
Knowledge Overview
Load files and documents into an agent’s knowledge base.
Knowledge Storage
Configure the storage backend for knowledge.

