Advanced Features Module
PraisonAI includes a comprehensive set of advanced features for production-grade AI agent development. These features provide enhanced control, safety, and developer experience.Core SDK Features
Auto-Summarization
Automatically summarize conversations when the context window fills up, preserving important context while reducing token usage.Message Queue
Priority-based message queue for agent prompts with thread-safe operations.MCP Tool Filtering
Filter MCP tools with disabled lists or allowlists.Permission Allowlist
Persistent permission allowlist for pre-approving tools and paths.CLI Features
Safe Shell Execution
Execute shell commands safely with banned command detection.File History & Undo
Track file changes and enable undo operations.Hierarchical Configuration
Load configuration from multiple sources with precedence..praison.json:
Output Modes
Control CLI output verbosity.Logs Command
View and follow log files.Git Commit Attribution
Add AI attribution to git commits.assisted-by- “Assisted-by: …”co-authored-by- “Co-Authored-By: …”none- No attribution
Tools
Sourcegraph Integration
Search code across repositories.Enhanced Download Tool
Download files with approval and progress tracking.Best Practices
DRY Reuse
All features are designed to reuse existing PraisonAI components:- Token tracking → Uses
telemetry/token_collector.py - Permissions → Extends
approval.py - File ops → Uses
file_tools.py - Shell safety → Reuses
sandbox_executor.pypatterns
Thread Safety
All managers are thread-safe:Async Compatibility
Async variants are provided where needed:Configuration Reference
Environment Variables
| Variable | Description |
|---|---|
PRAISON_OUTPUT_MODE | Set output mode: compact, verbose, quiet |
SOURCEGRAPH_URL | Sourcegraph API URL |
SOURCEGRAPH_ACCESS_TOKEN | Sourcegraph access token |

