Memgraph CLI — Knowledge graph and memory system for AI coding agents.
Features a phyllotaxis-spiral visual knowledge graph explorer, automatic skills folder synchronization, TF-IDF + semantic graph linking, and agent-agnostic memory persistence.
Status: v1.9.0 — stable public API. Automated tests cover graph build, query scoring, ranking order, guide/catalog discovery, serve API JSON-error contracts, end-to-end ingest, and memory writes with
-raceon every push.
planning-with-files — cross-session memory for your plans
planning-with-files (26k stars) keeps task_plan.md, findings.md, and progress.md on disk so agent work survives context loss, /clear, and crashes. memgraph indexes those files as graph nodes — turning single-session plans into cross-session memory.
Separately:
- planning-with-files → your plan survives
/clearwithin a session - memgraph → you find the right skill before starting work
Together:
- memgraph → "last time you fixed a websocket bug, you used
audit-websiteand here's what yourtask_plan.mdsaid worked and what failed"
┌─────────────────────┐ ┌─────────────────────┐
│ planning-with-files │ │ memgraph │
│ │ │ │
│ task_plan.md │────▶│ type: "plan" node │
│ findings.md │────▶│ in knowledge graph │
│ progress.md │────▶│ │
│ │ │ recommend --include-plans
│ survives /clear │ │ returns skills + │
│ within a session │ │ past plans together │
└─────────────────────┘ └─────────────────────┘
▲ │
│ "what did I try │
└────last time?─────────────┘
# Index your skills + planning files
memgraph graph-from-dir --include-plans
# Ask for recommendations — get skills AND past plans
memgraph recommend "fix websocket vulnerability" --include-plansmemgraph also discovers plans from any framework — TODO.md, PLAN.md, ROADMAP.md, docs/plans/*.md, or auto-detected by structure. See Plan File Discovery below.
- Galaxy Visualization: Interactive Via Lactea star map (
memgraph serve) — spiral arm layout, draggable stars, search, edge toggles. - Agent-First CLI:
memgraph guide,memgraph help-json,memgraph query,memgraph related,memgraph recommend— learn the tool, discover commands, search the graph, and get skill recommendations with JSON output for agent consumption. - Copy Visible Paths: Filter skills (e.g. search "rbm20"), hit
ENTER, then copy all visible file paths to share directly with your agent. - Auto-Sync:
--sync-dirmonitors any directory and updates the knowledge graph in real-time. Comma-separated multiple directories supported. - Watch Mode:
memgraph watchmonitors skill directories and auto-rebuilds the graph on file changes — no more stale graphs. Polls every 4 seconds by default. - Graph-From-Dir: Ingest any directory of
SKILL.mdor.mdfiles into a relational knowledge graph (references,similar,shared-keyword). - Plan File Discovery: Index task plans, TODOs, and roadmaps from any planning framework — not just planning-with-files. Built-in patterns cover
task_plan.md,TODO.md,PLAN.md,ROADMAP.md,docs/plan/*.md,docs/plans/*.md. Auto-detect heuristic catches any.mdfile with phase/checkbox structure. Custom patterns via~/.memgraph/plan-patterns.json.memgraph recommend --include-plansreturns relevant past plans alongside skills. - Centralized Storage: All memories stored in
~/.memgraph/with git-based project scoping. - Agent Integration: Works seamlessly with Claude Code, OpenCode, Copilot, and SuperCLI.
Start with the embedded manual—no repository checkout or network is required:
memgraph guide # structured JSON mental model
memgraph guide --human # readable Markdown rendering
memgraph help-json # machine-readable command catalog
curl -s http://127.0.0.1:8080/guide
curl -s http://127.0.0.1:8080/llms.txtThe guide explains the memory/graph model, canonical workflow, command groups,
examples, and operational gotchas. help-json is the catalog; guide is the
mental model.
curl -L https://github.com/javimosch/memgraph/releases/latest/download/memgraph -o ~/.local/bin/memgraph && chmod +x ~/.local/bin/memgraphgit clone https://github.com/javimosch/memgraph.git
cd memgraph
go build -o memgraph .
cp memgraph ~/.local/bin/# Ingest all your global agent skills into a graph
memgraph graph-from-dir ~/.agents/skills
# Start the web UI server with auto-sync enabled
memgraph serve --auto-sync --port 8080Open http://localhost:8080 to explore your agent skills constellation!
# Initialize memory system for current project
memgraph init
# Save a memory
memgraph remember "Use real database instances in tests, not mocks" --type feedback
# Recall memories
memgraph recall "database" --json
# List memories
memgraph listGenerate bridge configs for your AI agents:
memgraph bridge claude-code
memgraph bridge opencode
memgraph bridge copilotmemgraph indexes task plans, TODOs, and roadmaps from any planning framework — not just planning-with-files. Three discovery layers:
Built-in patterns (no config needed):
| Pattern | Trigger file | Content files | Framework |
|---|---|---|---|
| planning-with-files | task_plan.md |
findings.md, progress.md |
OthmanAdi/planning-with-files |
| todo-md | TODO.md |
— | Common convention |
| plan-md | PLAN.md |
— | Common convention |
| roadmap-md | ROADMAP.md |
— | Common convention |
| docs-plan | docs/plan/*.md |
— | Repo-specific |
| docs-plans | docs/plans/*.md |
— | Repo-specific |
Auto-detect heuristic: any .md file with phase headings (## Phase, ## Step, ## Sprint, ## Milestone) AND checkboxes (- [ ], - [x]) is scored as a potential plan. Threshold of 4+ avoids false positives on regular documentation.
Custom patterns via ~/.memgraph/plan-patterns.json:
[
{
"name": "my-sprints",
"trigger": "SPRINT.md",
"content_files": ["NOTES.md"],
"subdirs": ""
}
]# Index skills + plan files together
memgraph graph-from-dir --include-plans
# Get recommendations that include past plans
memgraph recommend "fix websocket vulnerability" --include-plans
# List all indexed plans
memgraph plansWhen you ask "fix websocket vulnerability", memgraph returns not just the audit-website skill but also any past plan from a similar task — what you tried, what worked, what failed. This turns any planning framework into cross-session memory.
Keep the graph always fresh without manual rebuilds:
# Watch standard skill directories (auto-discovers ~/.agents/skills, etc.)
memgraph watch
# Watch custom directories with a custom poll interval
memgraph watch --sync-dir ~/my-skills --poll-interval 2
# JSON output for daemon mode
memgraph watch --jsonJarancibia — @javimosch · intrane.fr
Issues and PRs welcome on GitHub.
MIT