agentskit.js

executeToolProgressively

Auto-generated API reference for executeToolProgressively.

Function: executeToolProgressively()

executeToolProgressively<TArgs>(tool, chunks, context, options?): ProgressiveExecResult

Defined in: packages/core/src/progressive.ts:228

Run a tool "progressively": feed argument-text chunks as they stream, and kick off tool.execute as soon as the trigger fields have arrived. Additional field events keep landing in the same onField callback so the tool can adapt.

The tool's args parameter reflects whichever fields had arrived by the trigger point — callers that need the complete object should wait for finalArgs.

#Type Parameters

#TArgs

TArgs extends Record<string, unknown>

#Parameters

#tool

ToolDefinition<TArgs>

#chunks

AsyncIterable<string>

#context

Omit<ToolExecutionContext, "call"> & object

#options?

ProgressiveExecOptions = \{\}

#Returns

ProgressiveExecResult

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page