mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
### TL;DR
Added support for conversation grouping in Supermemory middleware through a new `conversationId` parameter.
### What changed?
- Added a new `conversationId` option to the `withSupermemory` function to group messages into a single document for contextual memory generation
- Updated the middleware to use this conversation ID when adding memories, using a `customId` format of `conversation:{conversationId}`
- Created a new `getConversationContent` function that extracts the full conversation content from the prompt parameters
- Enhanced memory storage to save entire conversations rather than just the last user message
- Updated documentation and examples to demonstrate the new parameter usage
### How to test?
1. Import the `withSupermemory` function from the package
2. Create a model with memory using the new `conversationId` parameter:
```typescript
const modelWithMemory = withSupermemory(openai("gpt-4"), "user-123", {
conversationId: "conversation-456",
mode: "full",
addMemory: "always"
})
```
3. Use the model in a conversation and verify that messages are grouped by the conversation ID
4. Check that memories are being stored with the custom ID format `conversation:{conversationId}`
### Why make this change?
This enhancement improves the contextual understanding of the AI by allowing related messages to be grouped together as a single conversation document. By using a conversation ID, the system can maintain coherent memory across multiple interactions within the same conversation thread, providing better context retrieval and more relevant responses.
|
||
|---|---|---|
| .github/workflows | ||
| apps | ||
| packages | ||
| .gitignore | ||
| .npmrc | ||
| biome.json | ||
| bun.lock | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| logo.svg | ||
| package.json | ||
| README.md | ||
| turbo.json | ||
Features
Core Functionality
- Add Memories from Any Content: Easily add memories from URLs, PDFs, and plain text—just paste, upload, or link.
- Chat with Your Memories: Converse with your stored content using natural language chat.
- Supermemory MCP Integration: Seamlessly connect with all major AI tools (Claude, Cursor, etc.) via Supermemory MCP.
How do i use this?
Go to app.supermemory.ai and sign into with your account
- You can also Connect to your favourite services (Notion, Google Drive, OneDrive)
- Once Memories are added, you can chat with Supermemory by clicking on "Open Chat" and retrieve info from your saved memories
- Add MCP to your AI Tools (by clicking on "Connect to your AI" and select the AI tool you are trying to integrate)
Support
Have questions or feedback? We're here to help:
- Email: dhravya@supermemory.com
- Documentation: docs.supermemory.ai
Contributing
We welcome contributions from developers of all skill levels! Whether you're fixing bugs, adding features, or improving documentation, your help makes supermemory better for everyone.
Quick Start for Contributors
- Fork and clone the repository
- Install dependencies with
bun install - Set up your environment by copying
.env.exampleto.env.local - Start developing with
bun run dev
For detailed guidelines, development setup, coding standards, and the complete contribution workflow, please see our Contributing Guide.
Ways to Contribute
- 🐛 Bug fixes - Help us squash those pesky issues
- ✨ New features - Add functionality that users will love
- 🎨 UI/UX improvements - Make the interface more intuitive
- ⚡ Performance optimizations - Help us make supermemory faster
Check out our Issues page for good first issue and help wanted labels to get started!
Updates & Roadmap
Stay up to date with the latest improvements: