When to Use an Agent

A per-step gate for complex workflows: when to use code, a single LLM call, or a full agent loop — and how to weigh token cost against judgment value.