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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Delta |
Answer |
Result |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
maxToolRounds |
number |
model |
(index, offerTools) => AsyncGenerator<Delta, ToolRound<Answer, Result>> |
Returns
Section titled “Returns”AsyncGenerator<Delta, Answer>