Skip to main content

agent_usage

Creates, updates, deletes, gets or lists an agent_usage resource.

Overview

Nameagent_usage
TypeResource
Iddigitalocean.genai.agent_usage

Fields

The following fields are returned by SELECT queries:

A successful response.

NameDatatypeDescription
log_insights_usageobjectResource Usage Description
usageobjectResource Usage Description

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
genai_get_agent_usageselectuuidstart, stopTo 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.

NameDatatypeDescription
uuidstringAgent id (example: "123e4567-e89b-12d3-a456-426614174000")
startstringReturn all usage data from this date. (example: "example string")
stopstringReturn all usage data up to this date, if omitted, will return up to the current date. (example: "example string")

SELECT examples

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 }}';