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")