Every new coding-agent session began with the same expensive introduction to our Elixir umbrella application. It had to find the relevant modules, trace callers, and work out how the pieces fit together. The next session arrived with an empty context window and started again.
The application’s structure was already there in the source. I built a knowledge graph to make it available to agents as something they could query.
Building for our codebase
I’d used CodeGraph, ClawVault, and codebase-memory-mcp. For this project, I wanted a graph built specifically for our Elixir umbrella application, with agent guidance designed alongside it.
The graph walks the project’s AST and records modules, functions, and their callers. A custom MCP server makes those relationships available to OpenCode and Claude Code. Finding the callers of a function becomes a graph query.
Making it part of everyday work
I rolled it out across multiple engineering teams and wrote the AGENTS.md guidance that requires agents to use it for code discovery in each new session.
Across comparable engineering tasks, I observed about 80% lower total token usage, along with more accurate outputs and quicker resolutions. That figure covers the whole task, including code discovery.