inferwire
/
AI·4 min read

Mole: A Terminal Research Agent With a Hard Spending Cap

Mole, an open-source research agent for the terminal, stops at the budget you set, drops claims whose quotes aren't found verbatim in the source, and keeps local data rows off the model.

TL;DR

  • Mole is an open-source research agent for the terminal that enforces a spending cap and discards any claim whose quote isn't verbatim in its source [^1].
  • Its first release, v0.1.0, appeared on August 13 and also lets the tool analyze local files without sending their rows to the model [^2] [^1].

Background

Deep-research agents take a question, run many searches, read the pages they find and write up an answer with citations. Their weak points are cost, since one question can trigger many model calls, and accuracy, since a model can attribute a claim to a page that never made it. Mole, published on GitHub by the user lajosdeme under the Apache-2.0 license, is built around those two problems [^1].

What happened

Mole decomposes a question into sub-questions, searches, reads sources, extracts claims, checks each claim against the text it came from, looks for contradictions between claims and writes an answer with citations [^1]. A planner can replan as evidence arrives, and besides web search there is an academic component that queries Crossref, OpenAlex, arXiv and PubMed [^1]. It ships as two static binaries with no runtime dependencies, stores its data in SQLite and uses your own keys: Tavily or Brave for search, and Anthropic or any OpenAI-compatible endpoint, such as DeepSeek, Ollama, llama.cpp or vLLM, for the model [^1]. Version 0.1.0 was released on August 13 [^2].

The README names three things it does that a chat interface with web search does not [^1]. First, the budget is enforced, not estimated: every model call is reserved against a ledger before it runs and settled afterward, so --usd 0.50 stops the run at fifty cents. A budget is required, in dollars or in tokens, and a locally served model is priced at zero but still counted in tokens [^1]. Second, every claim carries a quote. If the quote doesn't appear verbatim on the page it was taken from, the claim is discarded before it can reach an answer, and claims that later fail a re-read are marked as unsupported in the report rather than silently dropped [^1]. Third, local data stays local. For a CSV file or folder, the model picks a hypothesis template and column names, Mole renders and runs the SQL itself, and only aggregates such as counts, means, test results and buckets covering at least five records go back to the model. The command mole crossings lists exactly what left the machine [^1].

Mole also speaks MCP, the protocol coding agents use to call outside tools. A coding agent can hand it a question, or, in toolkit mode, do the reasoning with its own model while Mole supplies fourteen deterministic tools for searching, fetching, quote checking, claim tracking and the local-data gate [^1]. The README pitches that mode at people already paying for a Claude Code or Qwen Code subscription [^1].

Why it matters

The interesting part is that the README publishes its own scorecard, including the weak numbers. It reports no run exceeding its budget and a verbatim quote for every stored claim, but only 80 percent of claims re-read against their source were confirmed, and contradiction detection had a precision of 70 percent with a confirmation pass and 51 percent without [^1]. That gap is a useful reminder: a quote that appears word for word on a page proves the text is there, not that it supports the claim built on it. Mole's design catches the first problem at extraction and flags the second after the fact [^1].

These are the project's own measurements on its own test corpus, and its merge score of 1.000 is on constructed ground truth [^1]. They have not been checked independently. Still, a cap that the tool enforces in its database schema, rather than an estimate, addresses one of the concrete risks of letting an agent search and read on your account [^1].

Practical example

Say you have a CSV export of your shop's sales and want to know how spending differs between regions, but you don't want the raw file going to a model provider. You register the file with Mole, ask the question with the local-data mode and set a budget of $0.30, as in the README's example [^1]. The model only chooses which comparison to run and on which columns. Mole writes and runs the query on your machine and passes back only aggregates, such as averages, counts and groups covering at least five records [^1]. Afterward, mole crossings shows you exactly what was sent out [^1].

Sources

  1. [1]GitHub — mole/README.md at fcb9237 (lajosdeme/mole)
  2. [2]GitHub — Release v0.1.0 · lajosdeme/mole
  3. [3]Hacker News — Show HN: Mole – Deep research agent for your terminal