Pass lightweight context from one turn to the next without writing it into the item list.
Not yet available. The Agent SDK is tracked to be built — today, use the Client SDKs against the live chat completions API. The docs below describe the intended design.
The item list is the agent's memory — it accumulates everything the agent has said and done. nextTurnParams is a lighter channel: a small key-value store that travels from turn to turn but never appears in the item list and is never sent to the model.
Use it for execution metadata — routing hints, budget counters, flags — that your orchestration logic needs but that would add noise to the model's context if included as messages.
Set nextTurnParams in a callModel() call. They are available as result.nextTurnParams and are automatically forwarded to the next call if you pass result.items as inputItems.
dynamicParams#dynamicParams | nextTurnParams | |
|---|---|---|
| Computed | Each turn, from the item list | Set explicitly per turn |
| Affects call params | Yes — merges into params | No — side-channel only |
| Visible to model | No | No |
| Use for | Adaptive model/temperature | Counters, flags, routing metadata |
A common pattern: use nextTurnParams to count a resource (tool calls, DA spend, external API calls) and a custom stop condition to halt when the counter is exhausted.
Declare the shape of your next-turn params with a generic type parameter: