jiabaobei/memory-bridge

记忆桥 MemoryBridge — 跨设备、跨平台的 AI 共享记忆层 | Cross-device and cross-platform shared memory for AI (CDSMP implementation)

What it solves

MemoryBridge provides a cross-device, cross-platform shared memory layer for AI agents. It solves the problem of fragmented context when switching between devices (e.g., moving from a mobile phone to a PC), eliminating the need to manually copy-paste chat histories or re-explain backgrounds to an AI. Unlike single-machine memory systems, it ensures that semantic memory follows the user rather than the the application.

How it works

The system implements a Cross-Device Semantic Memory Continuity Architecture (CDSMP). It uses a "channel"—a folder on a cloud drive (like OneDrive or Nutstore)—as a meeting point for devices to exchange encrypted differential packages of memory.

Key technical mechanisms include:

  • Deterministic Key Derivation: Devices derive the same encryption key from a hardcoded seed using PBKDF2-HMAC-SHA256, allowing zero-config synchronization.
  • Hybrid Retrieval: It combines vector search, keyword matching, and a Semantic Association Network (SAN) graph, fusing results via Reciprocal Rank Fusion (RRF).
  • Content Freezing: To prevent hallucinations, the system never rewrites or summarizes original memories; it only adjusts structural parameters.
  • MCP Integration: It acts as a Model Context Protocol (MCP) server, making the memory store accessible to clients like Claude Code, Cursor, and Cline.
  • Gateway Mode: A "base station" mode allows mobile devices to access the memory store via HTTP.

Who it’s for

  • Users of AI coding assistants (Cursor, Claude Code, etc.) who work across multiple devices.
  • Developers building personal AI stacks who want a self-hosted, encrypted memory layer.
  • Users seeking a privacy-focused alternative to cloud-hosted AI memory that avoids LLM-driven memory distillation.

Highlights

  • Cross-Device Continuity: Seamlessly syncs memory across phone, PC, and tablet via encrypted cloud drive diffs.
  • C-Level Integration: Native support for MCP, allowing a single memory store to be shared across various AI IDEs and agents.
  • Handover Cards: A specialized memory type (kind=handover) that acts as a persistent "workbench" for long-term tasks, tracking goals, failures, and next steps.
  • Zero-Config Sync: Automatic key derivation and cloud drive detection mean users don't need to manage passwords for standard synchronization.
  • Edge Preloading: Pushes high-heat memories to new devices before they are opened to eliminate retrieval latency.
  • Privacy-First: Implements PAMS (Privacy Access Management System) with migration tags to ensure local-only nodes never leave the device.

Related

  • Project
  • Project
  • Project
  • Project