
Chat SDK now includes AI SDK tools
Quick Answer
Vercel's Chat SDK now integrates AI SDK tools via the chat/ai subpath, enabling seamless creation of chat agents with built-in functionalities.
Quick Take
Vercel's Chat SDK now integrates AI SDK tools via the chat/ai subpath, enabling seamless creation of chat agents with built-in functionalities. The new features include customizable presets, lazy loading of tools, and a focus on user approval for write actions, enhancing the development experience for chat applications.
Key Points
- New AI SDK tools are available through the chat/ai subpath.
- Create chat agents using the messenger preset with built-in functionalities.
- Write tools require user approval by default for enhanced security.
- Lazy loading ensures only necessary tools are constructed based on presets.
- Deprecated chat re-exports have been updated to chat/ai.
📖 Reader Mode
~1 min read1 min read
Chat SDK now ships a built-in AI SDK toolset through the new chat/ai subpath. One createChatTools(chat) call wires Chat SDK's read and write actions into your agent.
lib/bot.ts
import { Chat } from "chat";
import { createChatTools } from "chat/ai";
import { ToolLoopAgent } from "ai";
const chat = new Chat({ userName: "mybot" /* ... */ });
const agent = new ToolLoopAgent({
model: "openai/gpt-5.4",
instructions: 'You are a helpful assistant.'
tools: createChatTools(chat, { preset: "messenger" }),
});
Create a chat agent with the messenger preset
Approval by default: write tools are gated by a
requireApprovaloption.Presets:
reader,messenger, andmoderatorscope the toolset.Lazy loading: only the tools your preset allows are constructed.
toAiMessages and its supporting types have moved to chat/ai. The previous chat re-exports are flagged @deprecated.
Read the documentation to get started, or try one of our templates.
The Complete Guide to Chat SDK
Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.
Read the guide
— Originally published at vercel.com
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Vercel AI
See more →
The Agent Stack
The Agent Stack by Vercel AI provides essential building blocks for creating production-grade agents, enabling seamless integration across multiple AI models and secure operations. It features components like AI Gateway for model routing, Workflow SDK for durable execution, and Vercel Connect for scoped access, streamlining agent development and deployment across various platforms.

