Beta Managed Agents Session Usage Event
BetaManagedAgentsSessionUsageEvent objectPeriodic snapshot of the session's cumulative usage and tracked list cost.
type: "session.usage"id: stringUnique identifier for this event.
processed_at: stringA timestamp in RFC 3339 format
format: date-time
usage: BetaManagedAgentsSessionUsageSnapshotPoint-in-time snapshot of a session's cumulative usage.
active_seconds: optional numberCumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once. This is the duration the session's runtime cost is priced on.
format: double
cache_creation: optional BetaManagedAgentsCacheCreationUsagePrompt-cache creation token usage broken down by cache lifetime.
ephemeral_1h_input_tokens: optional numberTokens used to create 1-hour ephemeral cache entries.
format: int32
ephemeral_5m_input_tokens: optional numberTokens used to create 5-minute ephemeral cache entries.
format: int32
cache_read_input_tokens: optional numberTotal tokens read from prompt cache.
format: int32
input_tokens: optional numberTotal input tokens consumed across all turns.
format: int32
list_cost: optional BetaMonetaryAmountA monetary amount in a specific currency.
amount: stringAmount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.
currency: BetaCurrencyUppercase ISO-4217 currency code.
USDis the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.
output_tokens: optional numberTotal output tokens generated across all turns.
format: int32
server_tool_use: optional BetaManagedAgentsServerToolUsageCumulative count of server-executed tool invocations, broken down by tool.
web_fetch_requests: optional numberNumber of server-executed web fetch requests.
format: int32
web_search_requests: optional numberNumber of server-executed web search requests.
format: int32
budget: optional BetaManagedAgentsBudgetLimit or nullA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches
max_list_cost.type: "limit"max_list_cost: BetaMonetaryAmountA monetary amount in a specific currency.