---
title: @check
description: Cryptographic receipt: claimed vs actual.
---

# @check

`@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"}
```

```typescript
const handleTicket = agenko.check(async (ticket) => process(ticket));

const run = agenko.check({ claims: "github.create_issue" }, async () => {
  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

| Verdict | When |
|---|---|
| `grounded` | Output present; claims match recorded tools |
| `ungrounded` | Output that does not match claims |
| `silent_failure` | Claimed a tool / success that did not happen |
| `error` | Function 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: https://docs.agenko.app/check.md

Fetch `/llms.txt` for the full index. Search: `GET /api/search-docs?query=...`
