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

# Total Cost • AI Agent SDK

> total_cost: Cumulative USD cost of all LLM calls in this agent run.

# total\_cost

Method

> This is a method of the [**Agent**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/Agent.md) class in the [**agent**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/agent.md) module.

Cumulative USD cost of all LLM calls in this agent run.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def total_cost() -> float
```

### Returns

**Returns** `float`

The result of the operation.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/agent.py#L3668)
>
> `praisonaiagents/agent/agent.py` at line 3668


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.