Skip to content

Glossary: AI Agents Basics

Stop reason

Also written: end_turn, stop_reason, max_tokens, refusal

The reason the API says a reply ended: end_turn means the model finished and the reply is the final answer; max_tokens means it hit its limit; refusal means it declined for safety. Your loop adds max_steps and budget.

Where the book teaches it

Related terms

max_steps