Skip to content
中文

Set Run Feedback

Call Create session first and replace the example session ID with its returned ID.

POST/agent/v1/sessions/{session_id}/runs/{run_id}/feedback● Supported

Request parameters

  • session_idstringrequired

    path: Session id from session creation or listing.

  • run_idstringrequired

    path: Existing run_id from this session's events.

  • ratingstringrequired

    positive means thumbs up; negative means thumbs down for this run.

    values positivenegative
  • commentstringoptional

    Optional comment, at most 2000 Unicode characters. Omit or send null to clear the previous comment.

Returns

200

Own-face extension. Use a readable session and a run_id from its events. Each submission replaces the previous rating and comment; omitted or null comment clears it, while created_at is preserved. Comments allow at most 2000 Unicode characters. End users can submit only for their own sessions. Feedback never enters model context or starts a run. For example, submit {"rating":"positive","comment":"Helpful"}. POST follows Managed Agents resource update conventions; the resource remains unique per session and run.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Request

curl
# Call Create session first and replace the example session ID with its returned ID.
curl https://api.deepraxis.com/agent/v1/sessions/sesn_123/runs/run_123/feedback \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating":"positive"}'
Python
# Call Create session first and replace the example session ID with its returned ID.
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
    f"{opts['base_url']}/v1/sessions/sesn_123/runs/run_123/feedback",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
    json={"rating":"positive"},
)
print(resp.status_code, resp.json())
TypeScript
// Call Create session first and replace the example session ID with its returned ID.
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/sessions/sesn_123/runs/run_123/feedback`, {
  method: "POST",
  headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({"rating":"positive"}),
});
console.log(resp.status, await resp.json());

Response 200

{
  "type": "run_feedback",
  "session_id": "sesn_f35fc2a9d8bc4d4a94a69b117f5280ff",
  "run_id": "run_56733f9e-cf5f-45a4-93cb-54ce00721853",
  "rating": "positive",
  "comment": null,
  "created_at": "2026-10-22T15:30:32.127Z",
  "updated_at": "2026-10-22T15:30:32.127Z"
}

Response

HTTP 200

Current feedback after replacing any previous submission.

application/json

Name Type Description
type string Identifies a run feedback resource.
session_id string Public session identifier from session creation or listing.
run_id string Run identifier from a session event's run_id.
rating string positive is thumbs up; negative is thumbs down.
comment string | null Submitted comment, or null when cleared.
created_at string First feedback creation time in RFC 3339 format; unchanged on replacement.
updated_at string Latest feedback submission time in RFC 3339 format.

Before running the example

Create a session and send a message. Replace run_123 with run_id from that session’s events, not a deployment-run drun_ ID. The run must belong to the session in the request.