Get agent usage

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Returns the integration credits each of the app's agents used in the workspace's current billing period.

This is limited to 60 requests a minute per app for each workspace's personal API keys, so every key in a workspace shares one allowance. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key, including a read-only one, from anyone with access to the app, viewers included. Workspace API keys are not authorized for it.</Note>

get/api/apps/{app_id}/agent-configs/usage

Path parameters

app_idstring required

ID of the app whose agents to read.

ID of the app whose agents to read.

Response

Integration credits used by each agent.

usage_by_agentobject

Integration credits each agent used in the workspace's current billing period, keyed by agent name. An agent that hasn't used any is left out.

Example response

{
  "usage_by_agent": {
    "support_agent": 12.5
  }
}

Changes

Changed in 1 of the 34 revisions of this API.1