From the archive

AI SDK 5 adds typed chat and control over agent loops

Vercel's application toolkit expands chat integration, tool handling, and speech support across web frameworks.

By Chat Overview Published Updated

Vercel released AI SDK 5, updating its TypeScript and JavaScript toolkit for applications that use language models. The release focuses on typed chat interfaces, tool calls, and control over multi-step agent execution.

Keep chat state and model requests distinct

The redesigned chat integration separates messages used by the interface from the messages sent to a model. That helps an application preserve metadata, tool results, and conversation state without treating every part as model input. The release supports React, Svelte, Vue, and Angular integrations.

Decide when an agent stops

New controls define stopping conditions and allow an application to change the model's parameters or available tools between steps. The update also adds speech generation and transcription, alongside improved tool input streaming and error handling.

The AI SDK profile covers the toolkit, provider connections, and the distinction between its software and the services an application calls.

Source