compound-memory

Long-term memory that lets Claude Code and Codex remember your preferences and open threads across sessions, tools and machines.

Stars
★ 348
Last updated
4d ago
FARS reviewed
Nov 29, 2026
License
MIT
Primary language
Python

At a glance

How it runs
CLIAgent plugin / skill
Works with
Portable with changesCodex · Claude CodeOpenAI API · Claude API (Partial support)
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.9+claude CLI (default LLM backend) or an OpenAI-compatible endpointcron (for nightly automated distillation)Shell / CLINetwork accessLocal filesystem
Typical use
Developers who work in Claude Code daily and are tired of restating review style and reporting preferences in every new chat.
Not a fit if
  • Users unwilling to let a tool read all local session logs
  • Anyone expecting zero model spend from pure rule-based memory
Maintenance
Commits in the last 30 dayslast commit 2026-11-25
Source review
63/100 · Some gaps

What does this agent do, and when should you use it?

compound-memory is a local-first memory layer for coding agents, shipped as a zero-dependency Python 3.9+ command-line tool named cm. It reads the session transcripts your coding harnesses already write — Claude Code JSONL, Codex CLI rollouts, DeepSeek Harness zstd logs and Antigravity transcripts — and on a nightly cron (default 30 4 * * *) distills them with a model into memory entries about you, your decisions and your unfinished threads. Those entries are compiled into a snapshot capped by snapshot_max_chars (3200 by default) and injected at session start, either through a Claude Code SessionStart hook or a marked block in ~/.codex/AGENTS.md; cm recall searches the same memory with source attribution. Memories live locally by default but can be pushed to a private GitHub repo or a Feishu table via the sink setting so several machines share one memory. Each shared entry is judged individually for secrets before export. The installer edits a few config files and cm uninstall removes exactly what it added.

The tool scans ~/.claude/projects//*.jsonl, ~/.codex/sessions//rollout-*.jsonl, ~/.dsh/sessions/**/*.jsonl.zstd and Antigravity's transcript.jsonl, keeps only sessions with new activity inside window_days (7 by default), and processes at most nightly_limit sessions (20) per run, one model call each. Distillation produces memory entries with revision tracking so changed decisions expire rather than accumulate; only things you stated explicitly are tagged as requests and inferences are labelled separately. It then builds a snapshot under snapshot_max_chars and injects it at session start through the SessionStart hook (Claude Code, AGY) or an AGENTS.md block (Codex, dsh). cm recall "term" retrieves memories with their source session. Other commands include cm distill (--dry, --days, --limit), cm doctor, cm eval to freeze an evaluation set, cm sink-init, cm attach agy and cm uninstall/--purge. The model backend defaults to your logged-in claude CLI (opus, high effort) and can be switched to llm.backend: openai with base_url and api_key_env for any OpenAI-compatible endpoint.

  1. Developers who work in Claude Code daily and are tired of restating review style and reporting preferences in every new chat.
  2. People who alternate between Claude Code and Codex CLI and want both to draw on the same personal memory.
  3. Users with a desktop and a laptop who want memory synced through a private GitHub repo or a Feishu table.
  4. Anyone with an old pile of one-per-line JSONL memories who wants to migrate them with tools/import-legacy-jsonl.py.
  5. Teams writing docs or public examples who want tools/global-gate to scan every repo against a term list and session fingerprints before pushing.
  6. Teams that need to control model spend and want to forecast nightly cost with cm distill --dry and usage.log.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Config files
~/.compound-memory/config.yaml config.example.yaml
Runtime
Python 3.9+

How do you install or deploy this agent?

You need Python 3.9+ and a model you can call: by default the claude CLI you are already logged into, otherwise an OpenAI-compatible endpoint set via llm.backend.

git clone https://github.com/Protocol-zero-0/compound-memory.git ~/compound-memory
cd ~/compound-memory && bash install.sh

The installer runs one distillation immediately and prints the snapshot so you know it works now. Non-interactive or files-only:

bash install.sh --name Alex --yes
bash install.sh --no-cron --no-inject

Inside Claude Code it can also be installed as a plugin:

/plugin install compound-memory --marketplace Protocol-zero-0/compound-memory

On older Claude Code, add the marketplace first:

/plugin marketplace add Protocol-zero-0/compound-memory
/plugin install compound-memory@compound-memory

