Skip to content
Breaking:

Open-Source Terminal Agent 'Mole' Launches to Automate Deep Research with Hard Budget Caps

The command-line tool enforces strict cost limits, checks quotes against source text, and keeps local data raw rows away from external models.

By The Company Wire3 min read
Share
Mole — Open-Source Terminal Agent 'Mole' Launches to Automate Deep Research with Hard Budget Caps
Mole — Open-Source Terminal Agent 'Mole' Launches to Automate Deep Research with Hard Budget Caps. Photo: web.

A new open-source command-line tool named Mole has been released to automate complex research workflows directly within terminal environments while enforcing strict budget and privacy constraints. As first reported on Hacker News, the software functions as a self-contained static binary that breaks user queries into targeted sub-tasks, searches external sources, verifies extracted claims against source material, and compiles cited summaries.

A central feature of the tool is its approach to financial cost control during automated multi-step research runs. Rather than relying on post-hoc estimates, Mole reserves funds for every model API request prior to execution and settles the transaction afterward using a database ledger built with non-negative constraints. Users can specify fixed financial limits, such as a fifty-cent maximum budget, or set token caps for local models, with testing across the project's corpus registering zero cost overshoot.

The software also incorporates automated verification routines to prevent hallucinations and ungrounded statements. During content extraction, the agent isolates individual claims and verifies that each is accompanied by a verbatim quote from the original source text. Claims lacking direct textual support are discarded during extraction, while claims that fail subsequent validation are flagged in the final report rather than silently removed.

To handle confidential or internal datasets safely, Mole includes a privacy boundary designed for local files in CSV, TSV, JSON, and JSONL formats. When processing local datasets, the external language model selects query templates and column names, while Mole renders and executes the SQL queries locally on the user's machine. Only aggregated metrics, such as counts, arithmetic means, and grouping buckets that span at least five records, are returned to the model.

Mole is designed to work with any OpenAI-compatible API endpoint, supporting self-hosted instances like Ollama, llama.cpp, and vLLM alongside third-party provider models such as DeepSeek. API keys are stored in a restricted configuration file rather than environment variables to prevent accidental exposure in system process listings.

The tool supports the Model Context Protocol (MCP) and offers a modular toolkit mode for integration into external development workflows. In this configuration, coding agents such as Claude Code or Qwen Code manage high-level reasoning, while Mole handles deterministic operations including quote validation, source merging, and local SQL execution over a private Unix socket connection.

Built in Go with CGO disabled, Mole relies on SQLite for persistent data storage under standard system directories and requires no external runtime dependencies. The project includes automated evaluation features to grade research sessions and requires code contributors to sign a Contributor License Agreement while adhering to test-falsification standards.

Sources

  1. Hacker News

Company: Mole

Written by

The Company Wire

Newsroom · San Francisco

Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.