Agent

Last verified

An agent is a model in a loop: act, observe, decide, repeat, until it judges the task done or a limit stops it.

The cost property that distinguishes agents from ordinary API calls: the model decides how much to spend, and cost per step grows because each step resends the accumulated transcript. A 40-step run costs much more than twice a 20-step run.

The expensive failure is not a hard task — it is a task the agent _cannot_ complete, where it retries indefinitely with a lengthening context. Cost control for autonomous agents.