Configuration lives in ~/.compound-memory/config.yaml (copied from config.example.yaml at install) and covers user_name, language, model/effort, llm.backend, sink, nightly_limit, window_days, snapshot_max_chars and cron.

How do you use this agent?

If the snapshot appears right after install, it is working; from then on the nightly cron distills and each new session gets the snapshot injected.

cm doctor                      # diagnose why nothing showed up
cm distill --dry               # estimate cost without calling the model
cm distill --days 60 --limit 5 # backfill the last 60 days
cm recall "supplier"           # search memories with sources
cm eval --n 24                 # freeze an eval set before tuning prompts
cm uninstall                   # remove injections and cron
cm uninstall --purge           # also delete memories

Sharing across machines needs a sink:

cm sink-init                   # create the shared layer (e.g. a Feishu table)

Importing legacy memories:

python3 tools/import-legacy-jsonl.py <old.jsonl>

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Verified present in source (3/3)
  • data-flow disclosure

What are this agent's strengths and limitations?

Pros
  • A single zero-dependency Python CLI that runs a distillation during install and prints the snapshot, so you verify it works immediately instead of waiting a night.
  • One memory spans Claude Code, Codex CLI, DeepSeek Harness and Antigravity CLI, and can be shared across machines through a private GitHub repo or Feishu table.
  • Memories are revised and expired rather than appended forever, and explicit requests are tagged separately from model inferences so guesses never become rules.
  • Cost and privacy controls are concrete: nightly_limit, snapshot_max_chars, cm distill --dry and a per-call usage.log, plus per-entry judgments and scrubbing before anything is shared.
  • cm uninstall removes exactly what the installer added, and tools/global-gate screens every repo on the machine against your term list before pushing.
Limitations
  • It reads all of your session logs — its only input — so anyone uncomfortable with that cannot adopt it.
  • The default model is Claude Opus; the README reports Sonnet missing roughly a quarter of entries in testing, so downgrading has a real quality cost.
  • Installation edits ~/.claude/settings.json and ~/.codex/AGENTS.md and installs a cron job, which is a system-level change of medium complexity.
  • The DeepSeek Harness hook-plugin bridge is still flagged as unresolved (⚠️) in docs/dsh.md.
  • The design, retrieval and privacy-gate documents are written in Chinese, so English readers must translate them.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
compound-memory This agent 63 · Some gaps CLIFree + model costs ★ 348 4d ago Python Codex · Claude Code
MemoSync 50 · Major gaps Desktop appFree + model costs ★ 429 3d ago TypeScript Codex · Claude Code · OpenAI API · Claude API
PowerContext 82 · Good CLIFree ★ 1.9k 1d ago Python Codex · Claude Code
agent-memory 81 · Good — ★ 4k 18d ago Python Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
63/ 100 5-point scale 3.2 / 5
Trust 19/29
Reliability 9/14
Adaptability 12/18
Convention 10/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

Data-flow transparency is the strongest area: README and SKILL.md state it reads only local session logs, makes one model call per session nightly, injection edits settings.json/AGENTS.md with backups, cm uninstall removes exactly what it added, and --purge is required to delete memories; the privacy-gate doc notes terms live outside repos, fingerprints store only hashes, and the Action never echoes matched text. Least privilege and confirmation: install is user-initiated and SKILL.md requires asking first, but defaults enable cron and injection and default to Opus, a fairly heavy default, so 2. Sensitive data: per-entry judgment, export scrubbing, hash-only fingerprints, but fingerprints cover only Chinese and terms are self-maintained, known blind spots, deducted. Dependency security: claims zero dependencies and stdlib only, but no lockfile or audit evidence, 2. External effects: writes global git hooksPath and auto-installs Actions on new repos, intrusive though gated and logged, 2. Rollback: uninstall and --purge are clear, but --purge is irreversible with no second confirmation, deducted. Source attribution: only README and plugin.json name Protocol Zero; publisher unverified, weak attribution, 1.

Reliability9 / 14 · 3.2/5

Self-consistency: README, SKILL.md and cli.py commands/config largely agree, but cli.py is truncated at cmd_health so full implementation cannot be confirmed, deducted. Dependency availability: claims Python 3.9+ and zero deps, but cmd_agy_session_start uses Path.is_relative_to (3.9+) with ambiguous boundary, and it depends on an external claude CLI or OpenAI-compatible endpoint, so availability depends on user environment, 2. Failure messages: cmd_doctor, cmd_snapshot exception fallback, and cmd_sink_init errors with field hints are helpful, but some errors print only the exception type, limited, 2.

