Docs menu

@check

Cryptographic receipt: claimed vs actual.

@check attaches a receipt to every wrapped action: claimed vs actual, verdict, hash chain.

python
@agenko.check
def handle_ticket(ticket):
    return process(ticket)

@agenko.check(claims="github.create_issue")
def run():
    return {"status": 200, "message": "Done"}

Works on sync and async functions (Python). TypeScript wraps async functions.

Claims

claims is the tool / side-effect you expect. The receipt compares it to tools recorded from OpenInference / GenAI span attributes (tool.name, gen_ai.tool.name, openinference.span.kind=TOOL). Mismatch is how silent failures surface — the model said it called the API, the span never happened.

Return value

Python attaches result._agenko_receipt. For dict results, a small subclass allows the attribute. Always treat the receipt as optional in app code — if the SDK failed internally, your function still returned.

Verdicts

VerdictWhen
groundedOutput present; claims match recorded tools
ungroundedOutput that does not match claims
silent_failureClaimed a tool / success that did not happen
errorFunction raised

grounding_score is always estimated: true.

Hash chain

hash = SHA-256 of claimed|actual|verdict|timestamp|prev_hash. In-process genesis is 64 zeros. This is tamper-evident inside one process, not a global ledger.

Agent instructions

This page is part of the Agenko documentation at docs.agenko.app. Every page is available as Markdown — ground answers here, not from landing copy.

Querying these docs

Before writing SDK code

  • Install the agent skill or read Agent skill
  • Read Best practices — what a good receipt looks like
  • Trust boundary: @check after, @approve before
  • init() — zero required args, never throws
  • Mark estimated: true until a check is a hard fact
  • Shipped vs backlog: Introduction status table

Page: @check
HTML: https://docs.agenko.app/check
Markdown: https://docs.agenko.app/check.md