Quick Start
1
Agent with incremental knowledge
2
Direct index with result stats
How It Works
Configuration Options
Knowledge.index() parameters
IndexResult fields
CorpusStats fields
FileTracker API
FileTracker records which vector-store chunks belong to each file so a re-index can remove stale content first.
Why this matters: editing a file and re-indexing no longer leaves the old chunks behind, so search results reflect only the current content. IDs that fail to delete are retried on the next re-index — they are never orphaned.
What gets deleted — inspect the chunks that will be removed when a file changes:
Common Patterns
Check and report results
Force full re-index
Selective indexing with glob patterns
Corpus statistics
Low-level file tracking
Best Practices
Use .praisonignore to exclude noisy files
Use .praisonignore to exclude noisy files
Create a
.praisonignore in your corpus directory — it follows gitignore syntax and is auto-detected:.gitignore is also read as a fallback.Scope indexes per user for multi-tenant apps
Scope indexes per user for multi-tenant apps
Pass
user_id or agent_id to isolate indexes per tenant. Without a scope identifier, the mem0 backend raises ScopeRequiredError.Inspect strategy_recommendation for large corpora
Inspect strategy_recommendation for large corpora
CorpusStats.strategy_recommendation returns the optimal retrieval strategy based on file count:Schedule periodic full re-indexes
Schedule periodic full re-indexes
Weekly
force=True re-indexes are still a good hygiene practice for hash-collision paranoia and to recover any IDs that repeatedly fail to delete, but they are no longer required to keep the vector store from growing unbounded on edited files — a changed file’s stale chunks are now deleted before its new chunks are added.Related
Knowledge Backends
Choose and configure the knowledge storage backend
Knowledge
Core knowledge retrieval and agent integration

