max_tokens_total
Meaning and placement
agent
Cumulative token budget across every turn of the loop · the SPEND ceiling, wheremax_turns is the step ceiling. A literal non-negative integer · default engine-configurable (spec/02-verbs.md §agent).
In the same object: images · max_turns · model · prompt · schema · skills · system · temperature · tools
Schema source (use the pointer above)
In a source template
Excerpt fromtemplates/agent-loop.nika, source lines 98–107. This is a fragment, not a runnable workflow.
illustration
Templates containing this field
These are literal key occurrences in the source files, not an execution or conformance claim. How to instantiate a template.
Contract and implementation
This page projects the named specification revision. Check released engine status and the validation workflow before running a file. An optional field is not evidence that every engine supports every value. Canonical identity:language:word:max_tokens_total. Spec revision: 5c40ba456c53.
How documentation stays connected.