Closed Autonomousweb3Dev closed 1 month ago
hi @Autonomousweb3Dev
Thank you for the report.
The /v1beta1/engine/analytics endpoint expects a function name, and not agent address. So if your agent agent1q0pzvr9dnl5k3086804839uvynfhqsheheth3273yvy9xq6nnmcncd7clcc has a function with id FUNCTION_ID, then the path will be:
/v1beta1/engine/analytics/FUNCTION_ID/rating/
@qati why so much rush to close the ticket? Because now I am seeing no way to re-open it 😢
BTW this is not about how I am using API, I am sharing this when I use Agentverse and error I see on browser console.
Thank you for the screenshoot @Autonomousweb3Dev. We will have a look of why is that API called.
AV did call and old endpoint here. We are now requesting the .../v1beta1/engine/analytics/agent/{agent_address}/performance/
endpoint to get the ai agent rating.
Still, if there is no rating we will receive a 404 returning the message {"message":"Agent was not found"}
which is the expected response. If there is a rating for the agent, the response will look as following:
{
"time_series": {},
"total": 29,
"inception_total": 29,
"rating": {
"value": 2.9431342678444583,
"trend": 0.0
},
"success_rate": {
"value": 0.9655172413793104,
"trend": 0.0
}
}
Prerequisites
Category
Bug in Agentverse
Expected Behavior
When attempting to access the rating for a specific agent, if the rating is not available, the server should return a 204 No Content status code with a relevant message indicating the absence of a rating.
Observed Behavior
The server currently returns a 404 Not Found status code when the rating is not available. This can be misleading and may imply that the endpoint itself is incorrect or unavailable.
To Reproduce
Send a GET request to the endpoint /v1beta1/engine/analytics/agent1q0pzvr9dnl5k3086804839uvynfhqsheheth3273yvy9xq6nnmcncd7clcc/rating/.
Observe the 404 Not Found status code when the rating is not available.
Environment Details (Optional)
No response
Failure Logs (Optional)
No response
Additional Information (Optional)