Skip to main content

Your Vercel Chat SDK bot forgets everything. Atulya fixes that.

· 2 min read

TL;DR

  • Chat SDK bots start fresh every message unless you add memory
  • @eight-atulya/atulya-chat wraps handlers with withAtulyaChat()
  • 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}`);
}
)
);

Full API reference

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 patternUse case
'team-memory'Shared team knowledge
(msg) => msg.author.userIdPer-user assistants
Per channel / projectCustom 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