Skip to main content
Erasure clears an agent’s knowledge base between sessions, with clear errors when an adapter can’t support an operation.

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 against praisonaiagents/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.

Common Patterns

Guard erasure calls so your code works across adapters:

Best Practices

Call agent.knowledge.reset() at the end of a session to clear context for privacy-sensitive workflows. It always succeeds — on adapters without native reset, it warns and no-ops.
Both raise NotImplementedError on adapters that don’t support them. Wrap them in try/except so multi-adapter code degrades gracefully.
Only Mem0-backed knowledge implements history(memory_id). Choose Mem0 when you need an audit trail of memory changes.
reset() now logs a warning when the adapter can’t reset. Watch your logs to confirm the tier was actually cleared.

Knowledge Overview

Load files and documents into an agent’s knowledge base.

Knowledge Storage

Configure the storage backend for knowledge.