Retour aux articles
Wednesday, July 15, 202644 vues0

One central brain for all my AI agents: Obsidian + Graphify

Mike Codeur

Agents
IA
Claude Code

One central brain for all my AI agents: Obsidian + Graphify

I cut my AI agents' token consumption by a factor of 70. Not by switching models. By changing their memory.

But the token saving is only the consequence. The real story is elsewhere, and it matters more.

The problem: five brilliant, amnesiac employees

I use five different AI tools. Claude Code in the repo, Claude Desktop for daily chat, OpenClaw as a multi-channel butler, Hermes as a 24/7 agent on my VPS, and my own agentic OS for orchestration.

Each has its own memory. Locked inside it.

Claude Code has its CLAUDE.md. Claude Desktop has its conversations. OpenClaw has its memory. Hermes has its own. None of them knows what the others learned.

Two problems stack up:

  1. Your context is fragmented and captive. Switch tools, start from zero. The tool disappears or gets shut off, your brain goes with it.
  2. Every agent re-reads everything, every session. It has no map, so it opens files one by one to work out where it is.

The first problem is strategic. The second is financial. They share a cause.

The thesis: your brain should live in no tool

This is Steph Ango's File over App principle — the Obsidian CEO — pushed into the agent era.

Your memory should live in open files you own. Tools plug into it. None of them owns it.

That is not ideology, it is risk math. An AI tool can disappear, change its pricing, get banned, or simply stop suiting you. If your context lives inside it, you are a hostage. If it lives in markdown you own, you switch tools on a Tuesday afternoon and lose nothing.

A markdown file is readable in ten years, by any agent. No proprietary format, no lock-in.

The architecture: two layers, N surfaces

PLAINTEXT
              ┌──────────────────────────────┐
              │        CENTRAL BRAIN         │
              │   Obsidian (markdown)        │  ← decisions, context, content
              │             +                │
              │   Graphify (graph.json)      │  ← the map of the code, queryable
              │   → open format, yours       │
              └──────────────────────────────┘
                 ▲       ▲       ▲       ▲
        ┌────────┘       │       │       └────────┐
      my OS       Claude Code  OpenClaw        Hermes
   (orchestration) (in the repo) (butler)    (24/7 agent)

   Every surface READS and WRITES the same brain. None owns it.

Layer 1: Obsidian, the human memory

The vault holds my decisions, my context and my content. In plain markdown.

The organising principle, again from Steph Ango: folders indicate type, frontmatter carries metadata. A file never moves. To change a note's status you edit a property, you do not relocate it.

That is the layer I read and edit. And the one agents understand natively, because it is text.

Layer 2: Graphify, the map

This is the new part, and the one that solves the cost problem.

Without a map, an agent landing in your repo has one option: open files. One by one. Every session. That is where the tokens go.

Graphify turns your repo (code, docs, markdown) into a queryable graph, a graph.json, built with tree-sitter. The important part: the graph is built from the AST, not by a model. It costs zero tokens.

The agent then queries the graph instead of re-reading everything.

The numbers — these are the figures published by the claude-code-memory-setup project, on their own benchmark. I quote them as such, not as universal truth:

ApproachCost per session
Re-reading ~40 files~20,000 tokens
Querying graph.json~280 tokens

That is a claimed reduction of up to 71.5× per session, and roughly 499× per query on their 126-file TypeScript test.

In my own use, the order of magnitude holds. That is where the "70×" comes from.

How it actually plugs in

Graphify outputs a graph.json, a GRAPH_REPORT.md, and Obsidian notes (one per function or module). These are files, in the repo, that the agent reads. No magic.

The rule I give my agents is three layers, in this order:

  1. Query the graph to learn where things are and how they connect.
  2. Query the Obsidian vault for decisions and context.
  3. Read the raw code only if necessary.

The whole thing lives in that "only if necessary". Most questions do not require reading the code. They require knowing where it is and why it looks that way.

The real benefit: tools become interchangeable

The brain is central. Tools are satellites.

I can add or remove a tool and lose nothing. The brain stays. When a new agent ships, I plug it into the vault and it arrives with eighteen months of context without me re-explaining anything.

That is the real gain. The 70× is pleasant, but it is the consequence of a good architecture, not the goal.

What to take from it

You do not need my exact setup. You need the rule:

  • Your memory lives in open files you own, not in a tool.
  • Your agents need a map before they need the territory. A map is built once and queried a thousand times.
  • Markdown is an archival format. It will outlive all your tools.

The full method, with the demo and the setup, is in the video: One central brain for all my agents

And if you want this kind of method every week, it is in The Agentic Dev.

Rejoins The Agentic Dev

Chaque semaine : outils, workflows et stratégies pour coder avec les agents IA comme un pro.

Workflows agentic testés en prod
Outils IA qui marchent vraiment
+35 000 développeurs déjà inscrits

Gratuit · 1 email / semaine · +1250€ de formations offertes