Ratel: retrieve your agent's tools each turn, cut ~80% of input tokens

The project topping Hacker News today swaps full tool catalogs for BM25 retrieval — no vector DB, runs as an MCP server, with one licensing catch.

Nowline JUL 26 3:00 PM banner

Top AI stories from the last hour

Top AI stories from the last hour

Copy markdown

  • Retrieve, don't stuff

    Ratel sits between your agent and its tool catalog and returns only the top-K relevant tools each turn via a deterministic BM25 index, so a 100+ tool setup collapses to roughly 2 tools per turn. You call `search_tools(query)` mid-turn or pre-filter the tools at the start of a message.

  • The numbers it reports

    On the MetaTool benchmark the project reports a local Qwen model jumping from 8% to 77% tool-selection accuracy on a 100-tool catalog, and frontier models cutting input tokens ~82% and cost ~68% with only a minor accuracy tradeoff. Figures are self-reported, so measure against your own catalog.

  • No vector DB, no service

    Retrieval runs entirely in-process: a Rust core (`ratel-ai-core`) does the BM25 indexing, wrapped by a TypeScript SDK — no embeddings, no vector database, and no extra network hop on the retrieval path.

  • Drop in as an MCP server

    `@ratel-ai/mcp-server` exposes your catalog as an MCP server that works with Claude Code, Cursor and ChatGPT, so you can front an existing agent without rewriting it — `pnpm add @ratel-ai/sdk` to start, or `cargo add ratel-ai-core` for Rust.

  • The licensing catch

    Ratel ships under Elastic License 2.0 with an open-source exemption: free for OSI-approved open-source projects, but commercial use needs a paid license — worth checking before you build it into a product.