Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 7, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

## 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,
})
```
@pull pull bot locked and limited conversation to collaborators Jan 7, 2026
@pull pull bot added the ⤵️ pull label Jan 7, 2026
@pull pull bot merged commit 68d4d95 into code:main Jan 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant