Skip to main content
Reserve output tokens and inspect per-segment budgets so long agent runs don’t exhaust context before the model can reply.
The user runs the agent from the CLI and checks /context budget to see segment allocation.

How It Works

Quick Start

1

Run an agent, then inspect budget

From the CLI session:
2

Increase output reserve for long replies

Default output reserve is 8000 tokens. Raise it when the model truncates final answers.

CLI Flags

Interactive Commands

Example /context budget output:

config.yaml

Environment variable: PRAISONAI_CONTEXT_OUTPUT_RESERVE.

Best Practices

If replies are cut off, increase --context-output-reserve first — compaction may not be the issue.
Tool outputs consume the largest share; stats show which segment is filling fastest.
Use Token Estimation CLI accurate mode when validating budget numbers.

Token Estimation CLI

Configure estimation accuracy

Context Compaction

Automatic overflow protection