One shared memory and one shared work journal across multiple AI agent runtimes.
When you run more than one AI coding agent — Claude Code in the terminal, an OpenClaw bot orchestrator, Grok or Antigravity as CLIs, LM Studio locally, Cursor or Copilot in your editor — each forgets what the others did. memory-bridge gives the whole fleet a single canonical memory store and a single append-only work log, so several engines behave as one agent that remembers and knows what is already in progress.
- Shared memory sync (
sync.mjs) — bidirectional sync of a canonical memory directory between runtimes. Atomic writes (temp + rename), automatic backups, coarse process-level locking, and anti-echo (a memory exported from one runtime is not re-imported as new on the next pass). - Append-only work journal (
journal.mjs) — every runtime appends events (start/step/fail/done) to a sharedjournal/journal-YYYY-MM.jsonl.statusshows what each task is doing right now and which ones have failed; the next agent reads it on startup to avoid redoing finished work and to surface open failures. - Skills manifest sync (
sync-skills.mjs) — symlink a shared set ofSKILL.mdfolders into multiple runtimes and keep one manifest in step. - Session capture — transcripts from Claude Code / Grok / Antigravity / Cursor / LM Studio are distilled into short summaries and appended to the shared daily log, so work done in any engine is visible to the others.
The idea that sells it: several AI engines operating as one agent, with common memory and a common journal.
Requires Node.js >= 18 and, optionally, the sqlite3 binary for capturing Antigravity sessions.
# Memory sync: pull from / push to the canonical store, or do both
node sync.mjs pull
node sync.mjs push
node sync.mjs all
# Work journal
node journal.mjs status # what is where + open failures
node journal.mjs append --engine claude --naryad my-task \
--phase start --status wip --action "started the task"
node journal.mjs read --naryad my-task # full history of one taskAll paths and persona defaults are overridable through environment variables (see .env.example for the full list). A few important ones:
| Variable | Default | Purpose |
|---|---|---|
MEMORY_DIR |
~/.claude/projects/<home-encoded>/memory (Claude Code project layout) |
Canonical memory directory synced by sync.mjs |
JOURNAL_DIR |
~/.claude/memory-bridge/journal |
Where journal.mjs reads/writes the work log |
MEMORY_BRIDGE_AGENT_NAME / MEMORY_BRIDGE_AGENT_SLUG |
Agent / agent |
Shared persona name used in prompts, presets, rule files |
MEMORY_BRIDGE_USER_NAME |
User |
Name of the user the agent serves (used in transcript labels) |
MEMORY_BRIDGE_USER_CONTEXT |
(empty) | Short context blurb injected into editor / system prompts |
MEMORY_BRIDGE_FACT_PRIORITY |
(empty) | Comma-separated memory fact stems to load first |
MEMORY_BRIDGE_SQLITE |
/usr/bin/sqlite3 |
sqlite3 binary path, used to read Antigravity session DBs |
Example:
cp .env.example .env
# edit .env, then:
MEMORY_DIR=~/my-shared-memory node sync.mjs allPersona defaults are intentionally generic (
Agent/User). SetMEMORY_BRIDGE_AGENT_NAMEandMEMORY_BRIDGE_USER_NAMEto give the fleet a shared identity — every runtime will then speak with the same voice and know the same user.
sync.mjs # memory sync between runtimes (push / pull / all / cycle / capture-*)
journal.mjs # append-only work journal (status / append / read / project / tail)
sync-skills.mjs # skills manifest + symlink sync
journal-hook-parse.mjs # helper: parse hook JSON into journal-hook shell env
journal-hook.sh # shell hook feeding runtime events into the journal
repos.example.txt # template — git repos to scan for commits
director-repos.example.json # template — repo map for director / test gates
.env.example # template — all environment variables
journal/ # journal storage (journal-YYYY-MM.jsonl + WORKLOG.md projection)
repos.txt, director-repos.json, editor-targets.json, and distill-prompt.md are intentionally not included — they point at private repositories and contain personal prompts. Copy the *.example.* templates, fill in your own paths, and they are picked up on the next run.
Wire journal-hook.sh into your runtime's session lifecycle (e.g. Claude Code Stop / SessionEnd hooks) so failures and session boundaries are recorded even when the agent itself is killed mid-run. The hook resolves its sibling journal.mjs / journal-hook-parse.mjs relative to its own location, so it works from any install path.
MIT — see LICENSE. Copyright (c) 2026 Aleksandr Grebeshok. Source: https://github.com/pyrfor/memory-bridge.