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

headerAuthorizationBearer <JWT>

Short-lived worker runtime JWT minted by the platform. Claims bind the worker, project, organization, registration, and scopes.

Path Parameters

id*string

Request Body

application/json
  1. body
provider*string

Provider slug (e.g. 'claude', 'codex').

workType*AgentWorkType
Value in"research""backlog-creation""development""inflight""inflight-coordination""qa""acceptance""refinement""refinement-coordination""coordination""qa-coordination""acceptance-coordination""merge""security"
reward*number

Normalized outcome score clamped to [0, 1].

Range0 <= value <= 1
issueIdentifier?string
taskCompleted?boolean
prCreated?boolean
qaResult?string
Value in"passed""failed""unknown"
totalCostUsd?number
wallClockMs?integer
project?string

Response Body

Observation recorded (or soft-failed).

application/json
  1. response
recorded*boolean
Example Request
curl -X POST 'https://app.rensei.ai/api/sessions/string/routing-feedback' \  -H 'Content-Type: application/json' \  -d '{  "provider": "string",  "workType": "research",  "reward": 0}'
Example Response
{  "recorded": true}