Skip to main content
Set how hard the model thinks with one graded level; PraisonAI translates it to each provider’s native reasoning control.

Quick Start

1

Enable with a level

Pass a graded level to the agent.
2

Switch provider, same level

The same level works on Anthropic and produces an extended-thinking budget under the hood.
3

Turn it off

off is a zero-overhead no-op.
4

Change it after construction

The setter keeps a cached LLM in sync.
The setter also updates an already-built LLM in place, so a change after the instance materialises still lands on the next request.
The CLI --thinking <level> flag uses this same setter path internally, so the flag takes effect even when it is applied after the LLM has been built.

How It Works


Streaming

start(stream=True) (and iter_stream()) honour reasoning_effort on both streaming branches. Since PR #4780, streaming and non-streaming produce identical provider requests for reasoning-effort semantics. The same resolve_reasoning_params mapping runs on both paths, so "off" stays a zero-overhead no-op, unset stays absent, and a model without a native reasoning control is untouched. Tool follow-up turns inherit the knob.
Before PR #4780, reasoning_effort was silently dropped on both streaming branches — every level from minimal to high produced a byte-identical provider request under stream=True. Since #4780 the graded level reaches the provider on the streaming path too. See Streaming → Sampling knobs on the streaming path.

Levels

Each level maps to a native parameter per provider family.

Provider Coverage

Which model families the level affects.

Which Level Should I Pick?

Match the level to the task.

Four Ways to Set It

The same level is available in Python, YAML, the CLI, and the Desktop app.
Desktop app: Open Settings → Models → Reasoning effort and pick a level. Off is the default and leaves the provider default in place; any other level is forwarded on the next turn (same rule as temperature / top_p). The choice round-trips through settings.json, so it persists across restarts. It is app-wide, not per-chat. See Desktop → Models & API Keys.
--thinking <level> is applied to the agent after construction. It reaches the request pipeline even when the LLM instance has already been materialised — no rebuild required.

Session Persistence

The effort you were running is persisted on the session and restored on resume — you do not need to pass --thinking again.
A per-invocation --thinking <level> on resume overrides the persisted value.

Backward Compatibility

thinking_budget remains a supported alias that folds into reasoning_effort.
The graded value is what gets persisted, so the effort stays provider-portable. agent.thinking_budget reads back the last integer budget that was set (or None); the graded string level always lives on agent.reasoning_effort. Assigning a graded string (agent.thinking_budget = "high") still routes through the effort setter, but agent.thinking_budget continues to report None in that case — read agent.reasoning_effort for the current level.

Best Practices

Start at medium and raise to high for planning, analysis, or long code.
reasoning_effort="off" is a no-op with no runtime cost.
Assign agent.reasoning_effort at any time; the setter updates a cached LLM in place.
Use a level (not a raw token budget) so the value stays provider-portable.
Since PR #4780, the graded level reaches the provider on the streaming path too — no need to disable streaming to get reasoning behaviour.

Thinking Budgets

Legacy alias and token-budget helper

Reflection

Self-review loops for higher-quality outputs

Streaming

reasoning_effort reaches the provider on both streaming branches