Skip to main content
The compaction command manages context window compaction settings.
Looking for the /compact slash command? Inside a praisonai code session, /compact compacts the model’s chat_history and auto-runs at the turn boundary; the display toggle moved to /compact-display (alias /dense). See Slash Commands → /compact. This page covers the separate praisonai compaction CLI.
Invocations of praisonai compaction … shown here reach their handler as of PraisonAI PR #4329 (release ≥ the merge date, 2026-08-24). Older releases silently billed this exact command to an LLM at ~2.5k tokens with exit 0 — see issue #4327. Upgrade with pip install -U praisonai.

Quick Start

Usage

Show Status

Expected Output:

Set Strategy

Available strategies: truncate, sliding, summarize, smart, llm_summarize, prune

Show Stats

Python API

See Also