Labsco
syncable-dev logo

memtrace

β˜… 218

from syncable-dev

Memtrace gives AI coding agents structural memory β€” your codebase as a live knowledge graph so agents stop re-deriving code structure from scratch and start reasoning from fact.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup
<p align="center"> <img src="docs/memtrace-hero.svg" alt="Memtrace β€” structural memory for AI coding agents" width="100%"/> </p> <h1 align="center">Your agents deserve <i>structural memory</i>.</h1> <p align="center"> <a href="docs/">πŸ“– Docs</a> &nbsp;Β·&nbsp; <a href="https://github.com/syncable-dev/memtrace-public/stargazers">⭐ Star us</a> &nbsp;Β·&nbsp; <a href="https://memtrace.io">memtrace.io</a> &nbsp;Β·&nbsp; <a href="https://www.npmjs.com/package/memtrace">npm</a> &nbsp;Β·&nbsp; <a href="https://discord.gg/gzedUSNbna">Discord</a> </p> <p align="center"> 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. </p> <p align="center"> <b>Get your fleet on shared structural memory in under 90 seconds.</b> </p> <p align="center"> <b>Structural</b> Β· zero LLM calls &nbsp;Β·&nbsp; <b>Bi-temporal</b> Β· time-travel queries &nbsp;Β·&nbsp; <b>Replay-aware</b> Β· zero blind refactors </p> <p align="center"> <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> <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> <img src="https://img.shields.io/badge/license-Proprietary%20EULA-E879F9?style=flat-square" alt="License"/> <img src="https://img.shields.io/badge/runtime-Rust-orange?style=flat-square&logo=rust" alt="Rust"/> <img src="https://img.shields.io/badge/MCP-native-00d4b8?style=flat-square" alt="MCP"/> <img src="https://img.shields.io/badge/languages-20%2B-22d3ee?style=flat-square" alt="Languages"/> <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> <img src="https://img.shields.io/badge/private%20beta-active-f59e0b?style=flat-square" alt="Private Beta"/> </p>

What it does

Three things, every release.

🧭   Run a fleet of coding agents on the same repo without merge hell. Each agent reads the same call graph, sees the same blast radius, inherits the same temporal history. No collisions. No stale context.

πŸ” Β  Replay any refactor with full causal awareness. Agents see exactly what depends on what, and what changed when. No more "I refactored a function and 14 tests broke that nobody saw."

⚑ Β  Index a 50k-file repo in under 90 seconds. 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.

πŸ†• Β  LeanCTX Native β€” compressed reads, smart trees, and a value ledger. 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. Available in v0.3.57+.

https://github.com/user-attachments/assets/e7d6a1e9-c912-4e65-a421-bd0256dffa5a


Numbers

OperationMemtraceBest alternativeΞ”
Index 1,500 files1.5s Β· $0Mem0: 31 min Β· $10–50~1,200Γ— faster
Exact symbol query (acc@1, lat)96.6% Β· 0.07 msGitNexus: 97.0% Β· 8.95 ms128Γ— lower latency
Graph callers recall (Django)81.6%GitNexus: 5.3%15.4Γ—
Incremental re-index p9542.5 msCodeGrapher: 613.7 ms14.4Γ—
Hybrid acc@1 (Django, 3K cases)73.9%GitNexus: 38.6%1.91Γ—
PR code-review F1 (50 PRs)0.7268Cubic v2: 0.6077+19.60%
RSS / process26 MBChromaDB: 1,060 MB41Γ— tighter
Languages16+ (Tree-sitter)variesβ€”

Reproducible benchmark suite: benchmarks/. Same machine, same corpora, same adapter contract. Ground truth from Python's ast and pyright LSP β€” never from any tool's own index. No system gets a home-field advantage in the dataset.

Detailed breakdowns: BENCHMARKS-v0.3.22.md Β· BENCHMARKS-v0.3.29.md Β· Code reviewer benchmark


GitHub Star Growth

<a href="https://www.star-history.com/syncable-dev/memtrace-public"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=syncable-dev/memtrace-public&type=date&theme=dark&legend=top-left" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=syncable-dev/memtrace-public&type=date&legend=top-left" /> <img alt="Memtrace GitHub star growth over time" src="https://api.star-history.com/chart?repos=syncable-dev/memtrace-public&type=date&legend=top-left" /> </picture> </a>

Get access

Memtrace is in private beta. We're rolling out access in batches to keep the feedback loop tight β€” every cohort lands in a Discord channel where we ship fixes from real bug reports inside a week.

β†’ Join the waitlist at memtrace.io.

Already have access? npm install -g memtrace and you're indexing in 90 seconds. Full setup below.

πŸ”’ Privacy. Memtrace runs entirely on your machine. Source code never leaves it. The only network traffic is license validation, aggregate node/edge counts, and opt-out crash telemetry β€” no source, no file paths, no symbol names. Full breakdown: PRIVACY.md, TELEMETRY.md. Disable telemetry with MEMTRACE_TELEMETRY=off.


