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.1

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.1
File Size Uploaded Provenance Actions
tldrgraph-0.3.1.tar.gz 67.3 kB Without provenance Details for tldrgraph-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 135.0 kB

Release files / tldrgraph-0.3.1.tar.gz

Download URL tldrgraph-0.3.1.tar.gz
Size 67.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9ff7e1ef3c96e0846aedcacd3a666796db779e2179e146697e552a671cbe9e9d
BLAKE2b-256 checksum
How to use checksums
8c90410ec3edd5ad78f3b5b626ae0547011155d0dd1858cba2f07171fe2c1033
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.1-py3-none-any.whl

Download URL tldrgraph-0.3.1-py3-none-any.whl
Size 67.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b23479e9bb4144e2e7544956e177af1f83a35bb62538fb8601e8098d8a587a7
BLAKE2b-256 checksum
How to use checksums
e21286c19e226b63e802d717b9f2396b403be07f903898341705559f275855b2
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.1

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