What is a context engine?
A context engine is the layer between an AI agent and its source material. It indexes the codebase, retrieves only the pieces relevant to the current task, and assembles them into the model's context window — so the agent works from exact snippets instead of whole files. The practice of managing this is often called context engineering.
Why coding agents need one
Every agent runs on a context budget. The model reasons over what you put in the prompt, and nothing else — so a wrong retrieval step becomes a wrong answer, no matter how capable the model is. The default strategy in most coding tools is to read files: open the file the user mentioned, paste what's inside, repeat. That works until it doesn't.
Grep-style search matches text, not intent. An agent asked to fix token refresh will find every file that contains the word "token" before it finds TokenManager.refresh(). It opens file after file, burns thousands of tokens, and still guesses at which callers matter. The bigger the repo, the worse the ratio of reading to answering gets.
How a context engine works: index, retrieve, assemble
1. Index
The engine parses the repository once and builds a map of it: symbols and definitions via tree-sitter, embeddings for every chunk, and a graph of call edges from imports and framework conventions. Indexing is incremental — a file watcher re-embeds only what changed, so the map stays fresh without re-reading the repo.
2. Retrieve
A query arrives in natural language ("where is token refresh handled?"). The engine embeds it, finds the closest chunks by meaning — not by matching names — and then expands through the call graph, breadth-first, to the callers and callees that give the hit its context. Field filters like kind:function, lang:rust, or path:src/api narrow the search when the agent already knows what it wants.
3. Assemble
Finally, the engine decides what actually goes into the prompt. Not the whole file — just path#L142-178, with numbered lines and the names of the callers. The model gets the function it needs, the evidence around it, and nothing else. This is where the token savings come from, and it's why retrieval quality matters more than context-window size.
Context engine vs. RAG vs. code search
The terms overlap, but they describe different layers. Search finds; RAG is a pattern; a context engine is the part that decides what the model sees.
| Approach | What it does | What it misses |
|---|---|---|
| Lexical search (grep) | Matches exact text or regex. Fast and predictable. | Synonyms, renames, intent. Finds "token" everywhere and refresh() nowhere. |
| RAG | Retrieves chunks from any corpus to ground generation. | Usually text chunks with no code structure — no symbols, callers, or exact line ranges. |
| Context engine | Retrieval plus structure plus assembly, tuned to a medium. For code: embeddings + call graph + minimal snippets. | Nothing by definition — but quality depends on index coverage and ranking. |
What makes a good code context engine
- Precision over volume. It returns line ranges, not whole files. The unit of context is the snippet.
- Structure-aware. Symbols, imports, and call graphs — because code's meaning lives in its relationships, not only its text.
- Semantic, not literal. It finds code by what it does, then lets you narrow with exact filters when you need them.
- Fast and incremental. Index once; re-index only what changed; answer in milliseconds when the agent asks.
- Client-agnostic. It speaks MCP (or an open API), so any agent or editor can use it without per-tool integrations.
- Measurable savings. It can show the token count of what it returned against the naive read-the-files baseline.
Finder is a context engine for coding agents
Finder implements the loop above for real repositories: embeddings for meaning, a resolved call graph for structure, and snippet assembly for a small context payload. Agents connect over MCP and get back path#Lstart-end with numbered lines and caller names.
finder— semantic search with call-graph expansion, returning an evidence-graded context pack withfile:linecitations.file-finder— the exact line range inside one known file.contextandimpact— callers, callees, tests and blast radius for a known symbol, from the local graph.- Symbols and call edges for 21 languages, plus any text file via embeddings.
- Incremental, crash-safe indexing — and nothing is indexed until you approve that exact folder.
- One-click setup for 15 harnesses: Claude Code, Codex, Cursor, VS Code, Gemini CLI, Opencode, Windsurf, Kiro, Cline, Roo Code, Zed and more.
Frequently asked questions
What is a context engine in simple terms?
Is a context engine the same as RAG?
Do I need a context engine if my model has a huge context window?
How does Finder work as a context engine?
Which AI tools work with Finder?
Put the right code in your agent's context
One command installs Finder and wires it into your harness. Start with 40 free credits.