Submit thumbs up or thumbs down feedback on Agent Studio chat messages with the feedback endpoint.
The Agent Studio feedback endpoint lets you collect binary (thumbs up or thumbs down) feedback on agent messages.
Use this to measure response quality, identify problem areas, and improve your agent over time.
Send a completion request to your agent.
The response contains a message ID (prefixed alg_msg_) that identifies the assistant’s reply.
Store this ID so you can attach feedback to it later.
Command line
curl -X POST "https://$ALGOLIA_APPLICATION_ID.algolia.net/agent-studio/1/agents/$AGENT_ID/completions?stream=false&compatibilityMode=ai-sdk-5" \ -H "X-Algolia-Application-Id: $ALGOLIA_APPLICATION_ID" \ -H "X-Algolia-API-Key: $ALGOLIA_SEARCH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "alg_cnv_abc123", "messages": [ { "id": "alg_msg_001", "role": "user", "content": "How do I reset my password?" } ] }'
2
Submit feedback on the message
Send a POST request to the feedback endpoint with the messageId, agentId, and a vote value.
Use 1 for thumbs up or 0 for thumbs down.
One feedback per message: each application can submit one vote per message.
If you send a second feedback request for the same message, the endpoint returns a 400 error.
Message scope: the messageId must belong to a conversation under the authenticated app. You can’t submit feedback for messages from other applications.
Authentication: your API key must have the search ACL, and your application must have the Agent Studio feature enabled.
If either is missing, the endpoint returns a 403 error.
Design your UI to disable the feedback button after a user votes,
preventing duplicate submission attempts.