Lain

•
9
•

Provides AI coding agents with a persistent, queryable knowledge graph of codebases, enabling deep structural reasoning, change impact analysis, and semantic search.

Lain is a high-performance, persistent code-intelligence server built in Rust. It constructs a comprehensive knowledge graph of your project, detailing code connections, dependencies, and co-change history, augmented by LSP, tree-sitter, and optional semantic embeddings. This intelligent map allows AI coding agents to move beyond single-file reasoning, providing critical insights into blast radius for proposed changes, transitive dependencies, architectural pillars, and contextual build failure explanations. It seamlessly integrates with MCP-compatible AI agents, continually updating its knowledge graph during development via a volatile overlay, ensuring agents always have fresh, accurate project context.

主要功能

01Queryable Code Graph with flexible JSON-based operations for traversal and filtering.
02Architectural Analysis to identify anchors, entry points, abstraction layers, and module structures.
03Semantic Search for finding code based on meaning using local ONNX embedding models.
04Advanced Dependency Intelligence for blast radius analysis, call chain tracing, and co-change coupling.
052 GitHub stars
06Build Integration with error parsing and contextual enrichment for Rust, Go, JS, and Python toolchains.

使用案例

01Empowering AI coding agents with contextual and structural understanding of complex codebases.
02Analyzing code changes for potential impacts and refactoring targets.
03Debugging build and test failures with enriched architectural context.