Your Vercel Chat SDK bot forgets everything. Atulya fixes that.
TL;DR
- Chat SDK bots start fresh every message unless you add memory
@eight-atulya/atulya-chatwraps handlers withwithAtulyaChat()- One shared bank works across Slack, Discord, Teams, Google Chat
- Cookbook example tracks bugs and feature requests across platforms
The problem
Your team bot lives in Slack and Discord. Someone files a mobile checkout bug in Slack. Someone asks for dark mode in Discord. A week later the PM asks "what are the open issues?" and the bot shrugs.
Default Chat SDK behavior: no cross-message memory, no cross-platform memory.
Teams pipe everything into Jira manually and lose nuance on the way.
The fix
@eight-atulya/atulya-chat recalls before your handler and retains after.
Slack message ─────┐
├─→ withAtulyaChat() ─→ recall ─→ handler ─→ retain
Discord message ───┘ │
▼
Atulya API
(shared bank)
bot.onNewMention(
withAtulyaChat(
{
client: atulya,
bankId: () => "team-memory",
retain: { enabled: true, tags: ["chat"] },
},
async (thread, message, ctx) => {
const system = [
"You are a team assistant that tracks feature requests, bugs, and decisions.",
"You remember everything the team has discussed across Slack and Discord.",
ctx.memoriesAsSystemPrompt()
? `\nHere is what you know:\n${ctx.memoriesAsSystemPrompt()}`
: "",
].join("\n");
const { text } = await generateText({
model: openai("gpt-4o-mini"),
system,
prompt: message.text,
});
await thread.post(text);
await ctx.retain(`User: ${message.text}\nAssistant: ${text}`);
}
)
);
In practice
Monday, Slack: checkout broken on iOS → retained.
Tuesday, Discord: dark mode request → retained.
Wednesday, Slack: "what are the open issues?" → recalls both, different platforms, different days.
Under the hood
On retain: structured facts, entities, graph links.
On recall: semantic + keyword + graph + temporal fusion, not naive top-k similarity.
Memory isolation
bankId pattern | Use case |
|---|---|
'team-memory' | Shared team knowledge |
(msg) => msg.author.userId | Per-user assistants |
| Per channel / project | Custom string |
Platforms
Slack, Discord, Teams, Google Chat, GitHub, Linear: same wrapper, same bank.
Try it
Cookbook: chat-sdk-multi-platform
Local Atulya or Atulya Cloud.
Next steps
- Integration guide
- Clone the cookbook example
- Add Teams / Google Chat with the same
bankId - Scope banks per project when teams multiply