Loading...

🚀Join Scale24/6 — Israel’s Exclusive Community for VP R&Ds, CTOs & Engineering Leaders. Apply Now👉

Most developers use AI agents the way they come out of the box — throw files at a context window and hope for the best. Our second YozmaTalk showed a different approach.

Vitalii Chepurko — Senior Software Engineer at OX Security with 16+ years in Python, distributed systems, and cloud — walked us through vc-context, his own side project: a three-tier RAG system built to give AI agents actual knowledge of a codebase instead of context-window guesswork.

What we covered

The session started from the problem that pushed Vitalii to build this in the first place: on large repositories, it’s hard to know whether an agent is really seeing the context it needs or just guessing. Reading every file directly is slow, burns tokens fast, and doesn’t guarantee better answers.

His answer is a pre-built, three-layer index of the codebase: structural (symbols, rows, tests), semantic (embeddings stored in a local database), and an access layer over MCP that lets an agent — Claude, Codex, or others — query that index directly instead of re-reading files every time.

The live demo

The core of the session was a live benchmark on two real repositories (a FastAPI demo and his own vc-context project), comparing how many tokens/bytes an agent burns on direct bash commands versus queries through the MCP context layer. Despite some connection and local-model hiccups, the demo showed a real difference: the “read slice” command (reading just the relevant chunk of a file instead of the whole thing) consistently saved the most tokens, while “find symbol” was sometimes slower than a plain bash command, though more precise.

The key number from Vitalii’s own tracking: roughly 55% token savings on average for one project, and about 1.3 million tokens saved across 1,000 calls over the last 30 days at scale. He was upfront that these are estimates — exact token accounting is hard, and results vary from run to run even on the same project.

Local models — a matter of trust

One thing Vitalii spent real time on: why his semantic search runs on a small local model (Ollama, 137 million parameters) instead of an external API. The main reason is control over your code — if you’re calling someone else’s model over the internet, you don’t really know where your code and tokens end up. A local model is slower, but it gives you confidence nothing is leaking out.

What’s next

Vitalii was candid about the current gaps: automatic framework and file-role detection (auto-mapping), support for more languages (currently Python and Angular), the option to plug in cheaper external models at the top layer, and the fact that the index can go stale and currently needs to be rebuilt manually with a single command.

Key takeaways

  • Letting an agent read files directly isn’t always the fastest or cheapest option — a pre-built index (structural + semantic) can cut token usage significantly
  • A “read slice” command (reading just the needed chunk of a file) saves more tokens than reading the whole file
  • Local models for semantic search are slower, but keep you in control of where your code goes
  • Treat token-savings numbers as estimates — results vary from run to run, even on the same project
  • The codebase index goes stale and currently requires manual reindexing
  • This isn’t a one-of-a-kind tool — Vitalii stressed that anyone can build something similar for their own needs, and invited the audience to try or extend his approach

🎬 Watch the Recording

Free access — takes 30 seconds

    Previous sessions

    chat circle
    whatsapp icon green telegram