# Cookbook

URL: https://docs.hanzo.ai/docs/guides/cookbook

> Four recipes that put Enso, Kai and Zen in one loop: route a request, triage with typed answers, gate an agent's command, and drive an agent from programs instead of prompts.

**Each recipe is one job, end to end, in requests you can paste.** Together they
show the pattern the platform is built around: Enso routes each request, Kai
decides the bounded questions, Zen reasons through the open ones, and your
policy keeps the last word.

| Recipe                                                                               | What it shows                                                                                               | Runs on                     |
| ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | --------------------------- |
| [Modular Decision Recipes](https://docs.hanzo.ai/docs/guides/cookbook/recipes)       | typed Rust blueprints for retail, industrial, confidence gating and agent loops                             | `recipes/` + `api.hanzo.ai` |
| [Route with Enso](https://docs.hanzo.ai/docs/guides/cookbook/route)                  | one request for every model, a price cap per call, the model that answered, feedback that trains the router | `api.hanzo.ai`              |
| [Triage with Kai, reply with Zen](https://docs.hanzo.ai/docs/guides/cookbook/triage) | three decisions with no generated tokens, then one generation                                               | `api.hanzo.ai`              |
| [Gate an agent's command](https://docs.hanzo.ai/docs/guides/cookbook/gate)           | a Decision Program's thresholds and verdict rule, joined with your policy by mode                           | `api.hanzo.ai`              |
| [Drive an agent loop](https://docs.hanzo.ai/docs/guides/cookbook/loop)               | the loop's control flow as programs — preflight, generate, check done — not as prompts                      | `api.hanzo.ai`              |

**Kai**: decisions are [`POST api.hanzo.ai/v1/decisions`](https://docs.hanzo.ai/docs/decisions) with
a Hanzo key; Kai is served by API only. The decision responses quoted in these
recipes are kai-1's, from its v0.3.14 runtime on CPU. The route now serves
kai-1.2, which answers yes/no questions with a new reader, so a `noul` there
reads differently.

```bash
export HANZO_API_KEY=...                  # platform.hanzo.ai
export DECISIONS=https://api.hanzo.ai
```
