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.
Install
pip install ratel-aiInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Ratel Your AI agent is paying for tools it never uses. Ratel fixes that.
Docs •
Skills •
Discord
Introduction
The context engineering layer for AI agents. Selects only the tools and skills relevant to each turn, recovering accuracy lost to tool overload and cutting what you pay per call. No vector DB, no infra.
Why
- Cost: Every tool schema, every skill, and a growing list of instructions in the system prompt are tokens you pay for on every call. Send them all up front and you pay for them all, every turn.
- Accuracy: Models get worse as that context grows. Crowd it with tools, skills, and instructions a turn doesn't need and the model picks the wrong option and drifts off task.
- Ratel fixes both: it indexes your tools and skills into a catalog the agent progressively discloses, searching for what each turn needs and injecting only the matching capabilities instead of loading everything up front. Constant grounding your agent always needs — a shop's address, a brand's voice — is registered as facts and pushed into context, re-injected only when it isn't already fresh in the transcript.
Across local, open-source, and frontier model setups, Ratel cuts token usage and recovers accuracy lost to tool overload, with no vector DB required. Full results: benchmark.ratel.sh
Quickstart
Guides: Quickstart · TypeScript SDK · Python SDK
Examples: Vercel AI SDK · Pydantic AI
Typescript
Install the SDK first:
pnpm add @ratel-ai/sdk
Then create and use your Catalogs:
import { readFile } from "node:fs/promises";
import {
SkillCatalog,
ToolCatalog,
getSkillContentTool,
invokeToolTool,
searchCapabilitiesTool,
} from "@ratel-ai/sdk";
const catalog = new ToolCatalog();
catalog.register({
id: "read_file",
name: "read_file",
description: "Read a file from local disk.",
inputSchema: { type: "object", properties: { path: { type: "string" } } },
outputSchema: { type: "object", properties: { contents: { type: "string" } } },
execute: async ({ path }) => ({ contents: await readFile(path, "utf8") }),
});
const skills = new SkillCatalog();
skills.register({
id: "inspect-local-file",
name: "inspect-local-file",
description: "Inspect a local file before answering questions about it.",
tools: ["read_file"],
body: "Read the requested file, then ground your answer in its contents.",
});
// use the following as tools in your agent framework
const search = searchCapabilitiesTool(catalog, skills);
const invoke = invokeToolTool(catalog);
const loadSkill = getSkillContentTool(skills);
Python
Install the SDK first:
pip install ratel-ai
Then create and use your Catalogs:
from ratel_ai import (
ExecutableTool,
Skill,
SkillCatalog,
ToolCatalog,
get_skill_content_tool,
invoke_tool_tool,
search_capabilities_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"}}},
execute=lambda args: {"contents": open(args["path"]).read()},
))
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…