Why Memtrace exists

Good code-intelligence tools already exist. GitNexus and CodeGrapherContext build AST-based graphs that work for "what's in my repo right now."

Memtrace is a bi-temporal episodic structural knowledge graph. It builds on the same AST foundation and adds two dimensions:

  • Temporal memory β€” every symbol carries its full version history. Six scoring algorithms (impact, novelty, recency, directional, compound, overview) let agents ask different temporal questions: "what changed?", "what's unexpected?", "what'll break?".
  • Cross-service API topology β€” Memtrace maps HTTP call graphs between repositories, detecting which services call which endpoints across your architecture.

On top of that, the structural layer is comprehensive:

Symbols are nodesfunctions, classes, interfaces, types, endpoints
Relationships are edgesCALLS, IMPLEMENTS, IMPORTS, EXPORTS, CONTAINS
Community detectionLouvain algorithm identifies architectural modules automatically
Hybrid retrievalTantivy BM25 + vector embeddings + Reciprocal Rank Fusion + cross-encoder rerank
Rust-nativecompiled binary, no Python/JS runtime overhead, sub-8 ms p95 query latency

The agent doesn't just search your code. It remembers it.


Memtrace vs. general memory systems (Mem0, Graphiti)

Mem0 and Graphiti are strong conversational memory engines designed for tracking entity knowledge (e.g. User -> Likes -> Apples). They excel at that. For code intelligence specifically, the tradeoff is that they rely on LLM inference to build their graphs β€” which adds cost and time when processing thousands of source files.

Graphiti processes data through add_episode(), which triggers multiple LLM calls per episode β€” entity extraction, relationship resolution, deduplication. At ~50 episodes/minute (source), ingesting 1,500 code files takes 1–2 hours.

Mem0 processes data through client.add(), which queues async LLM extraction and conflict resolution per memory item (source). Bulk ingestion with infer=True (default) means every file passes through an LLM pipeline. Throughput is bounded by your LLM provider's rate limits.

Both accumulate $10–50+ in API costs for large codebases because every relationship is inferred rather than parsed.

Memtrace takes a different approach: it indexes 1,500 files in 1.2–1.8 seconds for $0.00 β€” no LLM calls, no API costs, no rate limits. Native Tree-sitter AST parsers resolve deterministic symbol references (CALLS, IMPLEMENTS, IMPORTS) locally. The tradeoff is that Memtrace is purpose-built for code β€” it doesn't handle conversational entity memory the way Mem0 and Graphiti do.


25+ MCP tools

Memtrace exposes a full structural toolkit via the Model Context Protocol.

<table> <tr> <td>

Search & Discovery

  • find_code β€” hybrid BM25 + semantic + RRF
  • find_symbol β€” exact / fuzzy with Levenshtein

Relationships

  • analyze_relationships β€” callers, callees, hierarchy, imports
  • get_symbol_context β€” 360Β° view in one call

Impact Analysis

  • get_impact β€” blast radius with risk rating
  • detect_changes β€” diff-to-symbols scope mapping

Code Quality

  • find_dead_code β€” zero-caller detection
  • find_most_complex_functions β€” complexity hotspots
  • calculate_cyclomatic_complexity
  • get_repository_stats
</td> <td>

Temporal Analysis

  • get_evolution β€” 6 scoring modes
  • get_timeline β€” full version history
  • detect_changes β€” diff-based scope

Graph Algorithms

  • find_bridge_symbols β€” betweenness centrality
  • find_central_symbols β€” PageRank / degree
  • list_communities β€” Louvain modules
  • list_processes / get_process_flow

API Topology

  • get_api_topology β€” cross-repo HTTP graph
  • find_api_endpoints
  • find_api_calls

Indexing & Watch

  • index_directory β€” parse, resolve, embed
  • watch_directory β€” live incremental
  • execute_cypher β€” direct graph queries
</td> </tr> </table>

17 agent skills

Memtrace ships skills/guidance that teach agents how to use the graph. They fire automatically based on what you ask β€” no prompt engineering required.

SkillYou say…
memtrace-search"find this function", "where is X defined"
memtrace-relationships"who calls this", "show class hierarchy"
memtrace-evolution"what changed this week", "how did this evolve"
memtrace-impact"what breaks if I change this", "blast radius"
memtrace-quality"find dead code", "complexity hotspots"
memtrace-graph"show me the architecture", "find bottlenecks"
memtrace-api-topology"list API endpoints", "service dependencies"
memtrace-index"index this project", "parse this codebase"
memtrace-cochange"what else changes with this", "hidden coupling"

Plus 8 workflow skills that chain multiple tools with decision logic: memtrace-first, codebase-exploration, change-impact-analysis, incident-investigation, refactoring-guide, continuous-memory, episode-replay, and session-continuity.


Temporal Engine

Six scoring algorithms for different temporal questions:

