agent_usage
Creates, updates, deletes, gets or lists an agent_usage
resource.
Overview
Name | agent_usage |
Type | Resource |
Id | digitalocean.genai.agent_usage |
Fields
The following fields are returned by SELECT
queries:
- genai_get_agent_usage
A successful response.
Name | Datatype | Description |
---|---|---|
log_insights_usage | object | Resource Usage Description |
usage | object | Resource Usage Description |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
genai_get_agent_usage | select | uuid | start , stop | 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
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
uuid | string | Agent id (example: "123e4567-e89b-12d3-a456-426614174000") |
start | string | Return all usage data from this date. (example: "example string") |
stop | string | Return all usage data up to this date, if omitted, will return up to the current date. (example: "example string") |
SELECT
examples
- genai_get_agent_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.
SELECT
log_insights_usage,
usage
FROM digitalocean.genai.agent_usage
WHERE uuid = '{{ uuid }}' -- required
AND start = '{{ start }}'
AND stop = '{{ stop }}';