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.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
Match budget to task complexity
Match budget to task complexity
Use
minimal() or low() for quick lookups; reserve high() or maximum() for multi-step analysis where reasoning depth matters.Set via property, not constructor
Set via property, not constructor
Assign
agent.thinking_budget after creating the agent — budgets are applied lazily with zero overhead when unset.Enable adaptive scaling
Enable adaptive scaling
Set
adaptive=True so token allocation scales with task complexity via get_tokens_for_complexity().Monitor with CLI
Monitor with CLI
Use
praisonai thinking stats to review utilisation before increasing budgets in production.Related
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