ModeBest for
compoundGeneral-purpose "what changed?" β€” weighted blend of impact, novelty, recency
impact"What broke?" β€” ranks by blast radius (in_degree^0.7 Γ— (1 + out_degree)^0.3)
novel"What's unexpected?" β€” anomaly detection via surprise scoring
recent"What changed near the incident?" β€” exponential time decay
directional"What was added vs removed?" β€” asymmetric scoring
overviewQuick module-level summary

Uses Structural Significance Budgeting to surface the minimum set of changes covering β‰₯80% of total significance.


Compatibility

Editor / AgentMCP Tools (25+)Skills / GuidanceInstall
Claude Codeβœ…βœ…npm install -g memtrace β€” fully automatic
Claude Desktopβœ…βœ…Automatic β€” shared with Claude Code
Cursor (v2.4+)βœ…βœ…npm install -g memtrace β€” fully automatic
Codex CLIβœ…βœ…npm install -g memtrace β€” fully automatic
Windsurfβœ…βœ…npm install -g memtrace β€” fully automatic
VS Code (Copilot)βœ…βœ…npm install -g memtrace β€” fully automatic
Hermesβœ…βœ…npm install -g memtrace β€” fully automatic
OpenCodeβœ…βœ…npm install -g memtrace β€” fully automatic
Kiroβœ…Steeringnpm install -g memtrace β€” fully automatic
Cline / Roo Codeβœ…β€”Add MCP server manually
Any MCP clientβœ…β€”Add MCP server manually

Skills are workflow prompts that teach the agent how to chain tools. Kiro does not use SKILL.md, so Memtrace writes equivalent auto steering files instead.


Languages

Programming: Rust Β· Go Β· TypeScript Β· JavaScript Β· Python Β· Java Β· C Β· C++ Β· C# Β· Swift Β· Kotlin Β· Ruby Β· PHP Β· Dart Β· Scala Β· Perl Β· Lua β€” full AST: functions, classes, types, calls, complexity.

Infrastructure & config: YAML Β· HCL / Terraform Β· JSON Β· TOML Β· SQL (including PostgreSQL CREATE POLICY for RLS, with cross-language edges from policies to Drizzle / Prisma / TS schema symbols).

Framework-aware scanners on top of the AST layer:

  • Backend HTTP: Express Β· NestJS Β· Encore Β· Fastify Β· Vapor Β· Hummingbird Β· FastAPI Β· Flask Β· Django Β· Gin Β· Chi Β· Echo Β· Actix Β· Lapis Β· Kong Β· OpenResty Β· Rails routes
  • Frontend / client: RTK Query Β· TanStack Query Β· SWR Β· URLSession Β· AsyncHTTPClient Β· axios Β· fetch Β· SwiftUI views
  • CI / infra: GitHub Actions workflows (jobs, steps, needs: edges) Β· Terraform variables / modules / data sources Β· Helm charts Β· K8s manifests
  • Package & dependency graphs: package.json scripts + deps Β· Cargo.toml deps Β· pyproject.toml (best-effort)
  • Database: PostgreSQL RLS policies + triggers + functions, with heuristic edges to ORM schema

Telemetry

Since v0.3.17 Memtrace ships with opt-out telemetry that helps us catch crashes, regressions, and performance issues before someone files an issue.

  • Collected: app-start events, indexing/embedding durations, panic reports, WARN/ERROR log lines from Memtrace's own crates.
  • NOT collected: source code, file contents, symbol names, embeddings, repository names or paths, branch names, commit data.
  • Sanitisation: every payload is run through a sanitiser that strips home-dir paths, token-shaped strings, and email addresses before it touches disk.

Disable with one env var:

Copy & paste β€” that's it
MEMTRACE_TELEMETRY=off memtrace start                    # per-run
export MEMTRACE_TELEMETRY=off                             # permanent (~/.zshrc, ~/.bashrc)

Or in your editor's MCP config: "env": { "MEMTRACE_TELEMETRY": "off" }.

Full breakdown β€” including the on-disk queue layout, where data is stored on the receiving end, and how to inspect what would have shipped β€” is in TELEMETRY.md.


License & ownership

Proprietary EULA. Free to use during private beta and after general availability for individual developers. Indexer + database (MemDB) are closed-source.

Benchmark suite under MIT in benchmarks/ β€” fully reproducible, no proprietary code required to run them.


<p align="center"> <a href="https://memtrace.io">memtrace.io</a> &nbsp;Β·&nbsp; <a href="https://discord.gg/gzedUSNbna">Discord</a> &nbsp;Β·&nbsp; <a href="https://www.npmjs.com/package/memtrace">npm</a> &nbsp;Β·&nbsp; <a href="https://github.com/syncable-dev/memtrace-public/issues">Issues</a> </p> <p align="center"> Built by <a href="https://syncable.dev">Syncable</a> Β· Copenhagen πŸ‡©πŸ‡° </p>

MseeP.ai Security Assessment Badge