Skip to main content

engram-sync

Shared memory for AI coding agents across all your machines. Facts live as markdown in a private git repo you own. Claude Code, Codex, OpenCode, Antigravity and Muse all read the same memory, and every machine pulls and pushes it automatically.

pip install engram-sync
engram init yourname/agent-memory

init takes a GitHub owner/name or any git URL. Create the repo first as an empty private repo. On the first machine init seeds it. On every other machine init clones it. Then init:

  1. connects every agent it finds on this machine (details below);
  2. schedules a background push every 30 minutes (Windows Task Scheduler, or cron on Linux/macOS);
  3. runs the first sync.

Run engram doctor to check everything is wired up.

What lands in each agent

Agent Skills copied to Instructions added to Session hooks
Claude Code ~/.claude/skills ~/.claude/CLAUDE.md (with an @import of index.md) pull on start, push on end
Codex $CODEX_HOME/skills (~/.codex/skills) ~/.codex/AGENTS.md background sync
OpenCode ~/.config/opencode/skills ~/.config/opencode/AGENTS.md, only if you already have one (otherwise OpenCode reads ~/.claude/CLAUDE.md) background sync
Antigravity ~/.gemini/config/skills ~/.gemini/rules/engram.md background sync
Muse ~/.config/muse/skills reads ~/.claude/CLAUDE.md background sync

Three skills ship with the package: engram (operate sync), engram-remember (save a fact to the right file) and engram-consolidate (weekly cleanup, conflict repair). Put your own skills in skills/<name>/SKILL.md inside the memory repo and every connected agent on every machine gets them on the next pull.

Instructions go between <!-- engram-sync:begin --> and <!-- engram-sync:end --> markers. Your own text around the markers is never touched. A skill folder you created yourself is never overwritten, even if it has the same name as one of engram's. engram disconnect removes exactly what connect added.

Commands

Command Does
engram init <repo> clone or seed the memory repo, connect agents, schedule sync
engram sync pull / push sync now; always exits 0 so it can never break an agent session
engram connect [agent …] connect all detected agents, or the named ones (claude codex opencode antigravity muse)
engram disconnect [agent …] undo connect
engram schedule on / off the 30-minute background push
engram doctor health check: repo, remote, last sync, schedule, agents

The memory repo defaults to ~/engram. Use --repo <path> or $ENGRAM_HOME to put it elsewhere.

Memory repo layout

index.md          routing table, loaded into every session (keep under 100 lines)
projects/<x>.md   one file per project, read on demand
global/           preferences and machine facts
inbox/YYYY-MM.md  quick captures, merged out by engram-consolidate
archive/          dormant projects and the consolidate log
skills/           optional: your own skills, shared to every agent
.engram/sync-paths.conf   what syncs automatically

Safety

  • Sync commits only the paths in .engram/sync-paths.conf. Anything else in the repo needs a manual commit.
  • Each push scans added lines for AWS, GitHub, Slack, OpenAI, Anthropic and Google keys, private keys, JWTs and password=-style strings. On a match nothing is committed and ALERT.md explains the fix. Mark a known false positive with <!-- engram:not-a-secret --> on that line.
  • When two machines can't merge (one deleted a file the other edited), the losing machine force-pushes its commits to conflict/<host> on your remote and writes ALERT.md. The next session sees the alert. Saying "consolidate memory" merges the branch back. No commit is ever left only on one machine.
  • Git never prompts. Every remote call runs with prompts and credential dialogs disabled and with stall timeouts, so a session never hangs on a password box.

Full rules: docs/sync-contract.md.

Requirements

Python 3.9+ and git on PATH. No other dependencies. Authenticate git to your remote the usual way (GitHub CLI, credential manager or SSH key) before init.

Development

pip install -e .
python -m unittest discover -s tests -t .

License

MIT

Metadata

Release files for engram-sync 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for engram-sync 3.0.0
File Size Uploaded
engram_sync-3.0.0.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for engram-sync 3.0.0
File Interpreter ABI Platform
engram_sync-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / engram_sync-3.0.0.tar.gz

Download URL engram_sync-3.0.0.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6a470c9c3af9946786203cc1bbee4513a1b089d5c42abc35c165ff203e354eea
BLAKE2b-256 checksum
How to use checksums
7353bed4d15be27c42c4036dbc185ec2118e2428bbc871a14774653258c209ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / engram_sync-3.0.0-py3-none-any.whl

Download URL engram_sync-3.0.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1932cc75f59f37362b13ad0382136db5f4f76a8648ddee118987075fe04e53b
BLAKE2b-256 checksum
How to use checksums
3b5560a88a62e60283760ac607650de629e9c0ad436dbe8ea2113b8442ec10b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

3.1.0

2 release files

This release

3.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page