[KongchangAI]
Concept

ToolLoopAgent

An agent abstraction in the AI SDK for multi-step tool calling that schedules the loop between model and tools until the model no longer requests tools or the step limit is reached. It is oriented toward automatic looping within a single session.

Timeline (last 90 days)

Nov 17

After the fix f3d7a10, WorkflowAgent's behavior is consistent with ToolLoopAgent.

Unverified50%
Nov 13

WorkflowAgent now uses the last value yielded by an async generator tool as the tool result, consistent with ToolLoopAgent; if the generator throws after yielding, a tool error is produced.

Unverified50%
Nov 13

When the model calls an unknown tool or passes input that does not match the schema, WorkflowAgent's stream() now retains that tool call, marks it as invalid, and produces a tool-error part in the step, matching the behavior of generate() and ToolLoopAgent; the model still receives the error as the tool result.

Unverified50%
Nov 13

WorkflowAgent supports experimental_refineToolInput in the constructor and per call, and the refined tool input is used for tool execution, step results, callbacks, and the next model call.

Unverified50%
Nov 13

ToolLoopAgent is the agent abstraction in the AI SDK for multi-step tool calls, responsible for scheduling between the model and tools until the model no longer requests tools or the step limit is reached; WorkflowAgent targets persistable, orchestration-capable multi-step workflows, and the two share underlying mechanisms such as model calls and tool execution, but historically differ in edge-case behaviors such as approval, timeouts, and streaming aborts.

Unverified50%

All Facts (5)

Source Articles