Skip to content
providerkit
GitHub

runToolRounds

function runToolRounds<Delta, Answer, Result>(maxToolRounds, model): AsyncGenerator<Delta, Answer>;

Defined in: agents/src/rounds.ts:14

Drive a bounded, in-process model/tool conversation when the host already owns the provider interface, streaming decoder and transcript. Pulling drives execution: returning the iterator while the model is speaking closes its stream without starting any tools. No journal, retry, clock or background producer. Use defineAgent for resumable runs.

Type Parameter
Delta
Answer
Result
Parameter Type
maxToolRounds number
model (index, offerTools) => AsyncGenerator<Delta, ToolRound<Answer, Result>>

AsyncGenerator<Delta, Answer>