Adaptability12 / 18 · 3.3/5

Audience and scenarios: targets Claude Code/Codex/dsh/AGY users with clear scenarios. Capability boundaries: SKILL.md states recall results are background not instructions, prefer newest, and inferences are not rules, good boundary statements; but dsh plugin bridge is marked unverified, deducted. Trigger precision: SKILL.md description gives concrete trigger phrases, but relies on the model to decide when to recall, medium precision. Environment fit: supports multiple harnesses and sinks, but depends on specific directory layouts and local CLI, cross-platform details thin, 2.

Convention10 / 18 · 2.8/5

Information architecture: README is well structured with install, support matrix, config, FAQ, privacy, license, but design docs are Chinese and some links point to files not in the packet, deducted. Install notes: very thorough, including non-interactive, --no-cron/--no-inject, plugin install, legacy commands, 3. Naming stability: plugin.json version 0.1.0 but no versioning policy in README; command/config names reasonable but no stability promise, 1. Examples and FAQ: fictional example plus several FAQs, but the example is explicitly fictional and real usage examples are limited, 2. Known limitations: README and privacy-gate.md list several limitations (reads all logs, spends budget, Chinese-only fingerprints), honest, 2. License: full MIT text present, 2. Versioning/changelog: only plugin.json 0.1.0, no CHANGELOG, 1. Maintenance responsibility: only Protocol Zero named, no maintainer contact, contribution guide or issue process, publisher unverified, 1.

Effectiveness9 / 13 · 3.5/5

Output usability: snapshot and recall output are clear with sources and dates, directly injectable, 2. Marginal value: addresses cross-session memory pain, but many similar memory solutions exist and default Opus is costly, medium value, 2. Cost-benefit: nightly_limit, snapshot_max_chars, --dry preview, usage.log provide cost control, but default Opus and multiple nightly calls are not cheap, 2.

Verifiability4 / 8 · 2.5/5

Claim traceability: README claims are mostly prose with few references to specific code or tests, and some doc links are not in the packet, 1. Cross-source corroboration: README, SKILL.md, cli.py and privacy-gate.md largely corroborate commands and behavior, but dsh support is marked unverified and some claims lack code support, 1. Fact/inference separation: SKILL.md explicitly distinguishes explicit requests from inferences and README stresses inferences are not rules, done well, 2.

Risks and how to mitigate them
  • Install enables nightly cron and multi-harness injection by default and defaults to Opus, incurring ongoing model cost; run cm distill --dry first to gauge cost.
  • The privacy gate's verbatim fingerprint covers only Chinese and requires self-maintained terms; English leaks and paraphrased sentences are known blind spots.
  • cm uninstall --purge irreversibly deletes all memories with no second confirmation; back up first.
  • Global git hooksPath and auto-installing Actions on new repos change local and remote repo behavior; confirm this is acceptable.
  • Publisher identity is unverified and maintenance/update path is unclear; review the code before upgrading.
  • cli.py is truncated in the packet, so full implementation and error handling cannot be confirmed; static review confidence is low.
Evidence confidence: Low Reviewed Nov 29, 2026 Reviewed revision 4d0de0e668b3
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/compound-memory.svg)](https://followagents.com/en/agents/compound-memory)
<a href="https://followagents.com/en/agents/compound-memory"><img src="https://followagents.com/badge/compound-memory.svg" alt="FARS review"></a>

FAQ

Will it turn things I said into rules it then follows?
No. Only what you stated explicitly is tagged as a request; model inferences are labelled separately and shown apart in the snapshot.
What does a night cost?
One model call per session plus one snapshot build, capped at 20 sessions by default. Run cm distill --dry to estimate; ~/.compound-memory/usage.log logs one line per call.
Nothing showed up after installing — now what?
Run cm doctor first. Usually there just wasn't a long enough conversation in the last 7 days; try cm distill --days 60 --limit 5 to backfill.
Can several machines share one memory?
Yes. Set sink: github with a private repo, or sink: feishu and run cm sink-init to create the table. The shared layer is files or one table, so deleting it revokes it.
What's left after uninstalling?
cm uninstall removes the injections and cron; memories stay unless you pass --purge.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts