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