# Cookbook

> Worked recipes for agent jobs that come back: the same job on a new input, called as a Compiled Agent Model.

Each recipe is a job a vertical agent product runs thousands of times, with a new input each time. They all use the same call: the base URL `https://api.inferenceindex.com/v1`, the model `workflow/auto`, and the chat completions request you already send. Only the prompt and the fields you read back change.

![Three lanes for support triage, data extraction, and tool-calling loops](/docs/figures/use-cases.svg)

## Recipes

| Recipe | Built for | New input | What comes back |
| --- | --- | --- | --- |
| [Contract review](/docs/cookbook/contract-review) | Legal and compliance agents | A contract | Clause fields as JSON |
| [Inbox actions](/docs/cookbook/inbox-actions) | Assistant and ops agents | An email | One action and a reply draft |
| [Support triage](/docs/cookbook/support-triage) | Support agents | A ticket | Queue, tags, and a reply |
| [Invoice reconciliation](/docs/cookbook/invoice-reconciliation) | Finance agents | An invoice and a purchase order | A match decision |
| [Meeting notes to CRM](/docs/cookbook/meeting-notes) | Sales and success agents | A call transcript | CRM fields |

## Every recipe has the same parts

1. **The job.** What your agent does today, and what stays the same from run to run.
2. **The call.** A Python request you can paste, with the fields your system already stores.
3. **What comes back.** The shape of the reply, so you can parse it.
4. **In production.** How to route the job, and what happens when an input doesn't fit.

The client setup is the same in every recipe:

```python
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_KEY",
    base_url="https://api.inferenceindex.com/v1",
)
```

## Data extraction

Most recipes are a form of extraction: a new invoice, form, or email in, and the same fields out. If your job is "read this and return these fields," start from [contract review](/docs/cookbook/contract-review) and change the field list.

## Agent tool-calling loops

The same tools, in the same kind of loop, with a new input. Your code still runs the tools and decides which result to keep. The model name stays `workflow/auto`, and the base URL stays the same.

## More jobs that fit

- Lead follow-up. A new lead, the same kind of first touch.
- Weekly reporting. The same metrics, sources, and write-up.
- Onboarding new customers. The same accounts and welcome steps, a new name.
- Content repurposing. One post becomes the same set of follow-on posts.

If a job comes back with new values and the same steps, it fits. A one-off question can stay on a frontier model.

## Related

- [How it works](/docs/how-it-works)
- [Quickstart](/docs/quickstart)
