Skip to main content

TLDRGraph Logo

TLDRGraph 🌐

Sub-10ms Hybrid File Search & Anti-Spaghetti Multi-Flow Code Graphs. ⚡
SQLite FTS5 + Model2Vec Static Retrieval Embeddings + Separate Execution Flow Graphs for Humans & Coding Agents.

PyPI version Documentation Python versions License: MIT


💡 Why TLDRGraph v0.3?

Whole-repo dependency diagrams turn into unreadable spaghetti hairballs the moment a project passes 30 files, while heavy RAG indexers take minutes to embed and flood agent context windows with noisy chunks.

TLDRGraph v0.3 solves both problems from the ground up:

  1. Fast Hybrid File Search (tldrgraph query) — Fuses 4-column weighted SQLite FTS5 BM25 (sub-tokenized CamelCase, snake_case, file paths, and HTTP routes) with Model2Vec (minishlab/potion-retrieval-32M) static retrieval vectors, Reciprocal Rank Fusion (RRF), and 1-hop dependency graph boosting. Indexes 160+ files in <1 second (170× faster than transformer ONNX embeddings) and localizes files in ~1–8 ms.
  2. Separate Flow Graphs Instead of Spaghetti (tldrgraph ui) — Instead of dumping 600 files into one tangled canvas, TLDRGraph isolates each user/system journey into its own 3-to-8 step Layered Flow Graph, paired with Subsystem-scoped Layer Swimlanes (automatically collapsing repetitive clone folders in monorepos) and 1-click file/line navigation (inline code viewer, live /__api/file reader, and vscode://file jump links).
  3. Antigravity-Native Incremental Workflow — Works directly through Antigravity (and other AGENTS.md / .agents/skills coding agents) with zero external API keys: tldrgraph init writes .tldrgraph/agent_brief.json, the agent reads real hub files to curate .tldrgraph/architecture.yaml, and tldrgraph status detects added/modified/removed files instantly via SHA-256 hashes.

📊 SWE-bench Lite & Memory-Recall Benchmark (40 Real GitHub Tasks)

Evaluated on 40 real-world GitHub issues from SWE-bench Lite, measuring ground-truth modified file recall, Mean Reciprocal Rank (MRR), prompt token footprint, query latency, and cold index build time:

Retrieval Method Recall@1 Recall@5 Recall@10 MRR Context Tokens Query Latency Cold Index Time
Aider Repo-Map (AST PageRank) 17.5% 50.0% 72.5% 0.331 ~8,200 2.05 ms —
Mem0 (Memory Vector Store) 42.5% 72.5% 80.0% 0.542 ~12,000 29.14 ms —
Graphify (AST Knowledge Graph) 45.0% 80.0% 82.5% 0.591 ~9,500 1.27 ms —
Codebase-Memory-MCP 50.0% 70.0% 75.0% 0.581 ~14,200 27.21 ms —
PageIndex (Tree-Based ToC) 50.0% 82.5% 85.0% 0.634 ~11,000 1.19 ms —
BM25 Lexical Keyword Search 60.0% 80.0% 85.0% 0.671 ~28,500 19.24 ms —
Chunked Dense Vector RAG 70.0% 95.0% 95.0% 0.797 ~22,400 37.48 ms 104,652 ms
TLDRGraph (FTS5 Zero-Model) 70.0% 95.0% 97.5% 0.792 ~600 2.56 ms 154 ms
TLDRGraph Hybrid (BGE-small + FTS5) 72.5% 95.0% 97.5% 0.831 ~600 31.05 ms 164,035 ms
TLDRGraph Hybrid (Model2Vec + FTS5) 77.5% 95.0% 95.0% 0.836 ~600 8.09 ms 964 ms

🚀 Quickstart

1. Install

pip install tldrgraph

2. Initialize & Build Your Architecture Graph

tldrgraph init .
  • Deterministically parses Python, TypeScript, JavaScript, Go, Rust, and Shell modules.
  • Links cross-file imports, @scope/pkg monorepo aliases, and frontend fetch('/api/...') → backend HTTP route seams.
  • Builds .tldrgraph/search.db (SQLite FTS5 + SHA-256 content-cached Model2Vec slice embeddings).
  • Installs Antigravity skill (.agents/skills/tldrgraph-init/SKILL.md), AGENTS.md, and .tldrgraph/AGENT_CONTRACT.md.
  • Compiles the zero-CDN standalone visualizer at .tldrgraph/TLDRGRAPH_VISUALIZER.html.

Ask Antigravity (or run the tldrgraph-init skill) to curate .tldrgraph/architecture.yaml from .tldrgraph/agent_brief.json and your hub source files, then re-run tldrgraph init ..

3. Localize Files Instantly (tldrgraph query)

tldrgraph query "monthly llm budget quota enforcement"
tldrgraph query "aptitude test grading proctoring" --json

Returns a concise ranked file table (file path, subsystem/layer scope, key symbols/routes, 1-line summary, score) so agents open exact target files immediately instead of running blind grep loops.

4. Explore Multi-Flow Graphs & Navigate to Code (tldrgraph ui)

tldrgraph ui --serve

Opens http://127.0.0.1:8777/ with three focused views:

  1. Flows: Separate step-by-step layered DAGs per feature/journey (LR / TB toggle, keyboard ◀/▶ walkthrough, edge labels, zero cross-flow clutter).
  2. Architecture: High-level System Overview across subsystems + scoped Layer Swimlanes with 1-click upstream caller / downstream dependency spotlighting.
  3. Files & Code: Directory tree, global / or ⌘K search modal, full live source viewer with highlighted symbol line ranges, connected flow pills, and 1-click Open in VS Code / Cursor (vscode://file...).

5. Incremental Drift Detection (tldrgraph status)

tldrgraph status
tldrgraph flows
tldrgraph layers
tldrgraph doctor

tldrgraph status compares live SHA-256 file hashes against .tldrgraph/graph.json in milliseconds, listing exact added_files, modified_files, and removed_files so Antigravity updates only what changed.


📁 Repository State (.tldrgraph/)

File Tracked in Git? Purpose
.tldrgraph/architecture.yaml Yes Human- & Antigravity-editable subsystems, layers, module summaries, and separate Flow Graphs
.tldrgraph/AGENT_CONTRACT.md Yes Schema reference for coding agents
.tldrgraph/graph.json Ignored Compiled graph snapshot with SHA-256 module hashes and enriched line ranges
.tldrgraph/search.db Ignored SQLite FTS5 + SHA-256 cached Model2Vec vector store
.tldrgraph/agent_brief.json Ignored Ranked hub modules, subsystems, and dirty-file handoff for Antigravity
.tldrgraph/TLDRGRAPH_VISUALIZER.html Ignored Zero-CDN standalone interactive multi-flow visualizer

📄 License

Distributed under the MIT License.

Metadata

Release files for tldrgraph 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tldrgraph 0.3.0
File Size Uploaded Provenance Actions
tldrgraph-0.3.0.tar.gz 61.9 kB Without provenance Details for tldrgraph-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tldrgraph 0.3.0
File Interpreter ABI Platform Actions
tldrgraph-0.3.0-py3-none-any.whl Python 3 none any Details for tldrgraph-0.3.0-py3-none-any.whl

Total release size: 124.1 kB

Release files / tldrgraph-0.3.0.tar.gz

Download URL tldrgraph-0.3.0.tar.gz
Size 61.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7596db0ff69470ba979034d04db25c18c4589157ddea8922a7dc8f43fa1a3937
BLAKE2b-256 checksum
How to use checksums
e6a9fc9bf441495bd64931734b0ef4ba7468221094688eccb2873b97be2b7d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tldrgraph-0.3.0-py3-none-any.whl

Download URL tldrgraph-0.3.0-py3-none-any.whl
Size 62.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b6f7c9ffc8591adf62261555d9a2b999a0672ccb7000c1d08d48f2a7f0e2a84
BLAKE2b-256 checksum
How to use checksums
2061a705c2c75d8c553a415c900c13b2c60e3a5a26df25e60bf515e49543ea68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tldrgraph 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page