By neo4j-labs
Persist Claude Code sessions to a Neo4j knowledge graph, enabling recall of prior learnings, debugging context from past errors, and orchestrating multiagent workflows grounded in accumulated graph memory.
Memory-grounded multiagent orchestration. Recall prior MKG learnings, deploy subagents to execute a task in verified phases while routing memory into each one, then capture durable new learnings back to the graph. Use to execute, run, or carry out a task or plan with the Meta Knowledge Graph in the loop.
Onboard a new MKG agent. Check that the meta-knowledge-graph MCP is mounted and which tools are live, inspect the graph state, then either launch the RoadFlex sales demo or build a custom agent persona by capturing user memories.
Set up the RoadFlex sales-agent demo for MKG - configure the repo .env, seed Neo4j, optionally enable Diffbot and BigQuery/Neocarta, and verify the MCP tools mount.
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
The Meta Knowledge Graph (MKG) is a self-improving, graph-structured memory
layer for AI agents, backed by Neo4j. It is harness-agnostic: the Neo4j
store and the MCP server plug into any MCP-capable harness, and the
capture/injection scripts ride on whatever lifecycle hooks the harness exposes.
This repo ships ready-made wiring for Claude Code
(.claude/settings.json) and Codex
(.codex/config.toml plus
.codex/hooks.json); plugging a custom harness in means
pointing its lifecycle events at the same scripts.
It ships as two halves that form a closed capture-and-recall loop:
meta-knowledge-graph) — surfaces project memory, the underlying
graph, the persisted system prompt, and (optionally) a data catalog and
warehouse to the agent as tools.:Learning candidates (scoped project or user,
covering durable facts and decisions alike) from what just happened, plus an
append-only :Observation timeline entry per work window (episodic memory:
what happened, recalled by recency at session start).The hooks write to the same graph the MCP tools read from, so each new session starts with the most relevant prior learnings already injected — both project-scoped memory and durable facts about the user. The persisted system prompt is frozen at runtime: it is read on start but never rewrites itself. The memory extraction prompt is a fixed code constant — there is no Neo4j-backed self-improvement loop. The only writers of the system prompt besides the seed scripts are the deliberate consolidation services — a rate-limited Stop/SessionEnd hook that folds accumulated user-profile memory into the system prompt once enough of it has piled up unreviewed, keeping every superseded prompt as version history.
A complete end-to-end demo — a B2B sales / customer-success assistant for an enterprise car-rental provider — ships in the repo; see Sales agent use case for setup.
MKG is harness-agnostic, and can run in several ways:
.codex/ wiring.Either way MKG is two halves — lifecycle hooks (capture + recall) and an
MCP server (Neo4j / BigQuery / neocarta tools) — and the only host
prerequisites are uv and a reachable Neo4j
instance; both halves execute through uv.
claude plugin marketplace add neo4j-labs/meta-knowledge-graph
claude plugin install meta-knowledge-graph@mkg
mkg; the qualified plugin id is meta-knowledge-graph@mkg.uv run --project to create the plugin cache virtualenv (one-time; that start
is slower). Later MCP starts execute the cached .venv/bin/python -m meta_knowledge_graph directly, with the venv on PATH so optional MCP
subprocesses run from the same environment instead of doing their own uvx
startup install.claude plugin list shows meta-knowledge-graph@mkg enabled; inside
a session the MKG system prompt is injected and mcp__meta-knowledge-graph__*
tools are available.claude plugin disable meta-knowledge-graph@mkg
claude plugin enable meta-knowledge-graph@mkg
claude plugin details meta-knowledge-graph@mkg # component inventory + token cost
For an installed Claude Code plugin, the config path is:
~/.config/meta-knowledge-graph/.env
Credentials live in that one user-global file (mode 600), read by both the
hooks and the MCP server. It survives plugin updates and is never written into
the ephemeral plugin cache.
MKG deliberately does not use
/plugin configure— there is nouserConfig/keychain schema, so credentials stay file-based and portable across harnesses (Codex, etc.).
Run the wizard in your own terminal (it prompts for secrets):
uv run --project ~/.claude/plugins/marketplaces/mkg meta-knowledge-graph setup
…or write the file by hand. Example ~/.config/meta-knowledge-graph/.env:
npx claudepluginhub neo4j-labs/meta-knowledge-graph --plugin meta-knowledge-graphmaenifold knowledge graph and reasoning infrastructure
Capture Claude Code runtime activity through Agent Context Graph hooks.
The memory layer Claude Code doesn't have. A persistent knowledge graph that learns from your conversations — your AI assistant never starts a session blind.
Local-first AI memory and knowledge graph for Claude Code: vector search, RAG, GraphRAG, RDF/SPARQL/RDFS/SHACL, scoped agent memory, and corpus-to-graph workflows — bundled as a skill plus live MCP tools.
Causal graph + hierarchical memory. Adds /link, /explain-link, and an investigator agent for root-cause traversal. Includes the delete tools shipped in agentdb 3.0.0-alpha.13.
The bridge between Claude's working memory and Basic Memory's durable knowledge graph — session briefings, pre-compaction checkpoints, and capture reflexes