Context Compiler
WORKS IN YOUR AGENT · RUNS OFFLINE · NO KEY TO COMPILE
Same answer. About 3% of the tokens.
Give it a file, a question, and a token budget. It returns the useful parts as markdown, and a clear list of what it left out.
OpenAI × NamasteDev Codex Hackathon · July 2026 · solo build
One real handbook · one refunds question
Whole file
20,364 tokens
Compiled
591 tokens
97% fewer tokens
Same facts. Every read.
Checked with tests, a recall eval, and live runs
THE HABIT
Agents pay to read pages they don’t need
01
Whole-file habit
Agents often load an entire document to answer one question. Every time.
02
Most of it is unused
The useful clause might be 2 pages of 100. The other 98 are pure token spend.
03
It adds up fast
Every file × every question × every agent × every day. Cost and latency climb together.
$61 → $2
per 1,000 reads of one 100-page document (at $3 per million input tokens; demo cost meter default)
~95%
of file tokens often unused for a single task, across pdf, docx, xlsx, pptx, and images
FIT
Who it’s for, and where it fits
Plain version: who needs this, why we built it, what’s different, and how it sits next to converters.
Who
People building coding and document agents. Cursor, Claude Code, Codex, and internal agent platforms.
Why it exists
Whole-file reads are getting expensive. Agents keep reopening the same manuals and reports for different questions.
What’s different
One job. Pick what the agent needs under a token budget. Not a full search platform.
Where it fits
Converters turn a file into text of the whole thing. We select under a budget and tell you what was left out, so you can pull more if needed.
PIPELINE
File in. Useful parts out. Under your budget.
You set the ceiling. The agent gets markdown it can read, plus a list of skipped sections.
1
Convert
Turn the file into markdown. Cache by content so repeats are cheap.
2
Split
Break on headings. Keep tables whole.
3
Rank
Match sections to the question on your machine. No model call to compile.
4
Pack
Fill the strongest sections first until the question is covered, then stop.
Plug in, or try it here
Works with Cursor, Claude Code, Codex, and Claude Desktop. Or use the hosted web demo. Compile needs no API key.
Honest about cuts
Every result lists what was left out. Open a skipped section when you need more of a chapter. Nothing is trimmed in silence.
DEMO EVIDENCE
What you actually get back
Real 78-section handbook. One refunds question. Budget 1,200 tokens.
97%
fewer tokens, answer still intact
20,364 → 591
~34×
cheaper per read when conversion is cached; repeats come back fast
Check it
Same question from the full file and from the compiled slice. Compare the facts yourself.
Story: vendor handbook · “How long do refunds take and who approves large ones?” · budget 1,200
Whole file: 20,364 tokens
Compiled: 591 tokens · answer intact · list of skipped sections included
ROADMAP
What’s next
01
Clearer paraphrase matching
Local embeddings next. Query cleanup and offline recall eval already shipped.
02
Whole folders, not one file
Compile across a folder. Shared conversion cache for teams.
03
Video and audio
Transcribe into the same pipeline.
04
One-command install
Quick setup for any agent client that speaks the same protocol.
Try it live
context-compiler.onrender.com
github.com/shenba1712/context-compiler
Open the demo, or wire it into Cursor, Claude Code, or Codex. Check the answer on a real doc.
Stop paying for pages your agent doesn’t read.