Knowledge Graph
About
A knowledge graph-driven persistent memory layer for coding agents and LLM workflows.
Details
- Author
- hilyfux
- Categories
- Developer Tools, Knowledge Base, Other, AI
Jump to
Setup
Install Knowledge Graph in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/hilyfux/knowledge-graph
Follow the installation instructions in the repository README, then restart your MCP client.
Knowledge Graph for Claude Code and Codex
Persistent, git-native memory that makes your AI coding agent actually remember. Zero databases, zero services — just bash,jq, and your own commits.
Claude Code and other AI coding agents forget everything between sessions — you end up re-explaining the same project context every time. Knowledge Graph fixes that by turning your file operations and git history into a lightweight, evidence-based memory layer that lives inside your repo.
- Claude Code— auto-tracks reads and writes via hooks, injects a work snapshot on every session start, rebuilds context after/clearand/compact
- Codex / Cursor / Windsurf / any MCP client— 7 tools and 20+ resources exposed by the bundled MCP stdio server (kg_read_node,kg_query,kg_recent_work,kg_blind_spots, …)
No embeddings. No vector stores. No external services. Works on macOS, Linux, and Windows.
- Vibecoders— you describe intent, the agent writes code. Knowledge Graph gives the agent the project context you never had to learn, so one-line requests turn into working changes instead of destructive rewrites.From the maintainer (a vibecoder himself): goal completion and "actually what I wanted" rate jumped at least 10× after installing it — "10× is the floor."
- Senior developers— you want structured, auditable context that your AI agent respects. Every rule traces back to a commit hash or a recorded error event. No hallucinated conventions.
- Teams— rules live in canonicalCLAUDE.mdnodes right next to the code they govern. Codex reads the same nodes through MCP, so teams avoid split-brain knowledge. Share viagit push.
bash <(curl -fsSL https://raw.githubusercontent.com/hilyfux/knowledge-graph/main/standalone/install.sh) /path/to/your-project
git clone https://github.com/hilyfux/knowledge-graph.git cd knowledge-graph .\standalone\install.ps1 C:\path\to\your-project
- Restart Claude Code so hooks activate, or connect your MCP-aware agent.
- For Codex, read the installedAGENTS.mdnotes and use theknowledge-graphMCP server from.mcp.json.
- Run/knowledge-graph initin Claude Code, or use MCP tools such askg_status,kg_query, andkg_read_nodefrom Codex.
From that point on: silent tracking in Claude Code, distributed knowledge nodes per module, and cross-session memory readable by Codex or any MCP-aware agent.
- Cross-agent memory— works natively in Claude Code (hooks); works in Codex / Cursor / Windsurf / any MCP client through the bundled server (7 tools + 22 resources auto-exposed)
- Session-to-session continuity— snapshot survivesclearandcompact; includesgit statusuncommitted changes so the agent knows what's still in progress, not just what was committed
- Predict errors before they happen— co-change prediction preloads related-module prohibitions on first access;Read size-guardwarns before a 25K-token Read hits its ceiling, so the agent knows to Grep + partial-read instead of burning a round-trip
- Auto-discovered dependenciesfrom real co-change patterns — observe work, infer patterns, promote only evidence-backed rules
- Zero-interrupt workflow— heavy analysis mostly runs at session boundaries; long sessions get a throttled background refresh sograph-analysis.jsondoes not go stale
- Named event channels + schema— parallel streams for domain-specific trackers ({channel}-events.jsonl) with formal event shape and corrupt-line tolerance. Seeevents-schema.md.
- Zero dependencies beyondjq— no Docker, no Neo4j, no Python, no services, no daemon. Inspectable. Versionable. No lock-in.
Hooks fire silently during your normal Claude Code workflow:
- Read / Write→ events recorded in ~3ms; first access to a module triggers a co-change prediction that pre-loads related module prohibitions; long write-heavy sessions also trigger a throttled background refresh ofgraph-analysis.json
- SessionStart / PostCompact→ injects the last work snapshot so the agent picks up where it left off
- Stop→ saves the snapshot, rotates the event log, runs background analysis
Pure bash + jqmines patterns from the event log and git history; the LLM is only involved when a knowledge node actually needs to be (re)written. Everything else is zero-token.
Deep dive with full hook table, pipeline diagram, and context-survival matrix:docs/architecture-notes.md.
For non-Claude agents: the same canonicalCLAUDE.mdnodes, work snapshot, and co-change pairs are accessible via the MCP server.
Each module directory gets a compact canonicalCLAUDE.mdnode (≤20 lines, maximum information density). Codex consumes the same node through MCP instead of maintaining a duplicateAGENTS.md.
@references form the dependency graph. The inference engine discovers and adds them from co-change patterns automatically.
7 toolsand aresources channelexposed via MCP, usable from any MCP-aware agent (Codex, Cursor, Windsurf, Claude Desktop, custom clients):
PlusResources: every canonicalCLAUDE.md/SKILL.mdis exposed throughkg://node/<path>,kg://claude/<path>, orkg://skill/<path>. The knowledge index is atkg://index; the work snapshot atkg://snapshot.
Auto-registered in.mcp.jsonduring installation.
- Zero interrupts.Never blocks your coding. Analysis runs at session boundaries.
- Bash computes, LLM decides.Pattern mining is pure bash (~3ms/event); LLM only writes prose.
- Evidence-based only.Every rule traces back to a commit, error, or analysis. No evidence, no rule.
- Predict, don't react.Pre-load related knowledge before errors, based on co-change history.
- Survive everything.clear,compact, long sessions — working state persists through snapshots.
- Minimal token footprint.≤20 line knowledge nodes, pointer-style index, lazy loading.
- Agent-agnostic outputs.Hooks are Claude Code-specific; canonicalCLAUDE.mdnodes, MCP tools, and resources are consumable by Codex and other agents.
- bash— macOS / Linux: native. Windows:Git Bash(winget install Git.Git) or WSL.
- jq—brew install jq/apt install jq/winget install jqlang.jq
- git(optional, recommended) — enhances dependency analysis and evidence tracing
- An MCP-aware AI agent:Claude Codenatively, orCodex / Cursor / Windsurf / Claude Desktopvia the bundled MCP server
- Installation— platform-specific setup (macOS / Linux / Windows / WSL)
- Configuration— env vars and tuning
- Architecture— hook flow, prediction engine, pipeline diagram, installed layout
- Events Schema— channel concept + event shape + tolerance guarantees
- FAQ— common questions
- Changelog— release history
Contributions welcome. SeeCONTRIBUTING.md.
- New pattern types ininfer.sh
- Large-monorepo performance (1000+ modules)
- Prediction accuracy measurement and feedback loops
- Integration tests for non-Claude MCP clients
- Additional agent integrations beyond MCP
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
A task management system for LLM agents to manage projects, tasks, and knowledge using a Neo4j database for complex workflow automation.
AI-native workflow orchestration with long-term memory. 100+ integrations through single credit system. 32 MCP tools for building and running intelligent business workflows — lead enrichment, content publishing, company research, media production. Knowledge Graph that learns across executions. Works with Claude, Codex, Cursor, Windsurf.
Enables persistent knowledge storage for Claude using a knowledge graph with multiple database backends like PostgreSQL and SQLite.
Enables persistent memory for Claude using a knowledge graph stored in local JSON files.
Persistent local memory for Claude, Cursor & Codex. 21 MCP tools, hybrid retrieval (BM25 + vector RRF), bi-temporal queries, contradiction detection. SQLite + Knowledge Graph
Enables AI assistants to use a Neo4j knowledge graph for standardized coding workflows, acting as a dynamic instruction manual and project memory.
Behavioral test gap analysis and grounded integration test generation via knowledge graph; finds untested behaviors, ranks by blast radius, proves via mutation kill.
Neo4j graph database server (schema + read/write-cypher) and separate graph database backed memory
Remote MCP for commodities research — knowledge graph, COT positioning, natural gas storage/weather, futures quotes, and private stories/journals. Requires Arc Research Starter + bearer token.
Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, and Hermes Agent — fewer tokens, fewer tool calls, 100% local
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





