Vercel shipped AI SDK 5.0 with a first-class agent loop primitive. The new runAgent API takes a tool set, a model, and a termination condition and handles the multi-step plan-act-observe loop that every team has been re-implementing on top of streamText. Tool definitions stay in the same Zod-schema format the SDK already uses for structured output, which is the right call for migration ergonomics.

The interesting design choice is that the loop is fully resumable. Each step is persisted to a pluggable store, and a paused or crashed agent can be resumed from the last completed step with full context. That makes the SDK genuinely useful for production agentic workloads, not just demo loops, and it puts pressure on the bespoke agent frameworks (LangGraph, the various OSS routing libraries) that were the only option for resumability until now.

The trade-off is provider lock-in to the SDK’s tool-call format. Teams already running LangChain or building on the raw provider SDKs get less out of the upgrade. For greenfield Next.js apps, the SDK is now closer to a complete agent runtime than any other framework in the ecosystem.

vercelai-sdkagentsframeworkstypescript