$git clone https://github.com/syncable-dev/memtrace-public---
| 1 | <p align="center"> |
| 2 | <img src="docs/memtrace-hero.svg" alt="Memtrace — structural memory for AI coding agents" width="100%"/> |
| 3 | </p> |
| 4 | |
| 5 | <h1 align="center">Your agents deserve <i>structural memory</i>.</h1> |
| 6 | |
| 7 | <p align="center"> |
| 8 | <a href="docs/">📖 Docs</a> · |
| 9 | <a href="https://github.com/syncable-dev/memtrace-public/stargazers">⭐ Star us</a> · |
| 10 | <a href="https://memtrace.io">memtrace.io</a> · |
| 11 | <a href="https://www.npmjs.com/package/memtrace">npm</a> · |
| 12 | <a href="https://discord.gg/gzedUSNbna">Discord</a> |
| 13 | </p> |
| 14 | |
| 15 | <p align="center"> |
| 16 | Memtrace turns your codebase into a live knowledge graph that AI coding agents can query in milliseconds — every function, class, call edge, and version, across every session, without re-reading files or breaking things they can't see. |
| 17 | </p> |
| 18 | |
| 19 | <p align="center"> |
| 20 | <b>Get your fleet on shared structural memory in under 90 seconds.</b> |
| 21 | </p> |
| 22 | |
| 23 | <p align="center"> |
| 24 | <b>Structural</b> · zero LLM calls · <b>Bi-temporal</b> · time-travel queries · <b>Replay-aware</b> · zero blind refactors |
| 25 | </p> |
| 26 | |
| 27 | <p align="center"> |
| 28 | <a href="https://github.com/syncable-dev/memtrace-public/stargazers"><img src="https://img.shields.io/github/stars/syncable-dev/memtrace-public?style=flat-square&color=00d4b8&logo=github&logoColor=white&label=stars&cacheSeconds=300" alt="Stars"/></a> |
| 29 | <a href="https://www.npmjs.com/package/memtrace"><img src="https://img.shields.io/npm/v/memtrace?style=flat-square&color=00d4b8&logo=npm&logoColor=white&label=npm&cacheSeconds=300" alt="npm version"/></a> |
| 30 | <img src="https://img.shields.io/badge/license-Proprietary%20EULA-E879F9?style=flat-square" alt="License"/> |
| 31 | <img src="https://img.shields.io/badge/runtime-Rust-orange?style=flat-square&logo=rust" alt="Rust"/> |
| 32 | <img src="https://img.shields.io/badge/MCP-native-00d4b8?style=flat-square" alt="MCP"/> |
| 33 | <img src="https://img.shields.io/badge/languages-20%2B-22d3ee?style=flat-square" alt="Languages"/> |
| 34 | <a href="https://discord.gg/gzedUSNbna"><img src="https://img.shields.io/badge/Discord-join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a> |
| 35 | <img src="https://img.shields.io/badge/private%20beta-active-f59e0b?style=flat-square" alt="Private Beta"/> |
| 36 | </p> |
| 37 | |
| 38 | --- |
| 39 | |
| 40 | ## What it does |
| 41 | |
| 42 | **Three things, every release.** |
| 43 | |
| 44 | 🧭 **Run a fleet of coding agents on the same repo without merge hell.** |
| 45 | Each agent reads the same call graph, sees the same blast radius, inherits the same temporal history. No collisions. No stale context. |
| 46 | |
| 47 | 🔁 **Replay any refactor with full causal awareness.** |
| 48 | Agents see exactly what depends on what, and what changed when. No more *"I refactored a function and 14 tests broke that nobody saw."* |
| 49 | |
| 50 | ⚡ **Index a 50k-file repo in under 90 seconds.** |
| 51 | Rust + Tree-sitter, $0 in API costs, 20+ languages plus framework-aware scanners (Vapor, Lapis, Kong, GitHub Actions, Terraform, RLS policies, …), fully local. Your code never leaves your machine. |
| 52 | |
| 53 | 🆕 **LeanCTX Native — compressed reads, smart trees, and a value ledger.** |
| 54 | Four new compression modes on `get_source_window`, single-call directory maps, real-time token-savings dashboard, and an opt-in adaptive learner that beats the static table by ~14%. Full breakdown: [`docs/leanctx-native.md`](docs/leanctx-native.md). Available in v0.3.57+. |
| 55 | |
| 56 | https://github.com/user-attachments/assets/e7d6a1e9-c912-4e65-a421-bd0256dffa5a |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Numbers |
| 61 | |
| 62 | | Operation | Memtrace | Best alternative | Δ | |
| 63 | |---|---|---|---| |
| 64 | | Index 1,500 files | **1.5s · $0** | Mem0: 31 min · $10–50 | **~1,200× faster** | |
| 65 | | Exact symbol query (acc@1, lat) | **96.6% · 0.07 ms** | GitNexus: 97.0% · 8.95 ms | 128× lower latency | |
| 66 | | Graph callers recall (Django) | **81.6%** | GitNexus: 5.3% | **15.4×** | |
| 67 | | Incremental re-index p95 | **42.5 ms** | CodeGrapher: 613.7 ms | 14.4× | |
| 68 | | Hybrid acc@1 (Django, 3K cases) | **73.9%** | GitNexus: 38.6% | 1.91× | |
| 69 | | PR code-review F1 (50 PRs) | **0.7268** | Cubic v2: 0.6077 | **+19.60%** | |