Skip to main content
Control how many tokens an agent spends on extended reasoning before producing a response.
Prefer reasoning_effort for new code — it is provider-portable and persists across sessions. thinking_budget is a backward-compatible alias for reasoning_effort: setting it (in the constructor, as a property, or via CLI --thinking) resolves to the same graded level and is emitted to the provider on the next request.
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.
The --thinking level is sticky across sessions: once set, it is restored automatically on --continue/--session without passing the flag again.
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.

Reasoning Effort

Provider-portable graded reasoning control (recommended surface)

Token Budgeting

Manage overall token spend across agent runs

Reflection

Self-review loops for higher-quality outputs