@daksh_jaitly: I built mex because coding agents kept rereading the same repo instead of preserving what they learned. 1,200 GitHub st…

X AI KOLs Timeline Tools

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.

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) https://t.co/CdkFGxUlfk
Original Article
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

Building self-sustaining markdowns (Open source project)

Reddit r/AI_Agents

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.