ratel logo

ratel

Context engineering for AI agents. ~80% fewer tokens. Fix tool overload. Skills and memory with in-process BM25 and semantic retrieval. Progressive Disclosure. No vector DB.

npmpypiratel-ai-corediscord
Website GitHub

What is it?

What it is

A context engineering layer for AI agents that selects only relevant tools and skills for each turn.

Why it exists

To reduce costs by minimizing token usage from unnecessary tool schemas and instructions, and to improve accuracy by preventing model drift caused by tool overload.

Who should use it

AI agent developersLLM application engineersDevelopers building complex tool-calling agentsEngineers looking to reduce LLM token costsDevelopers experiencing model drift due to large context windows

Who should avoid it

Developers with very simple agents that only use 1-2 toolsUsers who require a managed vector database solution

How it works

A quick walkthrough in plain English

How ratel works

Step 1 of 3

You interact with it

Open ratel, send a request, or connect it to your stack.

Features

Accuracy
Agents
Claude Skills
Context
Harness
Llm

Advantages

  • Open source (MIT)
  • Active Rust ecosystem
  • Self-hosted deployment options

Disadvantages

  • Requires operational ownership for self-hosted setups
  • Community support varies by project maturity

Installation

native

TypeScript: pnpm add @ratel-ai/sdk
Python: pip install ratel-ai

FAQ

How does Ratel reduce costs for AI agents?

Ratel selectively discloses only the tools and skills relevant to each turn, avoiding the cost of sending all tool schemas, skills, and instructions upfront on every call.

What retrieval method does Ratel use for tool/skill selection?

Ratel uses the BM25 algorithm, a search engine-grade method, to efficiently and deterministically retrieve relevant tools and skills based on metadata and descriptions.

How does Ratel improve model accuracy?

By filtering out irrelevant tools and skills per turn, Ratel prevents context bloat and model drift, ensuring the agent focuses on task-critical capabilities.

Which programming languages does the Ratel SDK support?

The SDK supports TypeScript and Python, with examples and documentation provided for both in the repository.

Is a vector database required for Ratel's functionality?

No, Ratel operates without a vector database, relying on BM25 for retrieval and avoiding the overhead of vector indexing.

How are skill instructions incorporated into the agent's context?

Skill instructions are loaded dynamically via the `get_skill_content` tool only when relevant to a specific turn, keeping context lean and task-focused.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for ratel

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
ratel | MushyBook