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, registers this machine, and prints engram status.

Run engram doctor to check this machine is wired up, and engram status to see all of them.

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 (or .claude/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, unless you run engram connect --adopt. 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). --adopt takes over existing skill folders of the same name; --skills-only leaves instruction files and hooks to another tool such as a dotfiles manager
engram disconnect [agent …] undo connect
engram schedule on / off the 30-minute background push
engram doctor health check: repo, remote, last sync, schedule, agents
engram status every machine on this memory repo: OS, engram version, last sync, memory commits it has not pulled yet, connected agents, and problems (stale, outdated, parked conflict, no background sync)
engram upgrade pip install --upgrade engram-sync for the interpreter running engram

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
nodes/<host>.json one heartbeat per machine, written by sync, read by `engram status`
.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.2.1

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.2.1
File Size Uploaded Provenance Actions
engram_sync-3.2.1.tar.gz 28.9 kB With provenance Details for engram_sync-3.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 54.8 kB

Release files / engram_sync-3.2.1.tar.gz

Download URL engram_sync-3.2.1.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0c8327534abb9a1ca3d49f906bdaa69a8e46fa7c1cdbd078b20a567cbd9ffe60
BLAKE2b-256 checksum
How to use checksums
ce2f1bc205d4ea6307150de11785bac49f649fdcdad40e1bd983fcfaa5951682
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 17, 2026.

Transparency log

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

Download URL engram_sync-3.2.1-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84a433193e0fb03b75e92cf3bf7397bc6420a4f9f97f26e6ea537a88af5e8b83
BLAKE2b-256 checksum
How to use checksums
b11f9d58d54942b6eb308055d00698e50f5bb7646d9ef8081bf90dd195251426
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 17, 2026.

Transparency log

Security for engram-sync 3.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for engram_sync-3.2.1.tar.gz

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 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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