DreamGraph: A Graph-First Cognitive Layer for AI Development Environments
Every AI coding tool youâve used has the same problem: it wakes up blank. It doesnât remember yesterdayâs refactor. It doesnât know that the API endpoint itâs suggesting conflicts with an architecture decision you made three weeks ago. Every session starts from zero.
DreamGraph tries to fix that. Instead of treating each prompt as a fresh start, it runs a background daemon that builds a knowledge graph of your codebase â and keeps it updated as your code changes.
The Problem It Solves
Say youâre working on a large project with Claude Code or Cursor. You ask it to add a new feature. It reads a few files, generates some code. But it doesnât know:
- That you decided last month to deprecate the old auth system
- That the endpoint itâs calling has a rate limit you documented in an ADR
- That the data model itâs extending conflicts with a migration the backend team is planning
You end up re-explaining context every session. DreamGraphâs pitch: stop doing that. Let a graph remember it for you.
If youâve been following our coverage of agent memory â from soul.pyâs markdown-first approach to Graphifyâs one-command knowledge graphs to Hyper-Extractâs hypergraph extraction â DreamGraph is the next evolution of these ideas. Where soul.py proved that even flat files can give agents useful memory, and Graphify showed how to snapshot a codebase into a queryable graph, DreamGraph asks: what if the graph was a living, self-maintaining daemon that reasons over itself?
How It Works (In Practice)
Hereâs what actually happens when you set up DreamGraph:
Step 1: Install and initialize. DreamGraph runs as a daemon process. You install it via npm and create an instance for your project:
npm install -g dreamgraph
dg init my-project
dg start
Step 2: It scans your codebase. The daemon reads your code and builds a knowledge graph â not vector embeddings, but a structured graph with typed entities: features, workflows, data models, architecture decisions, UI components, and the relationships between them.
Step 3: Use it from your existing tools. DreamGraph exposes its graph as MCP tools. If you use Claude Code or Cursor, they can query the graph directly. You can also use the VS Code extension (which includes an interactive graph explorer) or the CLI.
Step 4: It keeps learning. As you make changes, the graph updates. DreamGraph also runs âdream cyclesâ â scheduled passes where it revisits what it knows, checks if relationships still hold, and flags tensions (places where the codebase contradicts itself).
Whatâs a Dream Cycle?
This is DreamGraphâs most distinctive idea. Periodically, the daemon re-examines its knowledge graph and asks questions like:
- âFeature X depends on Service Y, but Service Yâs API changed â is this still valid?â
- âThese two architecture decisions seem to conflict. Should I flag this?â
- âThis data model entity isnât referenced by any feature. Is it orphaned?â
Think of it like code review, but for architectural consistency â running continuously in the background.
Why a Graph Instead of Vectors?
Most AI memory tools use RAG â they chop your code into chunks, embed them as vectors, and retrieve by similarity. That works for âfind something like Xâ but falls apart for structural questions.
You canât ask a vector database âwhich features would break if we changed the user authentication flow?â because vectors donât encode relationships. Graphs do.
We explored this tradeoff in depth in our markdown vs. graph database post, where soul.pyâs flat-file memory was compared to OpenLobsterâs Neo4j approach. The conclusion: files are surprisingly effective for personal agents, but structured graphs win for large-scale architectural reasoning. DreamGraph leans fully into the graph side â and adds the daemon layer that keeps it current.
| Approach | Good At | Bad At |
|---|---|---|
| Flat files (soul.py, MEMORY.md) | Simple setup, human-readable, works for personal agents | Doesnât scale, no relationship queries |
| Vector/RAG | Finding similar content, keyword recall | Structural reasoning, multi-hop queries |
| Static graph (Graphify) | Point-in-time codebase snapshot, fast queries | Goes stale, no continuous enrichment |
| Knowledge Graph (DreamGraph) | Relationships, dependencies, impact analysis, self-maintaining | Initial setup time, heavier runtime |
Multi-Repo Support
Most production systems span multiple repos. DreamGraph handles this â it can build links across a React frontend, a Python backend, a shared Postgres schema, and an infra repo. If your frontend calls an API that touches a database managed by another team, DreamGraph tracks that relationship.
What You Need to Get Started
- Node.js 20+ and npm
- VS Code 1.100+ for the extension (optional but recommended)
- An OpenAI API key (for GPT-5.5 support) or other LLM provider
- A codebase you want to understand better
The project is open source and available on GitHub. The current version is v8.1.0 (âAtlasâ).
Who Should Try This
DreamGraph makes the most sense if you:
- Work on a codebase large enough that no single person understands all of it
- Use AI coding tools daily and are tired of re-explaining your architecture
- Want to catch architectural drift before it becomes technical debt
- Have a multi-repo setup where changes in one repo affect others
If youâre working on a small project or just getting started with AI coding tools, itâs probably overkill. Start with soul.pyâs markdown memory approach for personal agents â itâs simpler and surprisingly effective. Use Graphify if you just need a one-time graph snapshot. Graduate to DreamGraph when you need continuous, self-maintaining architectural memory across a team.
Frequently Asked Questions
How long does the initial scan take? It depends on your codebase size. A medium project (50-100 files) typically takes a few minutes. Large monorepos take longer but the scan runs in the background â you can start using the tools while itâs still building the graph.
Does DreamGraph replace my AI coding tool? No. It works alongside Claude Code, Cursor, or any MCP-compatible tool. It adds a memory layer that makes your existing tools smarter by giving them architectural context.
Is my code sent to the cloud? DreamGraphâs daemon runs locally. LLM calls for enrichment and reasoning use your configured API provider (OpenAI, etc.). Your code stays on your machine â only the queries and graph operations go through the LLM.
Can I use it with private/proprietary codebases? Yes. Since the daemon runs locally and the graph is stored on your machine, it works fine with proprietary code. Just be aware that LLM API calls for enrichment will send snippets to your configured provider.