Introducing Highlights: the context that matters
← All customer stories

How freecode reduced agent costs with Context Highlights

Building a free coding agent

Freecode is a free coding agent that runs in your terminal. Developers can use it to build features, debug errors, run tests, and understand unfamiliar codebases without a subscription or their own API key.

For founder Andrew Schmitz, the priority is maintaining the agent's intelligence while keeping it affordable enough to give developers as much free usage as possible. That makes harness efficiency central to what freecode is building.

freecode building a reading-list app in its terminal interface
Freecode building a reading-list app from a plain-English request in a demonstration session.

Making web research more efficient

Web research was another opportunity to bring costs down. Freecode used free web search APIs, but they came with per-user limits, inconsistent reliability, and results that filled the context window with content irrelevant to the task.

When tools return unnecessary tokens, whether from full page text or highlights that are too long or irrelevant, those tokens stay in the agent's context. For long-running sessions, that makes every subsequent turn less efficient and more expensive.

Andrew tried Context's Highlights API to reduce that overhead. Highlights returns passages relevant to the agent's query, reducing the unnecessary content carried forward from search results and fetched pages.

He benchmarked Context Search and Highlights against freecode's existing search and direct-fetch setup using replays of real sessions that included web search. Across the complete replay workload, averaging 20 model steps per session, input tokens fell 9.8% and modeled LLM costs fell 13.8%.

Including Context's retrieval fees, total modeled LLM and retrieval costs were 8.9% lower. The inference savings covered Context's cost approximately 2.8 times over.

Continuing to push harness efficiency

Within a day of trying Context, freecode had replaced its search and fetch tools in production.

The broader work at freecode is making advanced coding assistance sustainable as a free product. That means continually improving how its harness uses models, tools, and context so developers can take on more demanding work within free usage limits. Web research is one part of that ongoing engineering effort.

Ship an agent that actually knows things.

Free tier, 10-minute integration, and the same API powering agents at Mintlify, daily.dev, and Propane. No credit card to start.