SuperAPI AI Directory

Tree-Ring-Memory

Framework-agnostic, local-first memory lifecycle for AI coding agents with Rust CLI, SQLite/FTS recall, forgetting, audit, consolidation, and TUI.

Open website

About this tool

Tree-Ring-Memory is a framework-agnostic, local-first AI agent memory lifecycle layer. Its design goal is not to save complete conversation transcripts, but to let agents remember useful decisions, warnings, preferences, and lessons. Memories are tiered by freshness: new memories remain detailed; older memories are compressed into "rings"; important "scars" remain visible; lasting truths settle into "heartwood." The project is inspired by DOX's project memory patterns and Revolve's evidence-driven improvement loop, but is independent of both and does not replace any protocol.

Main capabilities

  • Local recall: uses SQLite/FTS storage, does not depend on cloud services.
  • Source-linked memories: supports decisions, scars, lessons, evidence, and persistent project truths.
  • Rust-native functionality: import/export, audit, merge, maintenance, DOX/Revolve adapters, host discovery, and terminal UI.
  • Multi-agent support: same-host multi-agent association, scoped recall filtering, and idempotent writes through the public CLI.
  • Coordinator capability: optional coordinator authorization for shared publishing and lifecycle changes, while ordinary workers remain agent-partitioned.
  • Evidence artifacts: install size, recall speed, host readiness, and recall quality.
  • Privacy defaults: block secret-like memories, hide sensitive details, and do not perform transcript capture.

Technical architecture

The Rust workspace contains:

  • crates/tree-ring-memory-core: models, validation, sensitivity checks, and recall scoring.
  • crates/tree-ring-memory-sqlite: compatibility-mode SQLite/FTS storage and recall filtering.
  • crates/tree-ring-memory-cli: the native tree-ring CLI.

The public runtime is Rust-native. The Rust CLI and Rust crates are responsible for storage, recall, import/export, audit, merge, maintenance, and terminal UI behavior. There is no tracked root Python package, Python wrapper layer, pytest suite, Python smoke script, PyO3 crate, or CPython extension in the repository.

Usage

Installation (verified prebuilt builds, for macOS ARM64 or Linux x86_64):

Recommended project-local installation with first-time initialization:

For macOS ARM64 use Homebrew Installation:

Source installation (requires Rust and Cargo):

Store the first project memory:

Open the terminal console:

Initialization creates the SQLite storage and non-destructive agent-awareness files in the memory root directory:

  • .tree-ring/AGENTS.md: DOX-style Tree Ring Memory guide and root AGENTS.md merge instructions.
  • .tree-ring/SKILL.md: portable skill instructions for agent runtimes.
  • .tree-ring/CLI.md: quick command reference for recall, strict auto-capture, remember, evidence, DOX/Revolve sync, import/export, audit, maintenance, and TUI usage.

Existing awareness files will not be modified. Tree Ring Memory does not modify the project's root AGENTS.md; if DOX-aware agents need to see guidance before entering .tree-ring/, the generated guide must be merged manually.

Installer options: when using --release latest, the installer downloads the official platform archive, downloads its published SHA-256, verifies it, and then installs tree-ring, without requiring Rust. Without --release, it uses cargo to build the Rust CLI. After installation, a terminal onboarding screen is displayed.

After installation, onboarding can be rerun at any time:

Update: Check official releases without changing files:

After authorizing an update, update the active executable within the existing project-local, direct-prefix, or Homebrew-managed scope:

The updater verifies the official release archive and checksum and will not install a second copy under a different prefix. After updating, return to each project root to safely backfill its managed guide:

CLI versions before v0.15 do not include tree-ring update. First upgrade using the same manager or installation prefix: for Homebrew use brew upgrade tree-ring; for project-local installations use install.sh --project --release latest; for other direct installations use install.sh --install-dir <existing-prefix> --release latest. Afterward, use command -v tree-ring and which -a tree-ring to find executables that may still shadow the updated executable.The file's old binary.

After a global install, open the terminal console:

If the shell cannot find tree-ring after a global install, you can run it directly or add the install bin directory to the current terminal. The installer can update future sessions through shell configuration files, but a sub-installer process cannot rewrite the already-running parent shell environment:

After a project-local install, open the terminal console:

The tree-ring command is a Rust CLI. By default, the CLI stores memory in .tree-ring/.

