by ratel-ai
Context engineering for AI agents. ~80% fewer tokens. Fix tool overload. Skills and memory with in-process BM25 retrieval. No vector DB. No embeddings.
# Add to your Claude Code skills
git clone https://github.com/ratel-ai/ratelLast scanned: 6/30/2026
{
"issues": [
{
"file": "AGENTS.md",
"line": 92,
"type": "prompt-injection",
"message": "Possible concealment directive: \"Don't tell user\"",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-06-30T07:53:53.505Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}ratel is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by ratel-ai. Context engineering for AI agents. ~80% fewer tokens. Fix tool overload. Skills and memory with in-process BM25 retrieval. No vector DB. No embeddings. It has 139 GitHub stars.
Yes. ratel passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/ratel-ai/ratel" and add it to your Claude Code skills directory (see the Installation section above).
ratel is primarily written in TypeScript. It is open-source under ratel-ai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ratel against similar tools.
No comments yet. Be the first to share your thoughts!
Most agents stuff every tool, skill, and memory into the context window each turn — burning tokens, drifting on the long tail. Ratel sits between the agent and its catalog, and resolves only what matters for this turn.
The fastest way to get Ratel into your agent is the Ratel skills suite — five Claude Code / Cursor / Codex skills that integrate Ratel, plan observability, design dashboards, audit your codebase, and analyse live traces.
Install all five:
npx skills add ratel-ai/skills --all
Or paste this into your coding agent — it installs the suite and walks you through a concrete Ratel integration plan:
Run npx skills add ratel-ai/skills --all and use the skills to integrate Ratel in this project.
Want a read on the rest of your agent first? The same suite ships a free, static ratel-assessment — no engagement required. Paste this instead:
Run npx skills add ratel-ai/skills --all and use the skills to assess the agents in this codebase and show me where Ratel would help.
Full skills suite: ratel-ai/skills
This repo is the library. An in-process context engineering platform for AI agents — a catalog, a retrieval engine, and the runtime hooks that decide what ends up in the model's context window on every turn.
ToolCatalog; the model sees the handful that matter for the current turn, not the full list.ratel-ai-core) + TypeScript SDK (@ratel-ai/sdk, NAPI-bound) + Python SDK (ratel-ai, PyO3-bound) + auxiliary CLI (@ratel-ai/cli) for the artifacts the library produces (telemetry today; trace-consolidation server later).See docs/overview.md for the thesis, docs/roadmap.md for what's coming.
Three repos, one story:
| Repo | What it is | |
|---|---|---|
| Library | ratel-ai/ratel (this one) |
The engine. Rust core + TS SDK + auxiliary CLI. Embed it in your agent process. |
| Showcase | ratel-ai/ratel-mcp |
The first canonical product on the library — @ratel-ai/mcp-server exposes any catalog over MCP, with a ratel-mcp CLI that fronts Claude Code / Cursor / ChatGPT and an OAuth-aware gateway for upstream MCP servers. Proof that the library is enough to build a real product on. |
| Proof | ratel-ai/ratel-bench |
The benchmark harness — MetaTool agent campaign, ToolRet retrieval, three Ratel ablation arms across local / OSS / frontier models. The numbers in the table below come from here. |
ToolCatalog returns generic ExecutableTool objects you wrap in a few lines (Vercel AI SDK example shipped in examples/ai-sdk, examples/mcp-chat). Or skip the framework and expose the catalog over MCP.| your situation | Ratel's value today |
|---|---|
| Local model + large catalog | Critical. qwen3.5 at pool=100 goes from 8% → 77% — the baseline collapses, Ratel keeps it working. |
| Open-source cloud + large catalog | Strong win. glm-5.1 at pool=180: +12 pp accuracy, -85% input tokens. |
| Frontier (Sonnet) + large catalog | Cost-driven win. Sonnet 4.6 at pool=180: -82% input tokens, -68% $; -8 pp accuracy (closing). |
| Frontier (Opus) + large catalog | Competitive win. Opus 4.6 pool=180: +8 pp accuracy and -72% tokens (discovery-tool arm). Opus 4.7 pool=180: ≈parity (-1.7 pp) with -81% tokens — Anthropic's own tool-search-tool loses -8 pp on the same setup. |
| Any model + tiny catalog (≤30) | Skip Ratel — pool fits in the prompt cleanly. |
Numbers from the MetaTool agent benchmark — full per-pool breakdown and methodology in ratel-ai/ratel-bench › RESULTS.md. The benchmark harness lives in its own public repo: ratel-ai/ratel-bench.
If you want to embed the library in your own agent or runtime, pick one of these shapes — same Rust core under each:
| Rust library | TypeScript SDK | Python SDK | CLI | |
|---|---|---|---|---|
| For | Rust agents and downstream SDKs | TS / Node agents | Python agents | Inspecting telemetry the library writes; migrating a Claude Code MCP setup into Ratel (transitional) |
| Install | cargo add ratel-ai-core |
pnpm add @ratel-ai/sdk |
pip install ratel-ai |
pnpm add -g @ratel-ai/cli |
| Hero call | ToolRegistry::search |
searchCapabilitiesTool(catalog) |
search_capabilities_tool(catalog) |
ratel inspect |
| Reference | src/core/lib/ | src/sdk/ts/ | src/sdk/python/ | src/integrations/cli/ |
If instead you want to drop Ratel between an MCP host and your existing upstream MCP servers (Claude Code, Cursor, ChatGPT) — the showcase product — use @ratel-ai/mcp-server from ratel-ai/ratel-mcp: npx -y @ratel-ai/mcp-server mcp import.
The Rust HTTP server is on the roadmap, not yet shipped.
TypeScript SDK — embed Ratel in a TS / Node agent
pnpm add @ratel-ai/sdk
import { ToolCatalog, searchCapabilitiesTool, invokeToolTool } from "@ratel-ai/sdk";
const catalog = new ToolCatalog();
catalog.register({
id: "read_file",
name: "read_file",
description: "Read a file from local disk.",
inputSchema: { properties: { path: { type: "string" } } },
outputSchema: { properties: { contents: { type: "string" } } },
execute: async ({ path }) => ({ contents: await fs.readFile(path, "utf8") }),
});
// Hand these two tools to your agent loop.
// The full catalog stays out of the model's context — the agent reaches it via search_capabilities / invoke_tool.
const search = searchCapabilitiesTool(catalog);
const invoke = invokeToolTool(catalog);
Python SDK — embed Ratel in a Python agent
pip install ratel-ai
from ratel_ai import ToolCatalog, ExecutableTool, search_capabilities_tool, invoke_tool_tool
catalog = ToolCatalog()
catalog.register(
ExecutableTool(
id="read_file",
name="read_file",
description="Read a file from local disk.",
input_schema={"properties": {"path": {"type": "string"}}},
output_schema={"properties": {"contents": {"type": "string"}}},
execute=lambda args: {"contents": open(args["path"]).read()},
)
)
# Hand these two tools to your agent loop.
# The full catalog stays out of the model's context — the agent reaches it via search_capabilities / invoke_tool.
search = search_capabilities_tool(catalog)
invoke = invoke_tool_tool(catalog)
Showcase: drop Ratel between Claude Code and your existing MCP servers
For the canonical "Ratel as a