Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

simple-memory

English | 中文

One on-disk memory, shared by every AI coding agent you run. A memory is one Markdown file, listed on a single line in MEMORY.md; two harnesses pointed at the same machine read and write the same files.

Package What it is Distribution
memory-core Harness-agnostic layer: disk format, MemoryStore, two-level locking, snapshots, injection policy, the memory tool contract. Imports only node:*. Internal workspace package
pi-memory pi adapter: the memory tool, /memory, /dream, /deep-dream, auto-surfacing and extraction, cross-device sync. npm: @yandy0725/pi-memory
dsh-memory DeepSeek harness (@deepseek-ai/dsh, cordis) adapter, sharing the same on-disk memory as pi. Local tarball

The adapter owns the host-specific half — when to inject, how to render, which model to call. memory-core owns the half that must be identical everywhere.

Try it

With pi:

pi install npm:@yandy0725/pi-memory

With dsh: see the build/pack/install commands in dsh-memory.

You do not install memory-core yourself: each adapter tarball carries its own copy, built from this workspace.

Where memory lives

<memoryDir>/<git|local>/<project>/

The default root is $XDG_DATA_HOME/simple-memory on Linux and macOS (~/.local/share/simple-memory when XDG_DATA_HOME is unset or relative) and %LOCALAPPDATA%\simple-memory on Windows. A repository with a remote lands in git/<host__owner__repo> (clones and worktrees share it); anything else in local/<path>. memoryDir overrides the root, but it is per-harness configuration — if you override it, override it in every harness, or sharing silently stops working.

Cross-device sync

Both adapters enable sync by default. In a git project without a configured or initialized remote, memory stays local and startup reports a non-fatal sync configuration error without contacting a remote; a non-git project only gets the unsupported-environment notice. Set sync.remote to share this project's memory across machines, or sync.enabled: false to opt out. See pi-memory, dsh-memory and the reference.

One known behaviour: on resume / fork / reload pi keeps the index recorded in the transcript (changing it would break the prompt cache), so startup convergence still runs and the disk still updates, but this session's memory_index will not show the memories that just synced in until the next compaction or the next session. See why the index is frozen.

Cross-project deep dream

Both adapters expose a manual /deep-dream. It reads the memory of every project under the memory root — the full entry bodies go to the configured model — and turns rules that hold across projects into a candidate report you copy into your global AGENTS.md yourself. Source memories stay read-only, a run with no qualifying candidate is a normal result, and the command reports the report path. The model comes from deepDream.model or defaults.model and is checked only when you run the command.

Details: memory-core reference.

Docs

Development

pnpm install                   # root + all three workspaces
pnpm run check                 # license, host dependency, and core dependency gates
pnpm test                      # tests for all three packages
pnpm run typecheck && pnpm run lint
pnpm -F @yandy0725/memory-core -F @yandy0725/dsh-memory run build   # core + dsh dist/
pnpm run smoke:bundle          # packs both adapters with bundled core and installs them offline

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages