Rensei docs
API ReferenceWorker Protocol

Record a routing observation (MAB reward)

Called by the runner at session end to report the outcome of a provider dispatch. Updates the Beta-distribution posterior for the `(provider, workType)` arm in the multi-armed bandit router and appends an observation entry. Best-effort: store errors return `{ recorded: false }` with HTTP 200 so a Redis blip never fails the worker's terminal flow.

POST
/api/sessions/{id}/routing-feedback

Authorization

workerJwt
AuthorizationBearer <token>

Runtime JWT minted by the platform at worker registration. Three-segment dotted string. Claims include {jti, proj, org, sub (=workerId), reg, scope[]}. Use on all post-registration worker endpoints.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/sessions/string/routing-feedback" \  -H "Content-Type: application/json" \  -d '{    "provider": "string",    "workType": "research",    "reward": 0  }'
{
  "recorded": true
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}