> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# thinking • AI Agent SDK

> Extended Thinking Budgets Module for PraisonAI Agents.

# thinking

<Badge color="blue">AI Agent</Badge>

Extended Thinking Budgets Module for PraisonAI Agents.

Provides configurable thinking budgets for LLM reasoning:

* Token budgets for extended thinking
* Time budgets for reasoning
* Adaptive budget allocation
* Budget tracking and reporting

Zero Performance Impact:

* All imports are lazy loaded via **getattr**
* Budgets only applied when configured
* No overhead when not in use

Usage:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent
from praisonaiagents.thinking import ThinkingBudget

# Create a thinking budget (helper for computing per-task token limits)
budget = ThinkingBudget(
    max_tokens=16000,
    max_time_seconds=60,
    adaptive=True
)

# Compute an adaptive token budget for a given task complexity (0.0-1.0)
tokens = budget.get_tokens_for_complexity(0.8)

# `agent.thinking_budget` is a backward-compatible alias for the unified
# `reasoning_effort` control. Prefer the graded level directly, which the
# core request pipeline translates to each provider's native parameter
# (OpenAI/xAI `reasoning_effort`, Anthropic/Gemini extended-thinking budget):
agent = Agent(instructions="...", reasoning_effort="high")
```

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import thinking
```
