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

# estimate • AI Agent SDK

> estimate: Estimate tokens for text.

# estimate

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

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

Estimate tokens for text.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def estimate(text: str) -> int
```

## Parameters

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

### Returns

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

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/context/models.py#L447">
  `praisonaiagents/context/models.py` at line 447
</Card>
