Skip to main content
Configure context monitoring via CLI flags and interactive commands. The user launches praisonai chat --context-monitor and watches live context usage update after each turn.

How It Works

Quick Start

1

Enable monitoring at launch

2

Control monitoring in session

CLI Flags

Enable Monitoring

Output Path

Output Format

Update Frequency

Write Mode

Redaction

Interactive Commands

Enable Monitoring

Output:

Disable Monitoring

Set Path

Set Format

Set Frequency

Manual Snapshot

Output:

Environment Variables

config.yaml

Output Formats

Human Format

JSON Format

Frequency Options

Troubleshooting

Snapshots not appearing

Sensitive data in snapshots

Performance issues

Best Practices

--context-write-mode async avoids blocking the UI while snapshots are written.
Switch from per-turn to overflow-only snapshots once context behaviour is verified.
Never disable redaction when snapshots may contain API keys or user PII.
Ensure PRAISONAI_CONTEXT_MONITOR_PATH exists and is excluded from version control.

Context Monitor

Python API and snapshot formats

Security & Redaction

Protect sensitive data in snapshots