WorkflowAgent
A workflow orchestration module within the Vercel AI SDK ecosystem. It provides a WorkflowAgent abstraction that supports organizing AI capabilities into multi-step orchestrable workflows, making it suitable for complex task scenarios that require tool collaboration.
Core Facts
Timeline (last 90 days)
In generateText, streamText, and WorkflowAgent, the SDK rejects tool calls directly before local execution, even if the model returned a tool call intent.
Commit 6ac1ee1 makes WorkflowAgent use the original tool schema to validate and normalize tool input, thereby staying consistent with streamText behavior.
The aligned behaviors include: default values, transforms, type coercion, refinement validation, unknown key handling, custom validators, repairToolCall, and various lifecycle callbacks.
将 WorkflowAgent 的模型调用遥测派发到全局注册的集成,从模型步骤触发(commit a155baa)。
Commit a471b4c documents and validates the generation deadline, retry boundaries, hook cancellation, and serialization behavior of selected results during workflow resumption for WorkflowAgent.
Commit c89c76c preserves provider metadata on assistant text messages to prevent information loss between upstream and downstream.
In scenarios where token-by-token streaming is not required (such as background batch processing, scheduled tasks, or non-interactive Agent tasks), developers can directly call generate() to obtain the complete result.
Commit 69ea843 retains length-limited assistant responses, ensuring they remain in the conversation messages and are not accidentally discarded.
Version 2.0.59 added a generate() method to WorkflowAgent (commit 0ca1ab9), providing a non-streaming durable execution path.
The generate() method sets a default limit of 20 tool call steps to prevent the Agent from falling into an infinite loop.
4 more timeline events
All Facts (14)
Temporal abstracts workflows into persistent, resumable code execution units, so that even if a process crashes or a machine goes down, the workflow execution state can be saved and resumed from the point of interruption.
75%UnverifiedIn generateText, streamText, and WorkflowAgent, the SDK rejects tool calls directly before local execution, even if the model returned a tool call intent.
50%UnverifiedThe aligned behaviors include: default values, transforms, type coercion, refinement validation, unknown key handling, custom validators, repairToolCall, and various lifecycle callbacks.
50%UnverifiedCommit 6ac1ee1 makes WorkflowAgent use the original tool schema to validate and normalize tool input, thereby staying consistent with streamText behavior.
50%Unverified将 WorkflowAgent 的模型调用遥测派发到全局注册的集成,从模型步骤触发(commit a155baa)。
50%UnverifiedCommit 57dadb5 decouples the creation of tool approval requests from the streaming logic, enabling WorkflowAgent.generate as well as stream without a writable stream to resume approved calls.
50%UnverifiedCommit a471b4c documents and validates the generation deadline, retry boundaries, hook cancellation, and serialization behavior of selected results during workflow resumption for WorkflowAgent.
50%UnverifiedCommit 69ea843 retains length-limited assistant responses, ensuring they remain in the conversation messages and are not accidentally discarded.
50%UnverifiedCommit c89c76c preserves provider metadata on assistant text messages to prevent information loss between upstream and downstream.
50%UnverifiedIn scenarios where token-by-token streaming is not required (such as background batch processing, scheduled tasks, or non-interactive Agent tasks), developers can directly call generate() to obtain the complete result.
50%UnverifiedThe generate() method sets a default limit of 20 tool call steps to prevent the Agent from falling into an infinite loop.
50%UnverifiedVersion 2.0.59 added a generate() method to WorkflowAgent (commit 0ca1ab9), providing a non-streaming durable execution path.
50%UnverifiedThe core change in version 2.0.38 is a fix for support of deferred tool discovery in WorkflowAgent.
50%UnverifiedThe primary commit for this update is commit a105059, tagged as fix(workflow): support deferred tool discovery in WorkflowAgent.
50%