Command ownership is Rust-native:

  • init creates the SQLite store and .tree-ring/AGENTS.md, .tree-ring/SKILL.md, and .tree-ring/CLI.md, does not overwrite existing files, and then attempts to create only the project host configuration.
  • remember, recall, and forget cover direct memory capture, retrieval, editing, and deletion.
  • capture is the strict automatic lifecycle write path: agent scope only, normal sensitivity only, bounded cambium/scar/seed classification, and required checkpoint identity, idempotency, and provenance.
  • evidence is the Revolve-inspired improvement loop entry point, used to evaluate results.
  • dox sync and revolve sync read source files without changing them, and save provenance link summaries to the memory store. Use --dry-run to preview without saving.
  • integrations scan discovers nearby agent framework markers and suggests setup paths without changing their configuration.
  • export, import, audit, consolidate, and maintain are local maintenance interfaces to the same SQLite store.
  • policy manages optional coordinated multi-agent write authorization and its protected write audit trail.
  • welcome and tui are the terminal onboarding and operator console interfaces.

Same-host multi-agent workflow

A coordinator can distribute work to multiple local CLI processes that share one Tree Ring root directory. Give each worker process a unique agent configuration file and operation ID, while sharing the workflow and session:

At convergence, omit the agent configuration file filter so the coordinator sees all agents.

Integration and activation

Project-local host activation supports based onReceipt readiness state: a configured bridge does not mean the agent has used memory. If memory appears silent, run tree-ring integrations status --verbose. Recent recall result counts can distinguish a successful empty recall from a hook that has never run. CLI 0.15.6 fixes cross-session startup recall and generated hooks for project-local installations.

The default init creates canonical project-local storage and configures maintained adapters when it is safe to create new project-local bridges and manifest entries. There is no need to copy skills or manually run integrations link. Existing entries are not overwritten or deleted; disputed bridges or manifests report needs-user-review. The host is active only after a new matching receipt shows that a new session completed scoped recall and safe context injection; init, markers, and generated guidance only establish configuration, not activation.

Shared Tree Ring activation is supported only for concurrent processes on the same host-local filesystem with matching project storage identity. No safety is claimed for cross-host, NFS/network filesystems, or SQLite sharing in containers on different hosts.

Agent guidance plugin (optional)

The repository contains an instructions-only package at plugins/tree-ring-memory/ for ChatGPT/Codex and Claude Code. It adds the reviewed Tree Ring workflow, DOX dry-run guidance, and installed-runtime authentication commands; it does not bundle the CLI, full source authentication scripts, or an MCP server.

Add the marketplace to Codex:

Then restart the ChatGPT desktop app and install Tree Ring Memory from the plugin directory. The repository-local .agents/plugins/marketplace.json is also automatically available when this repository is opened in a supported work or Codex interface.

Add and install the same package in Claude Code:

The plugin requires Tree Ring Memory CLI v0.15.0 or later and teaches the agent how to install a verified project-local runtime when the setup is authorized.

Agent Zero uses its separate plugin. tree-ring init creates a project-local passive Agent Zero binding and records needs-plugin; this only proves that Tree Ring owns the project-side configuration, and does not claimthat Agent Zero is installed, the project is mounted, or the agent has used memory.

For projects that will use Agent Zero, install or update the separate tree_ring_memory plugin, then configure it for the same mounted project root. This is the only additional user setup. The plugin owns its pinned absolute activation-capability.json descriptor outside the project and passes it internally to Tree Ring. Do not copy this file into the repository, create a generic .a0 marker, or call descriptor commands yourself.

The plugin's descriptor-scoped status check can report configured-awaiting-proof; a descriptor-scoped preflight in a new Agent Zero session writes the receipt required for activation. A plain host shell status without the plugin descriptor installed remains needs-plugin by design. Matching Tree Ring core and Agent Zero plugin releases must both be installed; a source checkout, passive binding, or older bundled CLI does not constitute an installed capability claim.

Applicable scenarios and limitations

Suitable for scenarios that need a local, auditable, layered memory lifecycle for AI coding agents, supporting same-host multi-agent collaboration and privacy protection. Limitations: shared activation is limited to concurrent processes on the same host-local filesystem with matching project storage identity; no safe sharing is claimed across hosts, NFS/network filesystems, or containers on different hosts. The project is in a protocol preview state. The plugin does not bundle the CLI or an MCP server. Installation details and version requirements are subject to the official release.