Skip to main content
Control how many tokens an agent spends on extended reasoning before producing a response.
The user asks a hard reasoning question; the agent spends extended thinking tokens up to the configured ThinkingBudget before answering.

Quick Start

1

Set a Budget Level

Use predefined levels via the thinking_budget property after creating the agent.
2

Custom Budget

Fine-tune token limits and adaptive scaling.

How It Works

Budget Levels

Pre-configured levels for different task complexity:

CLI Usage

praisonai run --thinking

Pass --thinking <budget> on the praisonai run command to set an exact token budget for a one-off prompt:
--thinking is now correctly threaded through the direct-prompt path (praisonai run) in both --command and bare-prompt modes. Earlier releases raised a NameError on the direct-prompt path.
For persistent sessions, use praisonai thinking set <level> instead.

Usage Tracking

Track thinking utilisation across sessions:

Best Practices

Use minimal() or low() for quick lookups; reserve high() or maximum() for multi-step analysis where reasoning depth matters.
Assign agent.thinking_budget after creating the agent — budgets are applied lazily with zero overhead when unset.
Set adaptive=True so token allocation scales with task complexity via get_tokens_for_complexity().
Use praisonai thinking stats to review utilisation before increasing budgets in production.

Token Budgeting

Manage overall token spend across agent runs

Reflection

Self-review loops for higher-quality outputs