AI coding agents are drowning in I/O overhead, repeatedly scanning entire repositories to answer simple questions like 'where is this function called?' While standard tools like ripgrep handle single repos fine, they choke when agents manage hundreds of worktrees simultaneously. CorpUnum Labs, an Athens-based team building the OpenUnum runtime, has released unumsearch, an open-source CLI that uses a persistent trigram index to slash search latency.

The Trigram Architecture

unumsearch doesn't just grep; it indexes every three-letter sequence in the codebase, mapping them to file locations. When an agent queries, the system breaks the search string into trigrams, identifies candidate files, and only opens those specific files for verification. This approach ensures accuracy—the final answer always comes from the real file content—while avoiding the full-tree scan. Crucially, the tool respects security boundaries by never indexing sensitive files like .env, *.key, or .ssh directories, regardless of configuration.

Benchmarking Against Ripgrep

The performance gains are significant in multi-checkout environments. In tests conducted on October 9, 2026, unumsearch was benchmarked against ripgrep 15.1 using 20 regex patterns mined from real agent tool calls. Across 258,000 files in 180 worktrees, ripgrep required 4.03 seconds total, while the unumsearch daemon completed the same tasks in 217 milliseconds—an 18.6x speedup. For a single repository of 247,535 files, the daemon averaged 64 ms per query compared to ripgrep's 347 ms.

Staleness and Agent Awareness

A major concern for autonomous agents is data freshness. unumsearch addresses this by marking edited files in the index and searching them directly until the index catches up. Every JSON response includes metadata fields such as fresh, backend, covered, truncated, and complete, allowing agents to decide whether to trust the index or perform a full scan. During a stress test involving a git checkout that rewrote 44,686 Linux kernel files, the index caught up within 7.5 seconds, with zero discrepancies between fresh answers and ripgrep results during the transition.

Where It Loses

The tool isn't a universal win. On small repositories of around 3,700 files, the one-shot CLI mode actually runs slower than ripgrep (12 ms vs 9.8 ms) due to process startup overhead. The speed advantage strictly depends on running unumsearch as a persistent daemon or MCP server. If you're just shelling out once per query on a tiny repo, you won't see the benefit. Additionally, system load impacts all engines, with busy machines causing a 1.7x slowdown across the board.

Key Takeaways

  • unumsearch is written in Rust, licensed under Apache-2.0, and requires no GPU or network dependencies.
  • It achieves an 18.6x speedup over ripgrep in large, multi-worktree environments typical of agent swarms.
  • The tool includes explicit staleness indicators (fresh: false) so agents can self-correct during index updates.
  • Security is baked in: secrets and keys are excluded from indexing to prevent accidental exposure.

The Bottom Line

If your agents are stuck in a loop of re-reading 250k files, unumsearch is the patch you've been waiting for; just remember to run it as a daemon, or you're just burning CPU for nothing.