Overview
The retrieval CLI provides unified commands for indexing documents and querying knowledge bases. These commands are Agent-first and use the same retrieval pipeline as the Python SDK.Commands
praisonai index - Index Documents
Index documents into a knowledge base for later retrieval.
Options
praisonai query - Query with Answer and Citations
Query the knowledge base and get a structured answer with citations.
Options
praisonai search - Retrieve from Knowledge Base
Return raw ranked hits from a knowledge-base collection. No LLM call, no answer synthesis.
Use it when you want the retrieved snippets themselves (debugging retrieval, inspecting what an Agent would see). For an LLM-synthesised answer with citations, use praisonai query above.
Options
Examples
Complete Workflow
Using Config Files
Create a config fileretrieval.yaml:
Performance Profiling
Profile indexing and query performance:Verbose Mode
Get detailed output for debugging:- Collection being queried
- Retrieval strategy used
- Number of sources found
- Relevance scores
- Elapsed time
Environment Variables
Comparison with Legacy Commands
The unified retrieval commands replace the separateknowledge and rag command families:
The legacy commands are still available but marked as deprecated. Use the new unified commands for all new projects.
Next Steps
- Agent Retrieval (Python) - Use retrieval in Python code
- Knowledge Concepts - Learn about knowledge bases
- CLI Reference - Full CLI documentation

