praisonai chat --context-monitor and watches live context usage update after each turn.
How It Works
Quick Start
CLI Flags
Enable Monitoring
Output Path
Output Format
Update Frequency
Write Mode
Redaction
Interactive Commands
Enable Monitoring
Disable Monitoring
Set Path
Set Format
Set Frequency
Manual Snapshot
Environment Variables
config.yaml
Output Formats
Human Format
JSON Format
Frequency Options
| Frequency | When Snapshots Are Written |
|---|---|
turn | After each user/assistant turn |
tool_call | After each tool execution |
manual | Only on /context dump |
overflow | When approaching context limit |
Troubleshooting
Snapshots not appearing
Sensitive data in snapshots
Performance issues
Best Practices
Use async writes in production chat
Use async writes in production chat
--context-write-mode async avoids blocking the UI while snapshots are written.Reduce frequency when stable
Reduce frequency when stable
Switch from per-turn to overflow-only snapshots once context behaviour is verified.
Keep redaction enabled
Keep redaction enabled
Never disable redaction when snapshots may contain API keys or user PII.
Point snapshots to a writable path
Point snapshots to a writable path
Ensure
PRAISONAI_CONTEXT_MONITOR_PATH exists and is excluded from version control.Related
Context Monitor
Python API and snapshot formats
Security & Redaction
Protect sensitive data in snapshots

