Skip to content

feat: cross-conversation memory sharing system - #1

Merged
dimas-timmers merged 1 commit into
mainfrom
feat/memory-sharing
Jul 11, 2026
Merged

dimas-timmers merged 1 commit into
mainfrom
feat/memory-sharing

Conversation

@dimas-timmers

Copy link
Copy Markdown
Contributor

Summary

  • SharedMemoryNetwork: hierarchical namespaced KV store with CRDT sync, attestation quorum, subscriptions, CoC distillation
  • MemoryGraph: unified cross-conversation graph with MAGMA multi-graph (semantic/temporal/causal/entity), Personalized PageRank retrieval, CoALA memory tiers (working→episodic→semantic→procedural), A-MEM Zettelkasten auto-linking, sleep-time consolidation
  • Simple memory() SDK: dead-simple API — set/get/learn/recall/search/watch/export/import
  • MCP Server for Claude Code: 9 tools, all conversations share ~/.society/shared-memory.db automatically

Architecture

Claude Conv 1 ──┐
Claude Conv 2 ──┼── MCP stdio ──→ society-memory server ──→ SQLite
Claude Conv 3 ──┘                 (MemoryGraph + SharedMemoryNetwork)

arXiv papers incorporated

MAGMA multi-graph (2601.03236), Zep/Graphiti temporal KG (2501.13956), A-MEM Zettelkasten (2502.12110), Sleep-time Compute (2504.13171), HippoRAG 2 PPR (2502.14802), CoALA taxonomy, Mem0 dual-store (2504.19413)

Files

File Lines What
core/src/shared-memory.ts ~1,080 SharedMemoryNetwork engine
core/src/memory-graph.ts ~850 MemoryGraph engine
core/src/sdk/memory.ts ~370 Simple memory() SDK
core/src/mcp/memory-server.ts ~310 MCP server for Claude Code
core/src/storage.ts +100 Schema v15→v16 migration
Tests (5 files) ~1,200 84 integration tests, zero mocks

Test plan

  • SharedMemoryNetwork: 29 tests (CRUD, CRDT, attestations, subscriptions, namespaces)
  • MemoryGraph: 33 tests (nodes, edges, PageRank, tiers, cross-layer import, CRDT sync, persistence, RarasNet)
  • Memory SDK: 15 tests (key-value, learn/recall, 5-agent sync, cross-conversation, watch)
  • Live demo: 3 Claude Code conversations sharing memory end-to-end
  • Full suite: 488/491 passing (3 pre-existing failures from missing OpenRouter key)
  • MCP server smoke test: all 9 tools verified via JSON-RPC

🤖 Generated with Claude Code

Introduces a complete memory sharing stack enabling agents (and Claude Code
conversations) to share context across sessions via a unified knowledge graph.

New engines:
- SharedMemoryNetwork: hierarchical namespaced KV store with CRDT sync,
  attestation quorum, subscriptions, and CoC distillation
- MemoryGraph: cross-conversation unified graph with MAGMA multi-graph
  decomposition (semantic/temporal/causal/entity), Personalized PageRank
  retrieval, CoALA memory tiers, A-MEM auto-linking, sleep-time consolidation
- Simple memory() SDK: dead-simple API (set/get/learn/recall/search/watch)
- MCP Server: 9 tools for Claude Code integration, all conversations share
  ~/.society/shared-memory.db

Storage: schema v15→v16 (shared_memories + memory_graph_* tables)
Tests: 84 new integration tests (zero mocks), all passing

Inspired by: MAGMA (arXiv:2601.03236), Zep/Graphiti (2501.13956),
A-MEM (2502.12110), Sleep-time Compute (2504.13171), HippoRAG 2 (2502.14802),
CoALA taxonomy, Mem0 (2504.19413)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Mar 31, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
society-protocol Ready Ready Preview, Comment Mar 31, 2026 2:58pm

@dimas-timmers
dimas-timmers merged commit 9cab9b9 into main Jul 11, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — 13410a71 Deployed Mar 31, 2026 by vercel[bot]
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.

1 participant