> ## 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.

# Get Tokens For Complexity • Rust AI Agent SDK

> get_tokens_for_complexity: Get token budget based on task complexity. # Arguments * `complexity` - Complexity score (0.0 to 1.0) # Returns Adjusted token budget

# get\_tokens\_for\_complexity

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ThinkingBudget**](../classes/ThinkingBudget) class in the [**thinking**](../modules/thinking) module.

Get token budget based on task complexity. # Arguments \* `complexity` - Complexity score (0.0 to 1.0) # Returns Adjusted token budget

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_tokens_for_complexity(&self, complexity: f64) -> usize
```

## Parameters

<ParamField query="complexity" type="f64" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="usize">
  The result of the operation.
</ResponseField>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Token Management" icon="coins" href="/docs/rust/token-management" />

  <Card title="Rust Budget" icon="wallet" href="/docs/rust/budget" />
</CardGroup>
