Skip to content

feat(memory): graph memory init wizard, TUI commands, and observability #1229

@bug-ops

Description

@bug-ops

Summary

Phase 6 of graph memory (#1222): user-facing features — init wizard, CLI flag, TUI commands, metrics, documentation.

Depends on: #1228 (communities)

Tasks

1. Init Wizard (--init)

Add to interactive configuration wizard:

  • "Enable knowledge graph memory? (experimental) [y/N]" → sets [memory.graph] enabled
  • "LLM model for entity extraction (empty = agent model):" → sets extract_model

2. CLI Argument

Add --graph-memory flag to root CLI (clap):

#[arg(long)]
graph_memory: bool,

When set, overrides config.memory.graph.enabled = true.

3. TUI Commands

Command Description Output
/graph Show graph statistics "Entities: 47, Edges: 89, Communities: 5"
/graph entities List known entities Paginated table: name, type, last_seen
/graph facts <entity> Show facts about an entity List of edges connected to entity
/graph communities List communities Name + summary for each
/graph backfill [--limit N] Backfill graph from existing messages Progress: "Processed 50/500, 12 entities, 23 edges"

4. Metrics

Add to MetricsSnapshot (cfg-gated):

  • graph_entities_total: u64
  • graph_edges_total: u64
  • graph_communities_total: u64
  • graph_extraction_count: u64
  • graph_extraction_failures: u64

Updated via existing watch channel pattern.

5. Documentation

  • Create docs/src/concepts/graph-memory.md: what, why, how to enable, how extraction works, cost, backfill, troubleshooting
  • Update docs/src/concepts/memory.md: add "Graph Memory" section
  • Update docs/src/SUMMARY.md: add graph-memory page
  • Update CHANGELOG.md: document feature under [Unreleased]

6. README Updates

Update root README.md and crates/zeph-memory/README.md via /readme-generator skill.

Architecture Reference

See .local/plan/graph-memory-architecture.md Section 8 for wizard flow, TUI commands, and metrics fields.

Acceptance Criteria

  • Init wizard includes graph memory question
  • --graph-memory CLI flag enables graph memory
  • /graph shows entity, edge, community counts
  • /graph entities lists entities with pagination
  • /graph facts <name> shows edges for specific entity
  • /graph backfill processes existing messages with progress
  • Metrics visible in TUI dashboard
  • Documentation complete and linked from SUMMARY.md
  • CHANGELOG.md updated
  • ~9 tests (7 unit + 2 integration)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentationenhancementNew feature or requestgraph-memoryKnowledge graph memory featurememoryzeph-memory crate (SQLite)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions