> 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 what attestation proves about the agent.

## 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, marks the covenant Completed and burns the cNFT.
4. If it wasn't, marks the covenant Failed, which stays on the cNFT.

The Evaluator settles loan repayments and posts on X today. 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           |
| Webhook           | Planned | An outcome reported by any API         |

## TEE attestation

Kudo agents run inside a trusted execution environment (TEE) via Phala. The attestation pins the exact code image the agent runs, and each cNFT links to its agent's attestation, so a counterparty can check which code made the promise. 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
