
Chat SDK adds message subjects and direct SDK access
Quick Answer
The Chat SDK now allows bots to access message subjects from Linear and GitHub comments, providing details like title, status, and URL.
Quick Take
The Chat SDK now allows bots to access message subjects from Linear and GitHub comments, providing details like title, status, and URL. Additionally, direct access to platform SDKs for GitHub, Linear, and Slack enables enhanced bot functionalities, such as adding labels and creating issues directly through the bot.
Key Points
- Bots can now retrieve parent issue details when mentioned in comments.
- message.subject caches data to minimize API calls, resolving to null on unsupported platforms.
- Direct SDK access allows bots to manipulate issues and messages across GitHub, Linear, and Slack.
- The deprecated .client getter remains available for backward compatibility.
- Documentation and templates are available for developers to get started.
📖 Reader Mode
~2 min read1 min read
You can now read the parent issue or pull request when your bot is mentioned in a Linear or GitHub comment. message.subject resolves to that parent with title, status, URL, and the full typed payload.
lib/bot.ts
bot.onNewMention(async (thread, message) => {
const subject = await message.subject;
if (subject) {
await thread.post(
`This is about: ${subject.title} (${subject.status})\n${subject.url}`
);
}
});
Reply to a mention with the parent issue's title, status, and URL
message.subject is cached per message, so repeated access only hits the API once. It resolves to null on Slack and other chat platforms, where there's no parent resource.
Link to headingDirect access to platform SDKs
The GitHub, Linear, and Slack adapters now expose their underlying platform SDKs. Use them to extend your bot by calling provider APIs directly.
// Add a "triaged" label to issue #42
const { octokit } = bot.getAdapter("github");
await octokit.rest.issues.addLabels({ owner: "vercel", repo: "chat", issue_number: 42, labels: ["triaged"] });
// Create a new issue in a team
const { linearClient } = bot.getAdapter("linear");
await linearClient.createIssue({ teamId: "TEAM_ID", title: "Investigate flaky test" });
// Pin a message in a channel
const { webClient } = bot.getAdapter("slack");
await webClient.pins.add({ channel: "C123ABC", timestamp: "1234567890.123456" });
Add a GitHub label, create a Linear issue, or pin a Slack message
The previous .client getter remains as a @deprecated alias on the adapters.
Read the documentation to get started, or explore 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.

