This is an early release preview. You may encounter bugs.
Ratel logo
Unclaimed

Tool memory inference

Ratel

Context engineering for agents: in-process BM25 + semantic retrieval over tools, skills and memory with progressive disclosure, no vector DB.

A 80/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What Ratel is.

Ratel is a context-engineering layer that decides which tools and skills an agent sees on each turn. Instead of sending every tool schema, skill, and instruction in the system prompt on every call, it indexes them into a catalogue the agent discloses progressively: the agent calls search_capabilities, and only the matching capabilities are injected. Constant grounding that an agent always needs is registered separately as facts and pushed into context, re-injected only when it is not already fresh in the transcript.

Tools and skills are indexed separately and searched separately. Ranking is BM25 by default over schema-aware tool metadata and over skill names, descriptions, and tags, which keeps retrieval fast and deterministic; semantic and hybrid ranking are opt-in per catalogue or per call, embedding either with an in-process model or through an OpenAI-compatible embedding endpoint. Tools are invoked by id, and a skill's instructions stay out of context until the agent loads that playbook with getskillcontent. No vector database is involved.

The retrieval engine is written in Rust and bound into a TypeScript SDK through NAPI and a Python SDK through PyO3, with adapters for the AI SDK and Mastra, OpenTelemetry conventions and helper packages, and a wire contract for catalogue sources. Two companion projects extend it: a local distribution that sits in front of an MCP setup for coding agents, and the benchmark harness behind the project's published results.

Features

  • Progressive disclosure: the agent searches a catalogue per turn and receives only the tools and skills that turn needs
  • Separate tool and skill indexes: focused results from each, with skill bodies loaded only on demand
  • BM25 by default: deterministic lexical ranking over schema-aware metadata, with opt-in semantic and hybrid ranking
  • No vector database: indexes run in process, embedding locally or against an OpenAI-compatible endpoint
  • Facts: constant grounding registered once and re-injected only when it is not already in the transcript
  • Rust core with language bindings: TypeScript and Python SDKs over one engine
  • Framework adapters: packages for the AI SDK and Mastra, plus end-to-end examples
  • Telemetry: OpenTelemetry conventions and helper packages for the retrieval path

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

03 / Build

Build with Ratel.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Ratel →

Browse the catalogue