Skip to content

Replace Embedchain with Supermemory for semantic search#12

Closed
Dhravya wants to merge 3 commits intomainfrom
claude/integrate-supermemory-Vymib
Closed

Replace Embedchain with Supermemory for semantic search#12
Dhravya wants to merge 3 commits intomainfrom
claude/integrate-supermemory-Vymib

Conversation

@Dhravya
Copy link
Copy Markdown
Owner

@Dhravya Dhravya commented Jan 4, 2026

This commit completely migrates from Embedchain (Python backend) to Supermemory
(npm package) for semantic search and user profile features.

Key Changes:

  • Installed supermemory package and upgraded better-sqlite3 to v12.5.0
  • Added SUPERMEMORY_API_KEY environment variable
  • Created Supermemory client utility module (src/lib/supermemory.ts)
  • Replaced Embedchain API calls in /api/note/route.ts with Supermemory's add()
  • Replaced Embedchain API calls in /api/search/route.ts with Supermemory's search.memories()
  • Updated search-results.tsx to reference Supermemory instead of Embedchain

New Features:

  • Created /api/supermemory/setup endpoint for configuring Supermemory settings
  • Created /api/chat endpoint with user profile support for personalized conversations
  • User profiles automatically extract facts from notes (static + dynamic)
  • Hybrid search mode searches both memories and document chunks

Benefits:

  • No Python backend needed - direct API calls via npm package
  • Edge runtime compatible
  • Better performance with hybrid search
  • Automatic user profile extraction for personalized context
  • Comprehensive documentation in SUPERMEMORY_INTEGRATION.md

This commit completely migrates from Embedchain (Python backend) to Supermemory
(npm package) for semantic search and user profile features.

Key Changes:
- Installed supermemory package and upgraded better-sqlite3 to v12.5.0
- Added SUPERMEMORY_API_KEY environment variable
- Created Supermemory client utility module (src/lib/supermemory.ts)
- Replaced Embedchain API calls in /api/note/route.ts with Supermemory's add()
- Replaced Embedchain API calls in /api/search/route.ts with Supermemory's search.memories()
- Updated search-results.tsx to reference Supermemory instead of Embedchain

New Features:
- Created /api/supermemory/setup endpoint for configuring Supermemory settings
- Created /api/chat endpoint with user profile support for personalized conversations
- User profiles automatically extract facts from notes (static + dynamic)
- Hybrid search mode searches both memories and document chunks

Benefits:
- No Python backend needed - direct API calls via npm package
- Edge runtime compatible
- Better performance with hybrid search
- Automatic user profile extraction for personalized context
- Comprehensive documentation in SUPERMEMORY_INTEGRATION.md
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
notes Error Error Jan 6, 2026 1:57am

Major changes:
- Removed embedchain Python backend (replaced with Supermemory)
- Removed old nottykv-cloudflare-worker directory
- Created new worker/ directory with TypeScript implementation
- Implemented Durable Objects for real-time note synchronization
- Added Cloudflare KV-based rate limiting
- Created flexible rate limiting utility (supports both CF KV and Vercel KV)
- Updated API routes to use new rate limiting system

Worker Features:
- NotesSync Durable Object for per-user real-time sync
- WebSocket support for instant updates across devices
- HTTP API for note CRUD operations
- Rate limiting with configurable limits per operation type
- CORS enabled for cross-origin requests
- Backward-compatible legacy KV endpoints

Benefits:
- No Python backend needed
- Real-time synchronization with WebSockets
- Lower costs (~$0-5/month vs ~$10-15/month)
- Better performance with edge computing
- Automatic conflict resolution (last-write-wins)
- Scalable architecture

Documentation:
- worker/README.md - Worker setup and API docs
- CLOUDFLARE_MIGRATION.md - Complete migration guide
- SUPERMEMORY_INTEGRATION.md - Supermemory integration guide
- Migrate Durable Objects to use SQLite storage API for persistent data
- Update Next.js API routes to use Durable Objects as primary storage
- Add migration utility to transfer data from KV to Durable Objects
- Configure wrangler.toml with proper DO bindings and SQLite support
- Update .gitignore to include worker artifacts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants