You can route, classify, or score AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → state with structured probabilistic answers instead of generating text, via an AI SDK decide call. This can make routing steps cheaper and more deterministic.
Key takeaways · AI-distilled
d1 answers typed questions (Boolean, Choice and Score) about a supplied state and returns answers with probabilities. It is called through the AI SDK's experimental_decide, an OpenAI-compatible Decisions API, or a TypeSafe-compatible API.
The state can include images: Vercel's example passes a base64 PNG as an image_url and asks a Choice question with red, blue or green as criteria, the pattern for visual classification, inspection or scoring.
On AI Gateway, decision calls appear in logs and count toward budgets alongside other model requests, so their cost is tracked the same way as text models.
Terms in this piece · Glossary
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.