Rensei docs

Get the assembled audit receipt for an inbound dispatch.

Returns the assembled receipt for one dispatched run: what it cost, which models it used, how it was decided - and, once the run is terminal, the child's own answer (`summary`) plus a typed `exitReason` (passed | failed | blocked | timeout | cancelled | unknown). `workType` names the session work type and its registry role (null for an unknown or retired name); null when no work type was recorded. `reasoningEffort` reports the effort the run executed at, as its runner reported it. `capabilitiesNotDelivered` lists the non-essential capability demands the resolved harness profile could not deliver, so the session ran without them. `resolvedParams` reports, for each resolved Agent Dispatch parameter, the value and the scope that supplied it (system | org | project | workflow | caller | default); secret-typed parameters (`callbackUrl`) report scope only, never a value. `result` carries the run's typed outcome as its runner reported it: the review `verdict` (APPROVE | APPROVE_WITH_FOLLOWUPS | REQUEST_CHANGES as delivered, or FAILED for a review that ended failed, blocked or timed out without delivering one; review work only), the run's `pullRequest` ({ number, url, headSha }, also on failed and blocked runs; for review work it is the PR the reviewer reported, usually the one under review and unverified by the runner, with the review session's own head) and `ciState`; `reviewedHeadSha`, when present, is the PR head pinned in the dispatch review target, independent of the workarea head. `reviewedPullRequest`, when present, names that pinned target ({ repo, number, url }), independently of the runner-reported PR; absent when the target repository is invalid. A null member means the runner never reported it. `promptTruncation` reports, for each capped starting-prompt section, the before (originalChars) and after (keptChars) sizes. `terminalReason` carries the structured failure reason (`code`, `message`, `phase`, `decidedBy`, `at`) for a terminal `failed` session, as stamped by the writer that ended it; null when the run ended any other way or predates the stamp. `pendingAdmission` reports the last observed reason, rule, attempts and observedAt while the session is pending; null otherwise. An old observedAt means no recent admission observation, not a fresh host diagnosis. `inferences[].reasoningTokens` carries the reported reasoning count (an output subset, never priced twice; null means not reported). The Ed25519 signature is over `decision.entryHash` and is unaffected by these fields; `receiptIntegrity.receiptVersion` names the sealed field set: newly assembled receipts are 'v11' (adds `executionSelection.placementSource/placementPoolId/placementFallbackFrom` and, on review-target receipts, `result.reviewedHeadSha` and the pinned `result.reviewedPullRequest` when its repository is valid), 'v12' is an accepted spelling for the v10 body plus inference `reasoningTokens` (never sealed), and archived ones stay valid as 'v10' (adds `capabilitiesNotDelivered`), 'v9' (adds `terminalReason`), 'v8' (adds `promptTruncation`), 'v7' (adds `result`), 'v6' (adds `resolvedParams`), 'v5' (adds `continuedPullRequest`), 'v4' (adds `budgetBreach`), 'v3' (adds `reasoningEffort`), 'v2' (adds the answer fields) or 'v1' (the original body).

GET
/api/cli/dispatch/{instanceId}/receipt

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Path Parameters

instanceId*string
Length1 <= length

Response Body

Current assembled v1 receipt; nullable sections may still be pending.

application/json
  1. response
