Skip to content

Commit

Permalink
feat(docs): Update API endpoint for agent performance (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
NindoK authored Jul 9, 2024
1 parent a1d48d6 commit a83249f
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions pages/apis/ai-engine/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ import {


<div className="nx-text-fetch-content">
This API provides access to analytics of functions and their interactions.
This API provides access to analytics of agents and functions.
</div>

## Overview

<Row>
<Col>
The Analytics API allows to access the data that can be used to analyze the performance of a function and the user interactions.
The Analytics API allows to access the data that can be used to analyze the performance of a function or an agent.
</Col>
<Col>
```bash filename="Endpoints"
GET /v1beta1/engine/analytics/agent/:agent_address/performance/

GET /v1beta1/engine/analytics/:function_id/performance/

GET /v1beta1/engine/analytics/:function_id/insights/
Expand All @@ -27,7 +29,45 @@ import {

</Row>

### Get function's rating
### Get agent's performance

<ApiEndpointRequestResponse
apiUrl="https://agentverse.ai"
method="GET"
path="/v1beta1/engine/analytics/agent/{agent_address}/performance/"
description="This endpoint retrieves the current performance metrics of a specified agent, including interaction data and its overall rating associated to the trend of the performance for the past 30 days."
isBearerTokenRequired={false}
pathParameters={{
agent_address:
"agent1q2dfhywtt8xazrdyzgap6gzdd7uhk4e0wmc3gjqt42esauaegcm8cuvclpj",
}}
properties={[
{
name: "agent_address",
type: "string",
description: "The agent address to get the performance for.",
}
]}
responses={
{
"time_series": {},
"total": 12321,
"inception_total": 12321,
"rating": {
"value": 2.758925860407884,
"trend": 0.00,
},
"success_rate": {
"value": 0.00,
"trend": 0.00,
},
}}
responseDescription="The response includes an empty set of time-series points, indicating no data available for that metric. The total and inception_total fields both represent the cumulative number of interactions. The rating object provides the current rating value of the agent and a trend value that indicates the rating's change over the past 30 days, with a trend value of 0.00 suggesting no change. Similarly, the success_rate object includes a current success rate value and a trend value.
A successful response from the endpoint will return a status code of 200. If the specified agent_address is not found, the endpoint will return a status code of 404. If the specified agent_address is invalid, the endpoint will return a status code of 400."
/>

### Get function's performance

<ApiEndpointRequestResponse
apiUrl="https://agentverse.ai"
Expand Down

0 comments on commit a83249f

Please sign in to comment.