Record whether sampled live runs are judged for an agent
const url = 'https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/online-evaluations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'POST', headers: { cookie: 'katara_session=<katara_session>', 'Idempotency-Key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', 'X-Katara-CSRF': '1', 'Content-Type': 'application/json' }, body: '{"agent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","enabled":true,"sample_rate_ppm":1,"rubric":{"asset_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","version_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","integrity":"example"},"model_id":"example","judge_agent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","budget_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","consent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","daily_cap":1,"approval_expires_at":"2026-04-15T12:00:00Z","output_target":{"store_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","store_version":1,"key_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","key_version":1,"retention_seconds":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/online-evaluations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'X-Katara-CSRF: 1' \ --cookie katara_session=<katara_session> \ --data '{ "agent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "sample_rate_ppm": 1, "rubric": { "asset_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "integrity": "example" }, "model_id": "example", "judge_agent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "budget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "consent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "daily_cap": 1, "approval_expires_at": "2026-04-15T12:00:00Z", "output_target": { "store_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "store_version": 1, "key_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key_version": 1, "retention_seconds": 1 } }'Available when the evaluation material service is configured. Records a version of the sampling settings for one agent: whether live runs are judged, how often, against which reviewed rubric, by which model, and out of which budget and consent. Turning sampling on also approves the judge runs the sampler starts: it issues the judge’s two grants on that budget, writes the manifest each judge run takes and shares the judge’s documents with the judge and the organization’s automation member, and the response carries that approval. Turning it on takes the Live environment and a recent second-factor session, and answers 503 where judge runs cannot run. Sampled judging spends the setting’s budget, never run budget. Requires an organization owner or administrator signed in as a person; API keys, service identities and workloads are refused. Turning sampling off records a version and revokes the approval, so a gap in a series keeps a reason and a time. Recording a setting is not a score, a calibration or promotion evidence. Preserve the original key after an uncertain response; repeating it continues where an interrupted request stopped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent whose live runs the sampling setting belongs to.
Header Parameters
Section titled “Header Parameters”Browser cookie mutations require value 1 and an allowed Origin. Session bearer clients may omit this header.
Required for cookie-authenticated changes. Use the UUID of the account that loaded the application. A different current cookie account returns account_changed before the handler runs. Session bearer and API key clients do not require this header.
Request Bodyrequired
Section titled “Request Bodyrequired”Turns judging of sampled live runs on or off for one agent. Every field is part of the setting, because a score has to stay attributable to what produced it: the reviewed rubric that judged it, the model that did the judging, and the budget and consent that paid. Turning sampling on is also the one approval its judge runs are admitted under: it issues the judge a grant over itself, the sampled agent’s runs and the documents it reads, and a grant for its model calls, both on this budget and ending at approval_expires_at; writes the manifest every judge run takes; and shares the judge’s documents with the judge and the organization’s automation member, which admits the judge runs and approves nothing. It needs a recent second-factor session and the Live environment. Recording is append-only and takes an organization owner or administrator signed in as a person; turning sampling off, or on again, records a version and revokes the approval it replaces. The agent cannot be its own judge.
object
object
The most sampled runs judged in one UTC day. Defaults to 100. Only when turning sampling on.
When the approval this request makes ends: more than an hour and at most 30 days away. Required when turning sampling on.
Where the judge’s output is written, and where the manifest every judge run takes is kept. Required when turning sampling on.
object
Examplegenerated
{ "agent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "sample_rate_ppm": 1, "rubric": { "asset_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "version_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "integrity": "example" }, "model_id": "example", "judge_agent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "budget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "consent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "daily_cap": 1, "approval_expires_at": "2026-04-15T12:00:00Z", "output_target": { "store_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "store_version": 1, "key_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key_version": 1, "retention_seconds": 1 }}Responses
Section titled “Responses”The settings as recorded, with the version a sample refers back to.
object
object
The approval recorded with a setting that turned sampling on: the grant over the judge and the sampled agent’s runs, the judge’s model grant, the manifest its judge runs take, the judge version and rubric review it pins, and where judge output is written. current says whether it still stands: both grants unrevoked and unexpired, the person who recorded it still an owner or administrator, and no stop on evaluation. A setting without an approval is never sampled.
object
object
object
Explicit destination for run artifacts. Store and key versions must still be active at admission and byte access. Choose retention from 60 seconds to 365 days; no silent default or destination substitution.
object
Example
{ "approval": { "manifest_ref": { "media_type": "text/plain" } }}Agent authority or cookie account changed. Reinspect before a new intent. Preserve the original key to recover an uncertain committed operation.
default
Section titled “default”Request rejected or unavailable.
object
object
Stable; branch on it. Any operation can answer invalid_request, with param naming the refused field when there is one; human_session_required, when an API key, service account or workload calls an operation only a signed-in person may perform; reauthentication_required, when a person’s sign-in is too old for the operation; permission_denied; route_not_found and method_not_allowed, when no operation matches the path or method; and feature_unavailable, when the operation’s service is not enabled on this deployment.
The request field a refusal is about, such as the agent_id or run_id query parameter; null when the refusal is not about one field.
Example
{ "error": { "action": "sign_in" }}