Stop paying for tools your agent never calls
Ratel indexes your agent's tools and skills and injects only what each turn needs — BM25 in-process, no vector DB, no infra.

What it does
Ratel is a context-engineering layer for AI agents. Instead of stuffing every tool schema, skill, and instruction into the system prompt up front, it indexes them into a catalog the agent queries per turn. The agent calls search_capabilities, gets only the relevant tools and skills, invokes tools by id, and loads skill playbooks on demand via get_skill_content. Constant grounding (a shop’s address, a brand’s voice) is registered as facts and re-injected only when it’s not already fresh in the transcript.
The interesting bit
The default retrieval is plain BM25 — the same ranking behind most search engines — running in-process over tool names, descriptions, and argument names. No vector database, no embedding service, no infrastructure. Semantic and hybrid ranking are opt-in per catalog or per call, using an in-process model or any OpenAI-compatible embedding endpoint. The boring choice is the point: deterministic, fast, and good enough.
Key highlights
- Cuts token usage and recovers accuracy lost to tool overload; benchmarks at
benchmark.ratel.sh - Rust core (
ratel-ai-core) with NAPI-bound TypeScript and PyO3-bound Python SDKs - Adapters for Vercel AI SDK and Mastra;
ratel-localputs Ratel in front of your MCP setup for coding agents - Dual-licensed: Apache-2.0 for the embeddable engine (explicit patent grant), MIT for everything else
- Progressive disclosure: skill bodies stay out of context until the agent actually loads one
Caveats
- The “~80% fewer tokens” figure lives in the description; the README defers to an external benchmark site rather than showing numbers inline
- Adds an extra hop per turn — the agent must search before it can act, which is a real trade-off for small tool sets
Verdict
If your agent has dozens of tools and skills and a system prompt that grows every sprint, this is worth a look. If you have five tools, the extra indirection probably costs more than it saves.
Frequently asked
- What is ratel-ai/ratel?
- Ratel indexes your agent's tools and skills and injects only what each turn needs — BM25 in-process, no vector DB, no infra.
- Is ratel open source?
- Yes — ratel-ai/ratel is open source, released under the MIT license.
- What language is ratel written in?
- ratel-ai/ratel is primarily written in Rust.
- How popular is ratel?
- ratel-ai/ratel has 502 stars on GitHub.
- Where can I find ratel?
- ratel-ai/ratel is on GitHub at https://github.com/ratel-ai/ratel.