@daksh_jaitly: I built mex because coding agents kept rereading the same repo instead of preserving what they learned. 1,200 GitHub st…
Summary
The author built mex, a tool that helps coding agents preserve repo knowledge instead of re-reading, with v0.7.0 adding a local code graph that reduces context usage by 90.7% while maintaining recall.
View Cached Full Text
Cached at: 08/04/26, 02:14 AM
I built mex because coding agents kept rereading the same repo instead of preserving what they learned.
1,200 GitHub stars later, v0.7.0 adds a local code graph. In our repo benchmark, it returned 90.7% less context than grep with 100% expected-symbol recall. (Thread)
(2) The idea behind mex is simple:
A living wiki for your codebase, maintained by coding agents.
Agents write architecture, decisions, conventions and reusable patterns into repo-local Markdown, so future sessions inherit what previous agents learned instead of starting from zero.
(3) v0.7.0 puts a deterministic code graph underneath that wiki.
Tree-sitter extracts symbols and relationships into a local SQLite database.
No embeddings. No AI required to build it.
Supports TS/TSX, JS/JSX, Python and Rust. (and many more coming)
here is an example on the hono codebase
(4) For a task, the agent can run:
mex graph scope “trace the authentication flow”
Instead of dumping full files, mex returns a compact neighbourhood of relevant symbols, callers, callees and relationships under a hard token budget.
Source is expanded only when needed.
(5) On the mex repository benchmark:
• 10.74× smaller than grep top-3 • 90.7% less returned context • 100% expected-symbol recall • 5/5 real-agent tasks completed • 0/5 needed fallback Read/Grep with minimal graph context
(6) The weirdest result:
Giving the agent less source upfront worked better. Minimal graph context + targeted graph get calls needed no Read/Grep fallback.
Inline-source mode needed fallback on 4/5 tasks. A map first. Source only when needed.
(7) The graph also connects the wiki back to the code. A Markdown claim can point to the exact function that makes it true. If that function changes, moves or disappears, mex can flag the affected knowledge as stale.
Small benchmark, public methodology, fully open source:
Checkout the repo: https://github.com/mex-memory/mex
And also join our discord (we’re planning some fun stuff here) https://discord.gg/FEdNsQ4Qt4
90% less tokens.
Similar Articles
I posted mex here a few weeks ago, it crossed 700+ stars and outside contributors started shipping PRs. Just released v0.3 with a terminal dashboard, heartbeat checks, event logs, and agent-memory mode.
mex v0.3 is released, adding a terminal dashboard, heartbeat checks, event logs, and agent-memory mode. This tool provides structured markdown scaffolds for AI agents to load only relevant context, improving memory management for persistent workflows.
I tried building my own persistent memory system, then realized the real problem was keeping it trustworthy after hundreds of commits and refactors. and why is no one else doing this?
The author developed 'mex,' a tool that maintains persistent memory for coding agents by validating and repairing the memory against codebase changes, ensuring it remains trustworthy over time.
@techNmak: An 82K-star GitHub repo is built around one painfully obvious idea: Your coding agent should map the codebase once, not…
Graphify converts entire codebases into persistent knowledge graphs that coding agents can query instead of repeatedly grepping files, improving context understanding and reducing redundancy.
@jasonzhou1993: I gave my coding agent a map across 3 of my repos: - Reduce ~50% token - a grep hook so every grep call has much richer…
Jason Zhou shares a technique to give coding agents a map across repos, reducing token usage by ~50% and enabling richer grep and call chain tracing. He also releases a Claude Code plugin marketplace called AI Builder Club Skills for setting up codebase harness and compounding agent loops.
Building self-sustaining markdowns (Open source project)
The author describes an open-source project called Mex that makes markdown files self-sustaining by enabling coding agents to automatically maintain context, preventing stale documentation and enhancing reliability in AI workflows.