Memory Tree¶
Ported from legacy upstream
docs/memory/MEMORY_TREE_VISUALIZATION.md. Concepts preserved verbatim; CLI invocations are unchanged becauseamplihack memory treeis a CLI surface shared between the Python and Rust implementations.See also: Memory Backend Architecture · Agent Memory Quickstart · Memory Backend Reference
This page documents the current amplihack memory tree command.
Overview¶
amplihack memory tree renders the repo's top-level session memory graph
using the amplihack memory database — a SQLite store at
~/.amplihack/memory.db by default, or a LadybugDB graph store when the
graph backend is selected (see
Memory Backend Architecture).
It is a graph view over the top-level CLI/session memory store. It is not
a live view into a generated goal-agent's local ./memory/ directory.
Mental Model¶
The memory tree is a hierarchy with three levels:
- Root — the memory database itself (one per
~/.amplihack/install, plus per-bundle databases whenamplihack new --enable-memoryis used). - Sessions — each top-level session (CLI run, recipe execution, or long-lived agent loop) is a node under the root.
- Memory items — individual entries (learnings, decisions, patterns, conversations, contexts, artifacts) attached to a session.
Edges between memory items express provenance and relationships (for example,
a learning derived from a pattern, or an artifact produced by a
decision). The tree view collapses these edges into a parent/child view
suitable for human inspection.
Usage¶
Basic command¶
Filter by session¶
Filter by memory-item type¶
The current parser accepts these legacy type names:
conversationdecisionpatterncontextlearningartifact
Limit depth¶
Supported Options¶
There is no supported top-level --backend flag on memory tree in the
current parser. The backend is selected by the same environment variables and
config that drive every other amplihack memory subcommand — see
Memory Backend Reference.
Output Shape¶
The command renders a tree of the current session graph, grouped by session
and memory item metadata. The exact styling may change, but the current
command is intended for human inspection rather than machine parsing. For
machine-readable output, use amplihack memory export.
Related Commands¶
amplihack memory export/amplihack memory import— agent-local hierarchical memory transfer.amplihack new --enable-memory— generated agent scaffolds with a local./memory/directory.