Agent Memory Quickstart¶
This quickstart covers the memory surfaces verified in this checkout today:
- the top-level
amplihack memory treegraph view - the agent-local
amplihack memory export/amplihack memory importtransfer commands - generated goal-agent packages created with
amplihack new --enable-memory
1. Inspect the Top-Level CLI Memory Graph¶
The top-level graph view uses MemoryDatabase, a SQLite store at ~/.amplihack/memory.db by default.
Useful variants:
amplihack memory tree --depth 2
amplihack memory tree --session test_session_01
amplihack memory tree --type learning
memory tree --type currently accepts the legacy compatibility names:
conversationdecisionpatterncontextlearningartifact
2. Generate a Memory-Enabled Goal Agent¶
printf '%s\n' \
'Build an agent that investigates deployment failures, remembers repeated causes, and suggests the next debugging step.' \
> goal.md
amplihack new \
--file goal.md \
--name incident-memory-agent \
--enable-memory \
--sdk copilot
That creates a package under ./goal_agents/incident-memory-agent/.
3. Install and Run the Generated Agent¶
When --enable-memory is set, the generated package includes:
memory_config.yaml- a local
./memory/directory - helper functions in
main.pysuch asstore_success(),store_failure(), andrecall_relevant() amplihack-memory-libinrequirements.txt
4. Export or Import an Agent-Local Memory Store¶
Use the transfer commands when you want to move an agent's hierarchical memory between environments.
amplihack memory export --agent incident-memory-agent --output ./incident-memory.json
amplihack memory import --agent incident-memory-agent --input ./incident-memory.json --merge
For raw Kuzu store replacement instead of JSON merge:
amplihack memory export --agent incident-memory-agent --output ./incident-memory-kuzu --format kuzu
amplihack memory import --agent incident-memory-agent --input ./incident-memory-kuzu --format kuzu
5. Know Which Memory System You Are Looking At¶
There are three related but different surfaces in this repo:
- the top-level CLI graph view, which reads SQLite
MemoryDatabaseat~/.amplihack/memory.db - the agent-local hierarchical store used by
memory export/memory import - the generated package created by
--enable-memory, which scaffoldsamplihack_memoryhelpers and stores local data under./memory/
Those surfaces are related, but they are not the same storage location.