supermemory/packages/tools/src
MaheshtheDev 68d4d95c1d feat: allow prompt template for @supermemory/tools package (#655)
## Add customizable prompt templates for memory injection

**Changes:**

- Add `promptTemplate` option to `withSupermemory()` for full control over injected memory format (XML, custom branding, etc.)
- New `MemoryPromptData` interface with `userMemories` and `generalSearchMemories` fields
- Exclude `system` messages from persistence to avoid storing injected prompts
- Add JSDoc comments to all public interfaces for better DevEx

**Usage:**

```typescript
const customPrompt = (data: MemoryPromptData) => `
<user_memories>
${data.userMemories}
${data.generalSearchMemories}
</user_memories>
`.trim()

const model = withSupermemory(openai("gpt-4"), "user-123", {
  promptTemplate: customPrompt,
})
```
2026-01-07 03:48:16 +00:00
..
openai conditional 2025-12-23 19:38:55 -08:00
vercel feat: allow prompt template for @supermemory/tools package (#655) 2026-01-07 03:48:16 +00:00
ai-sdk.ts feat: ai sdk language model withSupermemory (#446) 2025-10-10 05:10:03 +00:00
claude-memory-simple-example.ts feat: Claude memory integration 2025-09-29 13:40:56 -07:00
claude-memory.ts feat: Add memory vs rag and migration section to docs 2025-10-01 18:11:37 -07:00
conversations-client.ts Support for conversations in SDKs (#618) 2025-12-20 00:46:13 +00:00
index.ts feat: withSupermemory for openai sdk (#531) 2025-10-27 20:08:11 +00:00
shared.ts fix: deduplicate memories after returned to save tokens 2025-12-22 11:09:50 -08:00
tools.test.ts fix: model names 2025-10-03 02:41:49 -07:00
types.ts feat: new tools package (#407) 2025-09-02 23:11:19 +00:00