Skip to main content
API reference sections

Schema

UsageFact

One turn's usage, as a durable typed fact (§17.1: committed in the run's own storage before it is published). Ids, counts and a reference - it copies nothing (§17.2a).

Type object

Shape

FieldTypeDescription
identityrequiredUsageFactId

Stable across retries and amendments alike.

attemptrequiredRunAttemptId
turnrequiredAgentTurnId
revisionrequiredAmendmentRevision

The monotonic amendment revision of a usage fact. A retry repeats it; a correction raises it.

inputinteger (uint64, >= 0) or null

None is unavailable. It is never zero for missing.

outputinteger (uint64, >= 0) or null
cached_inputinteger (uint64, >= 0) or null
modelrequiredModelRef
completenessrequiredCompleteness
Example
{
  "identity": {},
  "attempt": "00000000-0000-4000-8000-000000000000",
  "turn": "00000000-0000-4000-8000-000000000000",
  "revision": 0,
  "input": 0,
  "output": 0,
  "cached_input": 0,
  "model": "00000000-0000-4000-8000-000000000000",
  "completeness": {
    "kind": "complete"
  }
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.