{"_id":"@eight-atulya/atulya-chat","_rev":"8-865b284c52816ea6dfc1f0ce135c9369","name":"@eight-atulya/atulya-chat","dist-tags":{"latest":"0.8.7"},"versions":{"0.8.0":{"name":"@eight-atulya/atulya-chat","version":"0.8.0","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.0","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"ff77cb320d8df00c36f8b90e7b35639c35d2ebcf","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.0.tgz","fileCount":10,"integrity":"sha512-2+JP4H3fNdjxgTyviLvPlea0SctVfIUowQMeIiXVfrpB582PeuBp3mrqlMp4RdOhSPskLg2NC0a3ltpQWZNG9A==","signatures":[{"sig":"MEUCIDfN8dNxMXK3qhq2OrvATbZOY97zgqtjx/Dks2Bzq/+9AiEA7rQpBA2Kd9zbqCD9yGJaZ4ZoTjgApcchGRJyJQ/QIQ0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7eccc0b04b1ddf31ea1b5cadb4d462fde14f1132","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.4","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.1","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.0_1774709803323_0.18808081984095448","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@eight-atulya/atulya-chat","version":"0.8.1","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.1","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"d3ac4e798708b45ad7c56f280ad74495fbae4dd0","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.1.tgz","fileCount":10,"integrity":"sha512-lhTq1b0aEnRL+f+HrddT8GVayyubJmpdX6Ix918TAHHQPBuvBx2+Pf16Aai03aYIwSK2oZ2RLpdD/+5ySLLQiQ==","signatures":[{"sig":"MEQCIEisQAkk5gDz+cAxwSdxPkfn6dFV7uxsHYwl9uOFqpvnAiApKh2KG7qptx5u2t1MFaE4AVjnYlOBOo8GlXAhN0d0iw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f7196382b237fddb75464f7efe992228037c93b9","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.1_1776142843412_0.5480073729529398","host":"s3://npm-registry-packages-npm-production"}},"0.8.2":{"name":"@eight-atulya/atulya-chat","version":"0.8.2","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.2","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"54831887f7beef00d59000bd7da483c2fe222a08","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.2.tgz","fileCount":10,"integrity":"sha512-VxCe5s/p8lslBaU6vjeXspiiYElIF6UX9Q05CYxe9DIbIDoXPM3Shi9eEuq8iJsIl3JECWZDvU3gmfH3x/nsyA==","signatures":[{"sig":"MEYCIQCVSlLUB8DHt3okoCOjk9LecaBQzLlXC6bEWduz9vcJbgIhAN+NO+vHbkhAD9hQOyMQGNPBL1b9e7evUTJmFzbMFMCb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"cebb5e9bbdc9cc312c555b104b90d23b671794da","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.2_1776158998142_0.7301672170342679","host":"s3://npm-registry-packages-npm-production"}},"0.8.3":{"name":"@eight-atulya/atulya-chat","version":"0.8.3","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.3","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"0b031306eb9c9f01b967813848095c6c36f6603f","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.3.tgz","fileCount":10,"integrity":"sha512-YzJgM2zqV6y6/63DZf9ti9TfaN4HBABaGOMHCDTS0gutmDH2xCmyypjYBvgAIkAmez6WdSvDG1MiTI8+3VP1fw==","signatures":[{"sig":"MEYCIQD4EG1BRPfr79G8/vsDvHFbYp1sH9VGEQFrtXNtbbqs0wIhAKl0hN2jWum3a4ZEV2Ys+ChmnC3B1/zcK7QmKSxRXx50","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"cc6c39561d57c605d149d6473d40eb65910c3b04","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.3_1776164127944_0.2864129683791097","host":"s3://npm-registry-packages-npm-production"}},"0.8.4":{"name":"@eight-atulya/atulya-chat","version":"0.8.4","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.4","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"c967b6862d58625f5984c793ed14e99fceff54e0","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.4.tgz","fileCount":10,"integrity":"sha512-ubyvJJeUwt8fv9rzvC5FWx3eau90OKQBHH0cgX8VTc8/j8rRCAVYldeclkCY1+elF1KnxcJP9IigK9z2cw6X8w==","signatures":[{"sig":"MEUCIQCl9Z47RL7gaH2Bc/0vBQ2LZwGggGDDN+WoaD6YXpezyAIgQZum1YfgiVggynXjC8L0h8HuyGWrqRDZNkIJSnHGqqI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"397f89ca6911c9d7550e9af4c27dc65e04146fdb","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.4_1777463015484_0.6543301281763907","host":"s3://npm-registry-packages-npm-production"}},"0.8.5":{"name":"@eight-atulya/atulya-chat","version":"0.8.5","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.5","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"9810ae56a0db80891b8faf74149ba6ddde8672a4","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.5.tgz","fileCount":10,"integrity":"sha512-XqHd6FFFj9bhHKUdLHYzjXd+NaHe73PXl/tSGITeMMx3m8fz01fYfdL3TxgM1hq48s+iV4yETvIgXOYp3br2pQ==","signatures":[{"sig":"MEUCIDOAdBcTlyANr3BD/sZ/x0QbBjilaSgDYUYrUmlEPYMDAiEAgqBBRHk8iCRZn0bJn7D3Odc47tVEKAZB4nyeAfVC0Pw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3b0a94837dbcea7593ab792c38c75bf0ce01aae9","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.5_1777476421873_0.7519040550461398","host":"s3://npm-registry-packages-npm-production"}},"0.8.6":{"name":"@eight-atulya/atulya-chat","version":"0.8.6","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","_id":"@eight-atulya/atulya-chat@0.8.6","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"homepage":"https://github.com/eight-atulya/atulya#readme","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"dist":{"shasum":"eb2b00417de3eadaebb6af1aec84cfce6a8467dd","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.6.tgz","fileCount":10,"integrity":"sha512-erad/Hit+q+qrbqlOqqu+u6VZXckHIQaqB65NuoTLNnBRQXel23er1ziw5qC2vfgJFSfJITmwYed35aBv+TgnQ==","signatures":[{"sig":"MEQCIC1FIz+EnRM3Pwjv5VvbI21iUg2yUnMHJtYG3p72kJEoAiA4+vgP+VBYqtVXZB5NeotItt6gmPylu0lPtveNhxB2sw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20514},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0013d9831a4718fc2e98685fe27f3a30af6cf02c","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"repository":{"url":"git+https://github.com/eight-atulya/atulya.git","type":"git","directory":"atulya-integrations/chat"},"_npmVersion":"10.9.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","directories":{},"_nodeVersion":"22.22.2","_hasShrinkwrap":false,"devDependencies":{"chat":"^4.0.0","vitest":"^4.0.18","@vitest/ui":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"chat":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/atulya-chat_0.8.6_1777973257429_0.399049536799287","host":"s3://npm-registry-packages-npm-production"}},"0.8.7":{"name":"@eight-atulya/atulya-chat","version":"0.8.7","description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","main":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/eight-atulya/atulya.git","directory":"atulya-integrations/chat"},"scripts":{"build":"tsc","dev":"tsc --watch","clean":"rm -rf dist","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"peerDependencies":{"chat":"^4.0.0"},"devDependencies":{"@types/node":"^22.0.0","@vitest/ui":"^4.0.18","chat":"^4.0.0","typescript":"^5.7.0","vitest":"^4.0.18"},"engines":{"node":">=22"},"_id":"@eight-atulya/atulya-chat@0.8.7","gitHead":"a895eb6de7d884ea3d02f28e64f73fd3602e2235","bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"homepage":"https://github.com/eight-atulya/atulya#readme","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-sW+WVa4QaajaSE2pjEnbJC2295D0SDhzE9iwDFj/NuxtwQUAhSIihO2n0a5G/IFQsvcxrAH6KK8x9ilCoe7jtg==","shasum":"5119861cba1ce2876dcc6c4c2046fa9f080c8aea","tarball":"https://registry.npmjs.org/@eight-atulya/atulya-chat/-/atulya-chat-0.8.7.tgz","fileCount":10,"unpackedSize":20514,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDpaYOASYxRiPIx4cpqD5fboheiiw0/NyolANNDmIOnyAIhAP12YINRKXAc55ztZoka/D4LRvQlsRZZeTb1zc1Gqwsb"}]},"_npmUser":{"name":"eight-atulya","email":"eight.atulya@gmail.com"},"directories":{},"maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/atulya-chat_0.8.7_1782300841297_0.00451527523026618"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-28T14:56:43.189Z","modified":"2026-06-24T11:34:01.533Z","0.8.0":"2026-03-28T14:56:43.475Z","0.8.1":"2026-04-14T05:00:43.541Z","0.8.2":"2026-04-14T09:29:58.287Z","0.8.3":"2026-04-14T10:55:28.088Z","0.8.4":"2026-04-29T11:43:35.634Z","0.8.5":"2026-04-29T15:27:02.022Z","0.8.6":"2026-05-05T09:27:37.573Z","0.8.7":"2026-06-24T11:34:01.447Z"},"bugs":{"url":"https://github.com/eight-atulya/atulya/issues"},"author":{"name":"Anurag Atulya","email":"support@eightengine.com"},"license":"MIT","homepage":"https://github.com/eight-atulya/atulya#readme","keywords":["chat","chatbot","slack","discord","teams","memory","atulya","agents","llm","long-term-memory"],"repository":{"type":"git","url":"git+https://github.com/eight-atulya/atulya.git","directory":"atulya-integrations/chat"},"description":"Atulya memory integration for Vercel Chat SDK - Give your chat bots persistent, per-user memory","maintainers":[{"name":"eight-atulya","email":"eight.atulya@gmail.com"}],"readme":"# @eight-atulya/atulya-chat\n\nGive your [Vercel Chat SDK](https://github.com/vercel/chat) bots persistent, per-user memory with a single handler wrapper. Works with Slack, Discord, Teams, Google Chat, GitHub, and Linear.\n\n## Quick Start\n\n```bash\nnpm install @eight-atulya/atulya-chat\n```\n\n```typescript\nimport { Chat } from 'chat';\nimport { AtulyaClient } from '@eight-atulya/atulya-client';\nimport { withAtulyaChat } from '@eight-atulya/atulya-chat';\nimport { streamText } from 'ai';\nimport { openai } from '@ai-sdk/openai';\n\nconst chat = new Chat({ connectors: [/* your connectors */] });\nconst atulya = new AtulyaClient({ apiKey: process.env.ATULYA_API_KEY });\n\nchat.onNewMention(\n  withAtulyaChat(\n    {\n      client: atulya,\n      bankId: (msg) => msg.author.userId, // per-user memory\n    },\n    async (thread, message, ctx) => {\n      await thread.subscribe();\n\n      const result = await streamText({\n        model: openai('gpt-4o'),\n        system: ctx.memoriesAsSystemPrompt(),\n        messages: [{ role: 'user', content: message.text }],\n      });\n\n      // Stream the response\n      const chunks: string[] = [];\n      for await (const chunk of result.textStream) {\n        chunks.push(chunk);\n      }\n      const fullResponse = chunks.join('');\n      await thread.post(fullResponse);\n\n      // Store the conversation in memory\n      await ctx.retain(\n        `User: ${message.text}\\nAssistant: ${fullResponse}`\n      );\n    }\n  )\n);\n```\n\n## Configuration\n\n### `withAtulyaChat(options, handler)`\n\nReturns a standard Chat SDK handler `(thread, message) => Promise<void>`.\n\n#### Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `client` | `AtulyaClient` | *required* | Atulya client instance |\n| `bankId` | `string \\| (msg) => string` | *required* | Memory bank ID or resolver function |\n| `recall.enabled` | `boolean` | `true` | Auto-recall memories before handler |\n| `recall.budget` | `'low' \\| 'mid' \\| 'high'` | `'mid'` | Processing budget for recall |\n| `recall.maxTokens` | `number` | API default | Max tokens for recall results |\n| `recall.types` | `FactType[]` | all | Filter to specific fact types |\n| `recall.includeEntities` | `boolean` | `true` | Include entity observations |\n| `retain.enabled` | `boolean` | `false` | Auto-retain inbound messages |\n| `retain.async` | `boolean` | `true` | Fire-and-forget retain |\n| `retain.tags` | `string[]` | – | Tags for retained memories |\n| `retain.metadata` | `Record<string, string>` | – | Metadata for retained memories |\n\n### Context (`ctx`)\n\nThe third argument passed to your handler:\n\n| Property/Method | Description |\n|----------------|-------------|\n| `ctx.bankId` | Resolved bank ID |\n| `ctx.memories` | Array of recalled memories |\n| `ctx.entities` | Entity observations (or null) |\n| `ctx.memoriesAsSystemPrompt(options?)` | Format memories for LLM system prompt |\n| `ctx.retain(content, options?)` | Store content in memory |\n| `ctx.recall(query, options?)` | Search memories |\n| `ctx.reflect(query, options?)` | Reason over memories |\n\n## Examples\n\n### Subscribed Message Handler\n\n```typescript\nchat.onSubscribedMessage(\n  withAtulyaChat(\n    {\n      client: atulya,\n      bankId: (msg) => msg.author.userId,\n      recall: { budget: 'high', maxTokens: 1000 },\n    },\n    async (thread, message, ctx) => {\n      const result = await generateText({\n        model: openai('gpt-4o'),\n        system: ctx.memoriesAsSystemPrompt(),\n        messages: [{ role: 'user', content: message.text }],\n      });\n      await thread.post(result.text);\n    }\n  )\n);\n```\n\n### Auto-Retain Inbound Messages\n\n```typescript\nchat.onNewMention(\n  withAtulyaChat(\n    {\n      client: atulya,\n      bankId: (msg) => msg.author.userId,\n      retain: { enabled: true, tags: ['slack', 'inbound'] },\n    },\n    async (thread, message, ctx) => {\n      // Inbound message is already being retained automatically\n      const result = await generateText({\n        model: openai('gpt-4o'),\n        system: ctx.memoriesAsSystemPrompt(),\n        messages: [{ role: 'user', content: message.text }],\n      });\n      await thread.post(result.text);\n\n      // Retain the assistant response separately\n      await ctx.retain(`Assistant: ${result.text}`, {\n        tags: ['slack', 'outbound'],\n      });\n    }\n  )\n);\n```\n\n### Static Bank ID (Shared Memory)\n\n```typescript\n// All users share the same memory bank\nchat.onNewMention(\n  withAtulyaChat(\n    { client: atulya, bankId: 'shared-team-memory' },\n    async (thread, message, ctx) => {\n      // ...\n    }\n  )\n);\n```\n\n## Error Handling\n\nMemory failures never break your bot. Auto-recall and auto-retain errors are logged as warnings and the handler continues with empty memories. Manual `ctx.retain()`, `ctx.recall()`, and `ctx.reflect()` calls propagate errors normally so you can handle them as needed.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}