Code Intelligence is Kasava’s core indexing and search system. It parses your repositories to extract symbols, relationships, and meaning — giving the AI deep understanding of your codebase.Documentation Index
Fetch the complete documentation index at: https://kasava.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
When you connect a repository, Kasava runs a four-stage indexing pipeline:AST Parsing
Each file is parsed using tree-sitter to extract symbols (functions, classes, variables), their relationships (imports, calls, inheritance), and metadata (complexity, parameters, decorators).
Embedding Generation
Code is embedded using Voyage AI for semantic search — so you can find code by describing what it does, not just matching keywords.
- Small repos (under 100 files): less than 10 seconds
- Medium repos (1,000 files): under 1 minute
- Large repos (10,000+ files): 2–5 minutes
Language Support
Kasava supports 32+ languages via tree-sitter parsing:| Category | Languages |
|---|---|
| Web | JavaScript, TypeScript, HTML, CSS, SCSS, GraphQL |
| Backend | Python, Java, Go, Ruby, PHP, C#, Kotlin, Scala, Rust, Elixir |
| Systems | C, C++, Swift, Haskell, Lua |
| Scripting | Shell/Bash, Perl, R |
| Data | SQL, JSON, YAML, XML, Markdown |
| Infra | Dockerfile |
Triggering Indexing
There are three ways to index a repository:- During onboarding — Repositories linked during setup are indexed automatically.
- Manual — Toggle “Index repository” in the repository settings page.
- Automatic — Push events via GitHub webhooks trigger incremental updates, processing only changed files.
Incremental indexing on push events only processes changed files, not the entire repository. This keeps updates fast even for large codebases.
What Gets Extracted
For each file, Kasava extracts:- Symbols — Functions, classes, methods, variables, types, interfaces
- Signatures — Full parameter lists, return types, generics
- Relationships — Import/export chains, inheritance hierarchies, interface implementations
- Call graph — Which functions call which, with edge metadata
- Complexity — Cyclomatic and cognitive complexity scores per function
- Metadata — Async/static/visibility modifiers, decorators, line counts
- Comments — TODOs, FIXMEs, HACKs, and docstrings
Code Search
Navigate to Code Search in any Product sidebar to search across your indexed repositories.Search Strategies
| Strategy | How it works | Best for |
|---|---|---|
| Symbolic | Fuzzy matching on extracted symbol names | Finding a specific function or class by name |
| Semantic | Vector similarity using Voyage AI embeddings | Describing what code does in natural language |
| Hybrid | Both symbolic + semantic, merged and deduplicated | General-purpose search (default) |
Example Queries
| Query | What it finds |
|---|---|
validateToken | Direct symbol match on function name |
| ”function that checks if a user is authenticated” | Semantic match — finds auth middleware even if named differently |
| ”database connection pool setup” | Finds connection config, pool initialization, retry logic |
| ”error handling in API routes” | Finds try-catch patterns, error middleware, response formatters |
Search Filters
- Repository — Scope to a specific repo
- Language — Filter by programming language
- Symbol type — Functions, classes, interfaces, etc.
Results
Each result includes:- Source code snippet with syntax highlighting
- File path and line number
- Similarity score
- Symbol type and signature
- Complexity metrics
- Related comments (TODOs, docstrings)
Symbol Explorer
The repository detail page includes a Code Intelligence tab with interactive tools:- Symbol Treemap — Visualize code complexity and test coverage across your codebase
- Call Graph — Explore function call chains and dependencies visually
- File Dependencies — See import relationships between files
- Churn × Complexity — Scatter plot highlighting hotspots (high churn + high complexity = risk)
- Dead Code Detection — Find unused exported symbols with confidence scoring
- Tech Debt — Browse TODO, FIXME, and HACK markers across your codebase
How AI Chat Uses Code Intelligence
When you chat with the AI, it uses Code Intelligence behind the scenes to:- Search symbols to find relevant code for your question
- Trace dependencies to understand how components connect
- Read definitions to provide accurate, specific answers
- Check the call graph to assess impact of proposed changes
Repository Detail Page
Each connected repository has a detail page at Repositories → [repo name] with tabs:| Tab | What it shows |
|---|---|
| Overview | Quick stats, recent activity, quick actions |
| Activity | Timeline of commits and pull requests |
| Code Intelligence | Symbol explorer, call graphs, dead code, tech debt |
| Settings | Indexing toggle, branch selection, sync history |
Best Practices
Related
AI Chat
Ask questions about your indexed code
Products
Connect repositories to your products
Agent Code Impact
AI-powered impact analysis
Agent Code Health
Automated code quality insights