Agent InfrastructureAutomated release watch

@ai-sdk/workflow@2.0.104

Vercel AI SDK released @ai-sdk/workflow@2.0.104 , aligning WorkflowAgent behavior with ToolLoopAgent regarding callbacks, message visibility in tools, step overrides, and token aggregation.

Human read

Why this signal matters

The 2.0.104 patch release for @ai-sdk/workflow introduces several behavioral bug fixes to align WorkflowAgent with ToolLoopAgent and general text generation methods: - Constructor Callbacks: WorkflowAgent now accepts onError and onAbort in its constructor, invoked prior to per-call callbacks. Errors thrown inside these handlers will not overwrite the original run result or error. - Tool Messages Sanitization: Tools invoked by WorkflowAgent no longer receive the system prompt or the current tool-call assistant message inside options.messages . Likewise, onToolExecutionStart and onToolExecutionEnd omit the system prompt. - Step Setting Scoping: Dynamic overrides returned by prepareStep (e.g., model , toolChoice , activeTools , generation settings) now scope solely to the active step rather than persisting across subsequent steps. - Usage Aggregation: WorkflowAgent.stream() now mirrors ToolLoopAgent token aggregation by retaining specific token details (such as cached and reasoning tokens) and preserving undefined values for unreported provider metrics instead of defaulting to 0 . Dependencies were also updated: @ai-sdk/provider-utils@5.0.81 and ai@7.0.172 .

Agent parse

Actionable summary

@ai-sdk/workflow@2.0.104 aligns WorkflowAgent with ToolLoopAgent . It adds onError and onAbort constructor callbacks, excludes system prompts and current tool call assistant messages from tool options.messages and execution callbacks, limits prepareStep settings overrides to the single step, and refines stream() totalUsage token aggregation.

Agent usefulness
77/100
Confidence
96%
Canonical data
JSON + Markdown
Next actions

What builders should check

  • Verify tool implementations under WorkflowAgent do not rely on system prompts or the current assistant message in options.messages .
  • Ensure prepareStep logic explicitly re-applies configuration overrides if they were intended to persist beyond a single step.
  • Update dependency @ai-sdk/workflow to 2.0.104 alongside compatible core packages ( ai@7.0.172 ).
Classification

Tags and routing

vercelai-sdktypescript
Related signals

Continue the thread