Get agent token usage
get_agent_usageRetrieve the input and output tokens spent by agent sessions in the account, summed across every agent and LLM connection, as totals for the period and in consecutive time buckets. A session counts towards the bucket it was created in.
Instructions
Retrieve the input and output tokens spent by agent sessions in the account, summed across every agent and LLM connection, as totals for the period and in consecutive time buckets. A session counts towards the bucket it was created in.
Requires permission to view account settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time_to | No | End of the period as an ISO 8601 datetime with a UTC offset, for example `2026-10-01T00:00:00Z`. | |
| time_from | No | Start of the period as an ISO 8601 datetime with a UTC offset, for example `2026-09-01T00:00:00Z`. | |
| bucket_size | No | Length of each time bucket in minutes. Defaults to 1440 (one day); minimum 15, maximum 527040 (366 days). | |
| X-Orchestra-Account-Id | No | Act on this account rather than the one the credential resolves to. Omit it to use the credential's own account. An API key is issued to a single account, so it may only name that account; an OAuth token may name any account its grant covers. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||