Solution: docs research
Docs and API research: the agent keeps the part it needs
When your agent reads a docs page, a web page or a browser snapshot, Context Mode Engine puts the page in a local index and the agent reads the sections that answer the question. A fetch of the 265 KB Vite features guide reached the model as 0.4 KB.
Free · Local · Private · Forever
Context Mode Engine is source-available under the Elastic License 2.0. Free to use, for all time. It runs on your machine and keeps your data in ~/.context-mode.
Key facts
- What it is
- A solution for research work with Context Mode Engine: framework docs, API references, upgrade guides and browser pages.
- Who it is for
- Developers who ask an agent to learn an API, follow an upgrade guide or compare two libraries before they write code.
- Agents
- The Engine works in ten agents: Claude Code, Codex, Gemini CLI, Qwen Code, Copilot CLI, VS Code, Kiro, ZCode, OpenCode and Pi.
- Measured result
- A 265.4 KB docs page reached the model as 0.4 KB, and a 133.3 KB browser snapshot as 0.5 KB. Plugin benchmark of 2026-11-01, median of 5 runs, raw table.
- Scope
- Tool output in the agent where you install the Engine. Bytes that reach the model, per tool output.
The job
You move a project to a new framework release. The agent has to read the upgrade guide, the API reference and two blog posts, then change the code. Each page holds navigation, examples for other setups and long tables. The agent needs a few sections from each.
With Context Mode Engine, the hook sends each large fetch to the local index. The agent asks ctx_search for the sections it needs and reads those. The pages stay in the index for the rest of the session, so a second question costs one search.
What reached the model
| Tool output | Raw output | Reached the model |
|---|---|---|
WebFetch of the Vite features guide (the hook sends it to ctx_index and ctx_search) | 265.4 KB | 0.4 KB |
Browser snapshot (take_snapshot, the Wikipedia SQLite page) | 133.3 KB | 0.5 KB |
Read of the 89 KB Vite config source (the hook sends it to ctx_execute) | 89.2 KB | 0.4 KB |
Library docs (query-docs, Vite build and proxy config) | 6.8 KB | 0.5 KB |
Plugin benchmark of 2026-11-01 on an Apple M1 Pro, default settings, median of 5 runs. Raw data: the result tables and the same file on GitHub. Rerun it with the steps on Benchmarks.
Large pages show the largest change. A short docs answer of 6.8 KB still came to 0.5 KB, and the agent can read more of it with one search.
How it works
- The PreToolUse hook sees a large WebFetch or Read and sends it to the sandbox.
- The page goes into a SQLite FTS5 index (SQLite full-text search) in
~/.context-mode, one database per project. - The agent calls
ctx_searchwith its question and reads the best sections, with their source.
Read more on Search and index and How it works.
Prompts to give your agent
Read the Vite docs on build options and the dev server proxy. Write the proxy setup for an API that runs on port 8080, and cite the section you used.
Read the React 19 upgrade guide. List each change that touches this repo, with the file to edit, then make the changes.
Compare the Stripe and Paddle webhook docs. Write a handler for each that checks the signature, and list what differs.