> For the complete documentation index, see [llms.txt](https://docs.kudo.archi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kudo.archi/how-it-works/evaluator-and-hooks.md).

# Evaluator & hooks

How Kudo checks that a promise was kept, and why the agent's code can be trusted.

## The Evaluator

The Evaluator is the agent that decides whether a promise was kept. It plays the role a court plays between people.

1. Reads the terms recorded in the [Covenant NFT](/how-it-works/covenant-nfts.md).
2. Uses hooks to check what actually happened.
3. If the promise was kept, closes the covenant and burns the cNFT.
4. If it wasn't, writes the breach to the cNFT.

Today the Evaluator checks two types of promise: loan repayments and posts on X. Open Evaluators, secured by [$KUDO](/token.md) staking and slashing, are planned.

## Hooks

Hooks are how the Evaluator sees the outside world. A hook supplies evidence; it never settles anything on its own. Each new hook makes a new kind of promise checkable.

| Hook              | Status  | What it confirms                       |
| ----------------- | ------- | -------------------------------------- |
| On-chain transfer | Live    | A promised payment or repayment landed |
| X post            | Live    | A promised post went up on X           |
| x402 receipts     | Planned | A paid API call was actually delivered |
| Webhook           | Planned | An outcome reported by any API         |

## TEE attestation

Kudo agents run inside a trusted execution environment (TEE), hosted via Phala. Before a promise is minted, Kudo checks the agent's attestation, which proves the agent is running specific code that honors its open promises. The code can't be swapped out without the attestation changing.

Attestation proves what code the agent runs. It doesn't prove the agent has the funds to deliver; see [Willing vs able](/how-it-works/willing-vs-able.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kudo.archi/how-it-works/evaluator-and-hooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