receipt*
Example Request
curl -X GET 'https://app.rensei.ai/api/cli/dispatch/string/receipt'
Example Response
{  "receipt": {    "version": "v1",    "sessionId": "string",    "workflowInstanceId": "string",    "workspaceId": "string",    "baseRef": "string",    "continuedPullRequest": {      "number": 1,      "headRef": "string",      "headSha": "string"    },    "warnings": [      {        "code": "refIgnored",        "message": "string"      }    ],    "executionSelection": {      "requestedProjectId": "string",      "resolvedProjectId": "string",      "requestedHarness": "string",      "resolvedHarness": "string",      "requestedAgentCardRef": {        "id": "string",        "revision": "string"      },      "expectedA2AHandle": "string",      "resolvedA2AHandle": "string",      "a2aHandleMatchesExpected": true,      "requestedA2AScope": "session",      "realizedA2AScope": "session",      "a2aScopeStatus": "not-requested",      "a2aScopeFailure": "string",      "placementSource": "pin",      "placementPoolId": "string",      "placementFallbackFrom": "string"    },    "subIssueGate": "bypassed (workflow policy)",    "decision": {      "decisionId": "string",      "modelId": "string",      "modelVersion": "string",      "policyRuling": {        "property1": null,        "property2": null      },      "entryHash": "string",      "signingKeyId": "string",      "signature": "string",      "occurredAt": "2019-08-24T14:15:22Z",      "promptHash": "string",      "promptSnapshotId": "string",      "contextHash": "string",      "contextSnapshotId": "string"    },    "inferences": [      {        "provider": "string",        "model": "string",        "costUsd": 0,        "latencyMs": 0,        "totalTokens": 0,        "cacheReadTokens": 0,        "cacheWriteTokens": 0,        "reasoningTokens": null,        "count": 0      }    ],    "totalCostUsd": 0,    "durationMs": 0,    "sessionStatus": "string",    "pendingAdmission": {      "reason": "awaiting-claim",      "rule": "string",      "attempts": 0,      "observedAt": "string"    },    "finalSummary": "string",    "instanceStatus": "string",    "error": {      "message": "string",      "code": "string"    },    "evals": [      {        "graderId": "string",        "status": "scored",        "score": 0,        "pass": true,        "reasoning": "string"      }    ],    "evalStatus": "none",    "kgHits": {      "observationIds": [        "string"      ],      "graphNodeIds": [        "string"      ],      "count": 0    },    "kgStatus": "none",    "triggerMeta": {      "triggerType": "string",      "triggerEventId": "string",      "definitionVersion": "string",      "isTestRun": true,      "instanceStartedAt": "2019-08-24T14:15:22Z",      "instanceCompletedAt": "2019-08-24T14:15:22Z"    },    "retentionMeta": {      "hotRetentionDays": 0,      "coldRetentionYears": 0,      "archiveCoveredThrough": "2019-08-24T14:15:22Z",      "archiveSha256": "string",      "archiveProvider": "string"    },    "actorProvenance": {      "agentId": "string",      "agentIdentityId": "string",      "sourceIdentity": "string",      "trackerProvider": "string",      "trackerSessionId": "string"    },    "auditChainRef": {      "sequenceNumber": 0,      "prevHash": "string",      "merkleAnchorUrl": "http://example.com"    },    "receiptIntegrity": {      "receiptHash": "string",      "assembledAt": "2019-08-24T14:15:22Z",      "receiptVersion": "v1"    },    "summary": "string",    "summaryTruncated": true,    "exitReason": "passed",    "reasoningEffort": {      "status": "applied",      "level": "low"    },    "budgetBreach": {      "cap": "max-tokens",      "detail": "string"    },    "terminalReason": {      "code": "spawn_failed",      "message": "string",      "phase": "spawn",      "decidedBy": "runner",      "at": "2019-08-24T14:15:22Z"    },    "resolvedParams": {      "property1": {        "value": null,        "scope": "system"      },      "property2": {        "value": null,        "scope": "system"      }    },    "result": {      "verdict": "APPROVE",      "pullRequest": {        "number": 1,        "url": "string",        "headSha": "string"      },      "reviewedHeadSha": "string",      "reviewedPullRequest": {        "repo": "string",        "number": 1,        "url": "http://example.com"      },      "ciState": "string"    },    "promptTruncation": {      "property1": {        "originalChars": 0,        "keptChars": 0      },      "property2": {        "originalChars": 0,        "keptChars": 0      }    },    "capabilitiesNotDelivered": [      {        "schemaVersion": 1,        "kind": "composition_degraded",        "outcome": "not_delivered",        "essential": false,        "axis": "capabilities",        "capability": "string",        "payloadKey": "string",        "channels": [          "string"        ],        "harness": "string",        "mode": "autonomous",        "profileId": "string",        "reason": "delivery_unsupported",        "ruleId": "string",        "undeliveredDigest": "string"      }    ],    "workType": {      "name": "string",      "role": "intake"    },    "links": {      "jwksVerifyUrl": "http://example.com",      "permalink": "http://example.com"    }  }}

Submit an inbound BYOA agent-dispatch request.

Authentication accepts an rsk API key, a requester-registration-bound OAuth agent token, a WorkOS user token, or a browser session. REG-10 is conditional: a bound registration with a public key requires all three X-Rensei-Request-* headers; a light registration without a key, an unbound rsk key, a user token, and a session do not. A strict registration without a key is misconfigured and returns 403. The public key is canonical standard base64 of the raw 32-byte Ed25519 key. The signature is canonical standard base64 of 64 bytes over the exact UTF-8 canonical-envelope JSON. Nonce replay rejection is best-effort: if Redis is unavailable, replay-cache checks fail open while signature and inclusive +/-300-second timestamp validation remain enforced. Typed requests evaluate only the current immutable configured HarnessConnection revision, an explicit live project grant, and current immutable production-promoted probe evidence; host inventory is never admission authority. A typed request that satisfies declared compatibility AND live inventory allocates a durable ledger session and returns an admitted response; anything short of that still returns a denial receipt. Spawn remains gated: an admitted node stays queued until an applied-adaptation receipt exists.

Inspect typed delegation capability availability.

Returns the exact capability probe consumed by the Rensei CLI. An empty mcpTools or lifecycle array remains a fail-closed declaration: typed dispatch and session lifecycle are not usable. Advertisement is all-or-nothing - the CLI requires every entry, so a partial list disables typed dispatch entirely. `lifecycle` is an inventory of served routes: all four exist under /api/cli/sessions/{sessionId} and admitted typed dispatch allocates a durable ledger session. `mcpTools` is NOT a tool inventory: it is the version handshake that unlocks those routes, and no platform MCP facade defines tools by those names - POST /api/cli/mcp serves `dispatch`, `get_receipt`, and `list_workflows` only. Do not issue tools/call against an mcpTools name.