Ratel: Dynamic Tool Control for Agents

jack1689 · hn · 2026-07-17

Ratel is a library for agents designed to let them retain a complete inventory of tools and skills while dynamically exposing only the few tools actually needed in any given turn. This helps reduce context bloat, hallucinations, and high token costs.

The author notes it is already being used in production: after dynamically loading 300+ tools into the context, one team used Ratel to cut token costs by up to 81% in the first month without sacrificing accuracy. It supports keyword and semantic retrieval, runs purely in-process without extra infrastructure, is framework-agnostic, offers TypeScript and Python versions, and exposes OpenTelemetry metrics.

Original post →

More from coding & agent

coding & agent channel →