> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.gather_usage_summary

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### gather\_usage\_summary

```python theme={null}
gather_usage_summary(agents: list[Agent]) -> dict[str, dict[str, Any]]
```

Gather usage summary from all agents.<br />

<b>Parameters:</b>

| Name     | Description                                                                                    |
| -------- | ---------------------------------------------------------------------------------------------- |
| `agents` | (list): List of agents.<br /><br />**Type:** list\[[Agent](/docs/api-reference/autogen/Agent)] |

<b>Returns:</b>

| Type                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dict\[str, dict\[str, typing.Any]] | dictionary: A dictionary containing two keys: - "usage\_including\_cached\_inference": Cost information on the total usage, including the tokens in cached inference. - "usage\_excluding\_cached\_inference": Cost information on the usage of tokens, excluding the tokens in cache. No larger than "usage\_including\_cached\_inference". Example: `python \{ "usage_including_cached_inference": \{ "total_cost": 0.0006090000000000001, "gpt-35-turbo": \{ "cost": 0.0006090000000000001, "prompt_tokens": 242, "completion_tokens": 123, "total_tokens": 365, }, }, "usage_excluding_cached_inference": \{ "total_cost": 0.0006090000000000001, "gpt-35-turbo": \{ "cost": 0.0006090000000000001, "prompt_tokens": 242, "completion_tokens": 123, "total_tokens": 365, }, }, } ` |

<br />
