Skip to main content

Thinking Module

The thinking module provides configurable thinking budgets for LLM reasoning, allowing control over token and time budgets for extended thinking.

Installation

Features

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

Quick Start

Classes

ThinkingBudget

Configure thinking budgets for agents.

Constructor

ThinkingConfig

Configuration for thinking behavior.

Attributes

ThinkingUsage

Track thinking usage.

Attributes

ThinkingTracker

Track thinking across multiple calls.

Usage Examples

Basic Thinking Budget

Adaptive Budget

Time-Limited Thinking

Track Usage

Best Practices

  1. Set appropriate budgets - Balance quality vs. cost
  2. Use adaptive mode - Let the system optimize for task complexity
  3. Monitor usage - Track thinking costs over time
  4. Time limits - Set time limits for time-sensitive applications