Kaos AST functions as an intelligent, AST-based semantic code search engine, designed to enhance AI coding agents' understanding of codebases. It achieves this by dynamically scanning target repositories, detecting programming languages, and extracting deeply structured code chunks like functions, classes, and methods using Tree-sitter. By integrating `code_ast`'s advanced parsing with `cocoindex-code`'s embedding and search capabilities, Kaos AST delivers perfectly bounded, semantically complete code snippets, drastically improving the relevance of retrieved context, minimizing hallucinations, and significantly reducing LLM token consumption.
Key Features
01AST-Based Semantic Chunking for precise code slicing
02Dynamic Language Detection for seamless indexing across multiple languages
03Zero-Setup Embedding Engine using `sentence-transformers` for local embeddings
04Built-in MCP Server for integration with Claude Code, Cursor, OpenCode, and VSCode Copilot Chat
050 GitHub stars