Wang Jianjun
All projects

Agent Shared Memory Bus

Share project decisions across coding agents and trace them to their sources.

A local-first MCP service keeps event history, indexes it for retrieval and generates readable Markdown views.

View diagram (swipe sideways)
ONE MEMORY. MANY AGENTS.Shared Memory BusCodexCoding contextClaude CodeProject knowledgeMCP clientsShared factsMemory busLocal-first · MCPJSONLEventsIndexBM25 + vectorsMarkdownDerived viewARCHITECTURE ILLUSTRATIONWJ / SELECTED WORK
Independent DeveloperJan – Sep 2026GitHub
MCPJavaScriptBM25+2

Key results

  • Multiple MCP clients can access shared project memory
  • Five lifecycle tiers, local retrieval and optional remote embeddings

The problem

Project decisions and constraints become scattered across sessions when switching coding agents. The memory bus exposes a shared read/write service, reducing repeated context preparation while retaining provenance.

How memory moves through the system

Inside the workflow

One project memory across AI tools

Route writes and queries separately through MCP, keeping source events, retrieval indexes and readable views distinct.

Context returns to clientWriteRead01AI clientsCODEX / CLAUDE / MCP02Service routingRETRIEVAL / BRIDGE / MGMT03Persist eventsJSONL / LOCAL STORE04Hybrid retrievalBM25 / EMBEDDINGS05Memory lifecycleWORKING → ARCHIVE06Return contextCONTEXT / MARKDOWN
01 / 06

AI clients

Codex, Claude Code and other MCP clients read project facts and experience through shared tool interfaces.

Input
Task and retrieval request
Output
MCP tool invocation

Retrieval is local by default; remote embedding backends receive the configured text.

Three data representations

RepresentationResponsibilityUse
JSONL eventsDurable record of memory changesTrace origins and history
Local indexRetrieval accessCombine BM25 and local vectors
MarkdownHuman-readable derived viewRead in an editor or Obsidian

Obsidian is an optional reading interface. Retrieval, bridging, consolidation and management have separate service responsibilities, exposed to clients through MCP.

Five lifecycle tiers

Working, Session, Project, Shared and Archive hold immediate context, session history, project knowledge, reusable facts and archived memory. Consolidation must preserve provenance so provisional assumptions do not silently become established facts.

Local and remote processing

Default retrieval combines BM25 with local hash embeddings. Configuring a remote embedding provider sends the relevant text to that service, so data scope is an explicit deployment choice.

This project is retained as an open-source technical asset. See the repository for capabilities, deployment and remote embedding configuration.