# @ai-sdk/workflow@2.0.104

Category: agent-infrastructure
Published: 2026-11-13T06:03:46Z
Source: [Vercel AI SDK releases](https://github.com/vercel/ai/releases/tag/%40ai-sdk%2Fworkflow%402.0.104)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-11-13T18:17:53.131Z
Tags: vercel, ai-sdk, typescript

## Human Summary
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.

## Agent 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.

## Body
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 .

## Recommended actions
- 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 ).

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.