v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Agent Sessions

Submit Feedback

Submit feedback on an assistant message.

When positive feedback is received, the conversation exchange is stored to memory for future context. When negative feedback is received, the exchange is NOT stored. This enables learning from quality interactions.

Args: request: FastAPI request with tenant context session_id: Session identifier payload: Feedback request

Returns: SubmitFeedbackResponse with feedback status

Raises: NotFoundError: If session or message not found

Example: bash curl -X POST http://localhost:8000/v1/agents/sessions/ses_abc123/feedback \ -H "Authorization: Bearer {api_key}" \ -H "X-Namespace: {namespace_id}" \ -H "Content-Type: application/json" \ -d '{ "message_id": "msg_xyz789", "rating": "positive", "feedback_text": "Very helpful response!" }'

post/v1/agents/sessions/{session_id}/feedback

Path parameters

session_idstring required

Session ID

Session ID

Request body

message_idstring required

Assistant message ID (REQUIRED)

ratingstring required

Feedback rating: 'positive' or 'negative' (REQUIRED)

feedback_textstring nullable

Additional feedback text (OPTIONAL)

Example request

{
  "feedback_text": "Great response!",
  "message_id": "msg_abc123",
  "rating": "positive"
}

Response

Successful Response

session_idstring required

Session identifier

message_idstring required

Message identifier

ratingstring required

Feedback rating submitted

storedboolean required

Whether exchange was stored to memory

recorded_atstring date-time required

Feedback timestamp