## Retrieve Usage `client.agents.retrieveUsage(stringuuid, AgentRetrieveUsageParamsquery?, RequestOptionsoptions?): AgentRetrieveUsageResponse` **get** `/v2/gen-ai/agents/{uuid}/usage` To get agent usage, send a GET request to `/v2/gen-ai/agents/{uuid}/usage`. Returns usage metrics for the specified agent within the provided time range. ### Parameters - `uuid: string` - `query: AgentRetrieveUsageParams` - `start?: string` Return all usage data from this date. - `stop?: string` Return all usage data up to this date, if omitted, will return up to the current date. ### Returns - `AgentRetrieveUsageResponse` Agent usage - `log_insights_usage?: LogInsightsUsage` Resource Usage Description - `measurements?: Array` - `tokens?: number` - `usage_type?: string` - `resource_uuid?: string` - `start?: string` - `stop?: string` - `usage?: Usage` Resource Usage Description - `measurements?: Array` - `tokens?: number` - `usage_type?: string` - `resource_uuid?: string` - `start?: string` - `stop?: string` ### Example ```typescript import Gradient from '@digitalocean/gradient'; const client = new Gradient(); const response = await client.agents.retrieveUsage('"123e4567-e89b-12d3-a456-426614174000"'); console.log(response.log_insights_usage); ```