explaingit

divyanshailani/graph-memory

Analysis updated 2026-05-18

14PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

A local SQLite graph database that gives AI coding agents long-term, structured memory of a codebase, connected through the Model Context Protocol.

Mindmap

mindmap
  root((graph-memory))
    What it does
      Tracks codebase structure as a graph
      Local SQLite storage
      MCP server for AI agents
    Tech stack
      Python
      Tree-sitter parsing
      SQLite FTS5
      Model Context Protocol
    Key features
      Trust weighted facts vs assumptions
      Auto generated module summaries
      HTML graph export
    Use cases
      Give coding agents long term memory
      Track project architecture decisions
      Visualize a codebase as a graph
    Audience
      Developers using AI coding agents
      AI agent builders
      Tooling engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give an AI coding agent persistent memory of a project's structure.

USE CASE 2

Automatically map a codebase into a graph using AST parsing.

USE CASE 3

Generate and browse summaries of a project's modules.

USE CASE 4

Separate verified code facts from AI generated assumptions.

What is it built with?

PythonSQLiteTree-sitterMCP

How does it compare?

divyanshailani/graph-memory0c33/agentic-aiadennng/stock_strategy_lab
Stars141414
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/54/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Auto-generated module summaries require a Gemini API key set as an environment variable.

The README does not state a license, so terms of use are not specified.

In plain English

Graph Memory is a local database tool built to give AI coding agents, such as Claude, Codex, and other assistants, a long term memory of a codebase's structure. It stores information as a graph of nodes and relationships in a local SQLite file, and it connects to AI agents through the Model Context Protocol, a standard way for agents to read and write structured project information as they work. One of its core features scans a real codebase and turns it into a graph automatically, using a parsing technique that understands the actual structure of the code rather than just its text, and it supports Python, TypeScript, JavaScript, Go, and Rust. It can also generate short summaries of each part of the code using an external AI service, and it supports exporting the graph as an HTML file so a person can visually inspect what the agent has learned about the project. A notable design choice is trust scoring, which separates facts that are known for certain, like something confirmed by parsing the actual code, from assumptions an AI agent generated on its own, helping keep unreliable guesses distinct from verified structure. The project also defines specific categories of information nodes can hold, separating hard facts, higher level knowledge like design decisions, and records of completed work such as how a particular bug was fixed. To use it, a person installs it with pip, configures it as an MCP server in their AI tool's settings, then runs a command to scan a codebase and, optionally, an environment variable pointing to an API key to generate the automatic summaries. The project describes itself as inspired by an existing open knowledge format for AI agents, but built with a real database and code aware parsing instead of static text files, aiming to reduce mistakes that come from AI generated information alone.

Copy-paste prompts

Prompt 1
Walk me through installing graph-memory and configuring it as an MCP server.
Prompt 2
Help me run graph-memory ingest-code on my project and explain what it produces.
Prompt 3
Explain the difference between Fact_Node, Knowledge_Node, and Episode_Node in graph-memory.
Prompt 4
Show me how to export my graph-memory database as an HTML visualization.

Frequently asked questions

What is graph-memory?

A local SQLite graph database that gives AI coding agents long-term, structured memory of a codebase, connected through the Model Context Protocol.

What language is graph-memory written in?

Mainly Python. The stack also includes Python, SQLite, Tree-sitter.

What license does graph-memory use?

The README does not state a license, so terms of use are not specified.

How hard is graph-memory to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is graph-memory for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.