Skip to main content

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.

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.

How It Works

When you connect a repository, Kasava runs a four-stage indexing pipeline:
1

File Fetching

Source code is downloaded from GitHub with batched processing for performance.
2

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).
3

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

Storage

Symbols, relationships, embeddings, and the full call graph are stored in PostgreSQL with pgvector for fast retrieval.
Performance:
  • 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:
CategoryLanguages
WebJavaScript, TypeScript, HTML, CSS, SCSS, GraphQL
BackendPython, Java, Go, Ruby, PHP, C#, Kotlin, Scala, Rust, Elixir
SystemsC, C++, Swift, Haskell, Lua
ScriptingShell/Bash, Perl, R
DataSQL, JSON, YAML, XML, Markdown
InfraDockerfile

Triggering Indexing

There are three ways to index a repository:
  1. During onboarding — Repositories linked during setup are indexed automatically.
  2. Manual — Toggle “Index repository” in the repository settings page.
  3. 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
Navigate to Code Search in any Product sidebar to search across your indexed repositories.

Search Strategies

StrategyHow it worksBest for
SymbolicFuzzy matching on extracted symbol namesFinding a specific function or class by name
SemanticVector similarity using Voyage AI embeddingsDescribing what code does in natural language
HybridBoth symbolic + semantic, merged and deduplicatedGeneral-purpose search (default)

Example Queries

QueryWhat it finds
validateTokenDirect 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:
  1. Search symbols to find relevant code for your question
  2. Trace dependencies to understand how components connect
  3. Read definitions to provide accurate, specific answers
  4. Check the call graph to assess impact of proposed changes
This is why indexing your repository unlocks significantly better AI responses — the AI can reference your actual code rather than guessing.

Repository Detail Page

Each connected repository has a detail page at Repositories → [repo name] with tabs:
TabWhat it shows
OverviewQuick stats, recent activity, quick actions
ActivityTimeline of commits and pull requests
Code IntelligenceSymbol explorer, call graphs, dead code, tech debt
SettingsIndexing toggle, branch selection, sync history

Best Practices

Index your main branch first. Kasava indexes the default branch by default. You can configure additional branches in repository settings.
Use natural language for broad searches. “How does authentication work?” finds more relevant results than searching for auth.
Check the call graph before refactoring. The symbol dependency view shows exactly what will be affected by changes.

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