---
title: "AI features playbook · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-features
updated: 2026-10-20
licence: "All rights reserved"
---

# AI features playbook

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

An AI features playbook for any team that puts a language model inside its product. It covers chat assistants, summaries, search answers, extraction, drafting and agents that act for users. It works with any provider, such as OpenAI, Anthropic, Google or an open model you host yourself.

A model is a part that guesses. It gives different answers to the same question, it changes when the provider updates it, and it costs money on every call. These rules make that part testable, affordable and safe to show to customers.

Start with [Deciding to use a model](https://agentwranglers.se/playbook/ai-features/deciding-to-use-a-model), because the cheapest AI feature is the one you never build. Then read [Prompts as code](https://agentwranglers.se/playbook/ai-features/prompts-as-code) and [Evals and quality](https://agentwranglers.se/playbook/ai-features/evals-and-quality) before the first release.

Related playbooks cover the other sides. The [AI-assisted development playbook](https://agentwranglers.se/playbook/ai-assisted-development) covers coding agents that write your software. The [AI agents and models chapter](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models) shows how to attack your own AI features, and this playbook links there for every security rule.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers ai features playbook: https://agentwranglers.se/playbook/ai-features`.

## Chapters

1. [Deciding to use a model](https://agentwranglers.se/playbook/ai-features/deciding-to-use-a-model): Use a model only where plain code cannot do the job. Write down what success means, pick the smallest model that meets it and plan for wrong answers. (3 required, 2 recommended)
2. [Prompts as code](https://agentwranglers.se/playbook/ai-features/prompts-as-code): Keep every prompt in a versioned file and user text apart from instructions. No prompt change ships without review and a passing eval run. (4 required, 1 recommended)
3. [Structured output and tools](https://agentwranglers.se/playbook/ai-features/structured-output-and-tools): Ask for JSON that matches a schema, validate it, retry with the error, then fall back. Design tools like a small public API with strict inputs. (5 required, 1 recommended)
4. [Retrieval](https://agentwranglers.se/playbook/ai-features/retrieval): Answer from your own documents. Split them by structure, search by meaning and by words, cite every source, keep the index fresh and respect who may read what. (5 required, 3 recommended)
5. [Evals and quality](https://agentwranglers.se/playbook/ai-features/evals-and-quality): Grow the eval set from production, grade with code before a model, repeat noisy cases and watch quality, cost and speed after release. (1 required, 5 recommended)
6. [Guardrails and human review](https://agentwranglers.se/playbook/ai-features/guardrails-and-human-review): Check what goes into a model and what comes out. Handle refusals and cut-off answers, let people decide what matters and label AI output. (4 required, 1 recommended)
7. [Latency, cost and fallbacks](https://agentwranglers.se/playbook/ai-features/latency-cost-and-fallbacks): Stream long answers, time out every call, cache stable prompt parts, price every call, and keep the feature useful when the provider is down. (4 required, 2 recommended, 2 optional)
8. [Logs, privacy and feedback](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback): Log every model call with its versions and cost. Keep prompt text briefly and apart, collect feedback and train only on data people agreed to. (3 required, 1 recommended)
9. [Agents in products](https://agentwranglers.se/playbook/ai-features/agents-in-products): Use a fixed workflow when the steps are known. When an agent must choose its steps, end every run with a status, keep a full trace and survive restarts. (2 required, 3 recommended)

See all 52 rules on one page in the [checklist](https://agentwranglers.se/playbook/ai-features/checklist).
