Back to browse
Vexp – Local-first context engine for AI coding agents

Vexp – Local-first context engine for AI coding agents

by nicola_alessi·Feb 23, 2026·1 point·0 comments

AI Analysis

●●●BangerSolve My ProblemBig BrainShip It

Tree-sitter + SQLite graph reduces agent context 74% while staying entirely local.

Strengths
  • Quantified token savings (8.2k → 2.1k on real example) with verifiable methodology, not marketing claims.
  • Session persistence via MCP observations linked to graph nodes—agents don't re-discover architecture every query.
  • Wire-protocol-style approach: agents integrate via standard MCP without code changes or account requirements.
Weaknesses
  • Dependency graph brittleness: staleness detection mentioned but implementation unclear; what happens on refactors?
  • Language coverage not specified—appears TypeScript-focused, limits applicability across polyglot teams.
Target Audience

Developers using Claude Code, Cursor, or other AI coding agents who want to reduce token consumption and improve context relevance.

Similar To

Sourcegraph Cody · Cursor · Continue.dev

Post Description

I built vexp to solve two problems I kept hitting with AI coding agents (Claude Code, Cursor, etc.):

1. Token waste: agents read entire files linearly to understand a codebase. On a medium TypeScript project, a single query was consuming ~18k tokens of context when only ~2.4k were relevant.

2. Session amnesia: every new session starts from zero. The agent re-reads the same files, re-discovers the same architecture, re-traces the same dependencies.

How it works:

- tree-sitter parses the codebase and extracts symbols + relationships into a SQLite dependency graph - When an agent requests context, vexp serves a token-budgeted "capsule" containing only the relevant nodes: the target function, its callers, imported types, cross-file dependencies — not entire files - Session memory: every agent interaction is auto-captured as an observation linked to specific graph nodes. Next session, relevant observations surface automatically via MCP - Staleness detection: when code changes, observations linked to modified symbols are flagged stale. The agent sees "I learned X about this function, but it's changed since then" - Cross-repo: detects API contracts, shared types, and env contracts across multiple repos, all locally via workspace config

Architecture: native Rust binary + SQLite. No cloud, no embedding model, no external dependencies. Talks to agents via MCP (Model Context Protocol) stdio. Currently distributed as a VS Code extension but the MCP server is standalone.

The dependency graph is fully deterministic — AST structural analysis, not vector embeddings. Code relationships are facts (imports, calls, type references), not similarity scores. This means zero hallucination risk in the retrieval layer and trivial staleness detection (you know exactly which nodes changed).

Hybrid search for memory: FTS5 BM25 + TF-IDF cosine similarity + recency decay (7-day half-life) + graph proximity scoring - staleness penalty.

Supports 11 languages, 12+ MCP-compatible agents. Free tier includes context capsules + all session memory tools.

https://vexp.dev

Happy to discuss the architectur; the most interesting design decisions were around the scoring algorithm for pivot node selection and how to link observations to graph nodes without making the staleness detection too aggressive or too lenient.

Similar Projects

AI/ML●●Solid

SoulForge, graph-powered coding agent CLI that runs headless

Four-tier symbol extraction beats reading whole files, but Cursor and Cody already own this space.

Big BrainNiche Gem
proxysoul
302mo ago