Kernax
Pricing → For Teams → CLI → Security → Docs → Blog →
Request Beta Access →
Docs / Core AI / AST Context Engine

AST Context Engine

Deep repository comprehension without token bloat. Kernax maps your codebase locally using Tree-sitter Abstract Syntax Trees.

Tree-sitter AST Knowledge Graph

Legacy AI coding tools treat codebases as unstructured plain text files, exhausting context windows and hallucinating syntax errors. Kernax approaches code representation through compiler theory.

Our local engine utilizes Tree-sitter to parse TypeScript, JavaScript, Python, Go, Rust, C++, PHP, and SQL into concrete syntax trees:

@ Context Directives & Popovers

Directly inject relevant codebase context into the agent prompt using interactive @ prefix triggers:

Mention Directive Target & Behavior Example Usage
@Files Fuzzy-search and attach specific project files as structured context pills. @src/controllers/auth.ts Review password hashing
@Codebase Initiates a semantic vector + AST graph search across the entire repository. @Codebase How is billing tiered for enterprise seats?
@Git Attaches current branch name, uncommitted diffs, and staged changes. @Git Generate conventional commit message
@Terminal Injects the last 200 lines of terminal stdout/stderr for rapid debugging. @Terminal Resolve this TypeScript compilation failure
@Docs References pre-indexed framework documentation (e.g. Next.js, FastAPI, Prisma). @Docs Next.js 15 Server Actions best practices
@Web Authorizes the agent to query real-time documentation and release notes. @Web OpenAI Responses API documentation

Drag & Drop Context Pills

You don't need to manually type long file paths. Simply drag any file or directory tab directly from the Kernax File Explorer (or your operating system desktop) and drop it into the Timeline Chat composer.

Kernax automatically transforms the dropped element into a scoped AST context pill, displaying its line count, exported symbols, and file size.

Ignored Paths & Secret Exclusion

Client-Side Hard Filtering: Kernax never transmits credentials, environment secrets, or excluded directories to inference endpoints.

The AST indexing engine automatically detects and hard-blocks the following paths from all agent contexts:

Adaptive Context Compaction & /summarize

During long-running agent refactoring sessions spanning dozens of turns, conversation logs can expand to hundreds of thousands of tokens, degrading model attention and increasing inference costs.

Kernax incorporates an intelligent 2-pass architectural compaction engine:

terminal / chat
/summarize

Typing /summarize compresses intermediate discussion logs while strictly preserving:

This compaction reduces token overhead by up to 70% while maintaining absolute contextual continuity for subsequent turns.

Was this page helpful?
Esc