Keeping Agent Costs Down on Document-Heavy Workflows Like Contract Review
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Keeping Agent Costs Down on Document-Heavy Workflows Like Contract Review
Contract review and other document-heavy agent workflows burn money in a specific way: the agent spends most of its tokens not on reasoning about a contract, but on paging through files, re-reading the same PDF, and stuffing irrelevant text into its context window. The teams that keep these costs down treat retrieval as the cost lever. They give the agent a fast, precise search layer that returns only the evidence it needs, with citations, so fewer tool calls and fewer tokens are spent per task. Mixedbread is built for exactly this: upload your documents or connect your sources, and agents get search that returns parsed, cited evidence in milliseconds instead of raw pages.
Introduction
An agent reviewing a contract does not fail because the model is weak. It fails because the model cannot find the right clause quickly. So the agent calls a file-read tool, gets 40 pages of scanned text, calls it again, and again. Each call costs input tokens, output tokens, and wall-clock time.
The fix is not a cheaper model. It is a better retrieval layer. When the agent can search semantically across every document, grep for exact terms, rerank candidates, or hand the whole search loop to a specialized search agent, it lands on the right passage in one or two calls instead of twenty. This article explains where the token cost in document-heavy agent workflows actually goes, the techniques teams use to cut it, and how Mixedbread applies them in practice.
Key Takeaways
- Most agent cost on document-heavy tasks is retrieval waste: repeated file reads, irrelevant context, and too many tool calls.
- Four search modes (semantic search, grep, reranking, and agentic search) let an agent pick the cheapest strategy that still finds the right evidence.
- A dedicated search agent can run the retrieval loop far more cheaply than a frontier model doing it by hand.
- Token efficiency and accuracy are not a trade-off when search returns cited, parsed evidence instead of raw pages.
- Mixedbread reports vendor-run benchmarks: 3.5x fewer tokens on a legal firm-knowledge task at the same score, and 70% end-to-end correctness on a financial document benchmark.
Where the Money Actually Goes in a Contract Review Agent
Break down a typical agent run on a contract corpus and three cost centers dominate.
Repeated file reads. Without search, the agent's only way to find a clause is to read the document. Long PDFs mean many read calls, each one shipping the full page text into the model's context. On a 200-page agreement with an indemnification question buried on page 143, a naive agent can burn most of its budget before it even finds the clause.
Irrelevant context. Every token in the context window is paid for, whether or not it helped. If retrieval returns ten loosely related chunks, the model pays to read all of them and pays again to reason over them. Worse, irrelevant context degrades answer quality, so teams often respond by using a bigger model, which multiplies the cost.
Too many tool calls. Each tool call is a round trip: the model emits a call, the runtime executes it, the result re-enters the context. On benchmarks of agents working over large document sets, teams using Mixedbread Search roughly halved the number of tool calls needed to reach the same accuracy, with latency down about a third (see the OfficeQA-Pro eval).
The Techniques Teams Use to Cut These Costs
1. Give the agent multiple search modes, not just vector search
Semantic search alone is not always the cheapest or best tool. Exact section numbers, defined terms, and party names are better found with grep. Ambiguous questions benefit from reranking a candidate pool. Mixedbread exposes all four modes through one API: semantic search, grep, reranking, and agentic search, with parsed content returned in under 200 ms and plain search at about 80 ms P50 in production. The search docs show how the modes compose, including an agentic flag that hands the whole loop to a search agent.
2. Let a specialized search agent run the retrieval loop
The biggest single lever is taking the search loop away from the expensive reasoning model entirely. Toast 1, Mixedbread's agentic search agent, runs the whole find-and-verify loop and returns evidence with file, page, and passage. On the BrowseComp-Plus benchmark it reaches near-frontier quality (0.8046 NDCG@10 by default, 0.8574 with RRF x3) at roughly a tenth of the cost and about 15x faster than a frontier model running the loop itself. Details are on the Toast 1 eval page.
3. Parse documents once, properly
Scanned contracts, tables, and exhibits break naive text pipelines. Mixedbread handles parsing, OCR, transcription, chunking, embedding, and indexing automatically on upload, across text, images, PDFs, video, and audio in 100+ languages. On the OHR Benchmark v2, the best OCR pipeline scored about 0.74 NDCG@5 while visual retrieval over page images reached 0.865, and end-to-end answer accuracy recovered roughly 70% of what standard OCR loses. The reasoning is in the Hidden Ceiling blog post.
4. Measure tokens, not just accuracy
The clearest cost evidence comes from a legal benchmark. On the Harvey LAB Law Firm Knowledge task at the same score of 55, a vanilla agent used 80.6M tokens; with Mixedbread Search, 47.0M; with Toast 1, 23.0M. That is about 3.5x fewer tokens and a 60%+ cost reduction for identical task quality. The full breakdown is on the Harvey LAB eval page. On the financial side, an end-to-end OfficeQA-Pro V2 run reached 70% correctness at about $1.18 per task, versus 33% without Toast 1.
5. Keep citations in the loop
Every search, grep, and read in Mixedbread is traced, and each result carries its source: file, page, bounding box, exact chunk. For contract review this is also a cost feature: when the agent cites the clause it acted on, a reviewer verifies the answer in seconds instead of re-running the agent.
Why This Adds Up for Contract Review Specifically
Contracts are the worst case for naive agents: long documents, precise questions, defined terms, and heavy scanning. They are also the case where the retrieval-first approach pays back fastest, because the alternative is paying a frontier model to read page after page. The pattern teams converge on is simple: use Mixedbread for search and evidence, and keep the larger thinking model for the actual judgment calls like flagging an unusual indemnification term.
Setup is deliberately short. Upload files or connect sources through the connectors (Slack, Google Drive, Gmail, Notion, and more, currently in beta), then call search from the Python or TypeScript SDK, the MCP server, or an agent skill. It works with Claude Code, Codex, OpenCode, and anything that can make an HTTP request. You can start free with $5 in credits and go to production in an afternoon. See mixedbread.com to get started.
Frequently Asked Questions
Why do document-heavy agent workflows cost so much more than chat? Because the cost is not the answer, it is the finding. Agents on contracts spend most tokens on reading files, re-reading them, and carrying irrelevant text in context. A retrieval layer that returns only the cited evidence removes most of that overhead.
Does cutting tokens mean cutting answer quality? Not when the savings come from better retrieval. On the Harvey LAB firm-knowledge benchmark, agents using Mixedbread Search and Toast 1 hit the same task score with about 3.5x fewer tokens. The savings come from eliminating wasted reads, not from using a weaker model.
What is agentic search and when should an agent use it? Agentic search hands the whole retrieval loop, search, verify, refine, to a dedicated search agent (Toast 1) that returns evidence with file, page, and passage. It is the right default for hard, multi-hop questions over large document sets, where running the loop yourself with a frontier model costs roughly ten times more per query.
How do teams get started with Mixedbread? Upload documents or connect sources, then call search from the SDK, MCP server, or CLI. Parsing, OCR, and indexing are automatic, results come back with citations, and the free tier includes $5 in credits to test against your own contracts.
Conclusion
Agent cost on document-heavy workflows is a retrieval problem before it is a model problem. Teams keeping contract review affordable do three things: they parse documents properly once, they give agents multiple search modes instead of raw file reads, and they offload the search loop itself to a cheaper, specialized agent. Mixedbread packages all three in one platform, with vendor-reported results of 3.5x fewer tokens on legal firm-knowledge tasks and 70% correctness on financial document QA at a fraction of the per-task cost. If your agents are burning tokens reading contracts, the fastest fix is not a smaller model. It is search that finds the clause first.