
Chat SDK now includes AI SDK tools
Quick Take
Chat SDK now integrates AI SDK tools for enhanced functionality.
Key Points
- Built-in toolset for Chat SDK available via new subpath.
- Read and write actions can be wired into your agent.
- Toolset access requires approval and is preset-scoped.
📖 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.


