GILD verdict
Adopt the AI SDK when TypeScript teams build AI features and agents into a web product, as openstatus and Helpmaton run theirs in production.
It gives one free API across providers, tool loops with approvals, and UI hooks that stream results. It works for teams that pin versions, budget for majors, and add a durable runtime when agents must outlive a request, the gap that took 21st.dev to another SDK in 2026.
AI SDK
Agent Framework by Vercel
+36 PositiveFit and limits
Who it fits
- The AI feature lives inside a TypeScript web app, and the team wants streaming chat, structured output, and tool calls without writing provider-specific code.
- You expect to change model providers, or run several, and want each change to touch only the model id.
- Agents need tool approvals, timeouts, and step limits that the application controls, in the same codebase as the product.
- Another runtime owns the agent, such as LangGraph, Mastra, Google ADK, or Bedrock AgentCore, and you want a ready UI protocol and hooks in front of it.
- The agent drafts and a person approves: openstatus runs its production Slack agent on the AI SDK with Claude Sonnet and six tools, and every change waits for confirmation (Feb 27, 2026).
Where it falls short
- Majors arrive fast: AI SDK 5 in July 2025, 6 in December 2025, and 7 in June 2026, which requires Node.js 22 and ESM. Practitioners report renamed APIs and behavior that changed without a compile error.
- The abstraction leaks per provider: public issues report lost Anthropic reasoning blocks and rejected Zod schemas. They also report a 4,096-token default for models the adapter does not recognize, and a Bedrock structured-output change that degraded one team's eval results.
- ToolLoopAgent runs in memory; durable, resumable runs need WorkflowAgent on Vercel's Workflow DevKit or a runtime such as Temporal, which LayerX wired up by hand. Earendil's founder kept only the provider layer under his own loop and would not choose it again (Nov 21, 2025), and 21st.dev moved to the Claude Code SDK for a complete loop (Apr 7, 2026).
- The default global provider is Vercel's paid AI Gateway, so a plain model string sends traffic through Vercel unless you import provider packages with your own keys.
- Production load finds faults the SDK's own tests missed: in one developer's production API, its per-byte base64 encoding of one 14 MB PDF killed a 2 GB container and about 100 requests on Sep 1, 2026, and a fix shipped a week later.
Implementation reality
Pin a line and own upgrades
Pin an exact minor version of ai and every @ai-sdk package together. Vercel still patches the 5, 6, and 7 lines: it released ai 5.0.281 and 6.0.315 on October 23, 2026. Plan majors on your own schedule, run Vercel's automated migration, and re-run your evals before shipping.
Choose the model path on purpose
Decide whether calls go through AI Gateway, with its budgets and data controls, or straight to providers with your own keys through explicit provider packages. Either way, test each provider you use: structured output and reasoning differ by provider.
Bound every loop
Set stopWhen explicitly, and add the AI SDK 7 timeouts for the whole run, each step, each chunk, and each tool. Pass the request's abort signal, and require approval on tools that change data or spend money.
Trace from the first release
Register OpenTelemetry once at startup with @ai-sdk/otel and send spans to your tracing tool, deciding first which prompt content the traces may carry.
What to measure in your pilot
- GILD found no named production user of WorkflowAgent in Vercel's docs or practitioner posts; run one durable agent on it and on Temporal for two weeks and compare failed resumes.
- Before relying on HarnessAgent, log token cost and sandbox minutes per completed Claude Code or Codex task for two weeks, with the experimental package version pinned.
- Vercel publishes no end date for the 5 and 6 lines; check their npm tags monthly and schedule your upgrade once your line goes 60 days without a patch.
Sources
- Official documentation
- 16
- Public source
- 7
- AI SDK docs: Introduction
- AI SDK providers (46 first-party integrations)
- AI SDK docs: Choosing a provider (AI Gateway as the default global provider)
- AI SDK docs: Agents overview
- AI SDK docs: Loop control
- AI SDK docs: WorkflowAgent
- AI SDK docs: Harnesses overview
- AI SDK docs: Tools and tool calling
- AI SDK docs: Telemetry
- AI SDK docs: AI SDK UI overview
- AI SDK docs: Migration guide, AI SDK 7.0
- Vercel blog: AI SDK 7 (Jun 25, 2026)
- vercel/ai releases on GitHub
- vercel/ai LICENSE (Apache 2.0)
- Vercel docs: AI Gateway pricing
- Vercel docs: AI Gateway budgets and spend limits
- GitHub: vercel/ai release ai@5.0.281 (Oct 23, 2026)
- GitHub: vercel/ai release ai@6.0.315 (Oct 23, 2026)
- openstatus blog: How we built our Slack agent (Feb 27, 2026)
- Pedro Teixeira: Real-time AI streaming in production at Helpmaton (Feb 13, 2026)
- Armin Ronacher: Agent design is still hard (Nov 21, 2025)
- Hacker News comment from a 21st.dev builder on moving from the AI SDK to the Claude Code SDK (Apr 7, 2026)
- vercel/ai issue #20149: base64 encoding of a 14 MB PDF killed a 2 GB container (Sep 1, 2026)