# Ratel > Ratel is the context engine for AI agents. It keeps every tool, MCP server, and skill definition out of the prompt and retrieves only what each turn needs, so agents stay leaner, more accurate, and easier to debug. Open source: an Apache-2.0 Rust engine with MIT-licensed TypeScript and Python SDKs, running in-process with no vector database, no API key, and no extra service. Context engineering is the practice of deciding what belongs in a model's context window on each turn. As an agent accumulates tools, skills, and history, its context bloats: accuracy drops, token bills grow with every integration, and behaviour becomes hard to debug. This failure mode is often called "context rot". Ratel fixes it with progressive disclosure. All capabilities live in one searchable catalog. On each turn the model sees only the top-ranked tools plus three capability tools (`search_capabilities`, `invoke_tool`, `get_skill_content`), no matter how large the catalog grows. Ranking uses deterministic, in-process BM25 keyword search by default, with semantic and hybrid retrieval as an opt-in. Ratel ships in three forms: - **Ratel SDK**: `@ratel-ai/sdk` for TypeScript and `ratel-ai` for Python, over one Rust core (`ratel-ai-core`). Integrations for the Vercel AI SDK, Mastra, and Pydantic AI. - **Ratel Local**: an MCP gateway that puts capability search in front of the MCP servers used by Claude Code, Codex, and Cursor. - **Ratel Cloud**: hosted analytics for context usage and retrieval performance (coming soon). Measured results come from the open benchmark harness ratel-bench on the Berkeley Function-Calling Leaderboard (BFCL), with tool pools from 30 to 600 tools. With Ratel 0.4.0, mean total tokens drop 86% on Claude Haiku 4.5, 87% on Claude Sonnet 4.6, 89% on GPT 5.4 Mini, and 91% on Qwen3 4b, with tool-selection accuracy at or near baseline. Smaller models gain the most: Claude Haiku 4.5 improves by 26 points on the multiple split. On a 100-tool catalog with Qwen 3.5 running locally, single-tool selection accuracy rises from 8.3% to 76.7%. Ratel is built by Agentified SRL, Milan, Italy. ## Docs - [What is Ratel?](https://docs.ratel.sh/): What Ratel does and how it fits into an agent stack. - [Quick start](https://docs.ratel.sh/quickstart): The fastest way in: let your coding agent integrate Ratel with the open-source skills, or follow the TypeScript and Python quickstarts. - [Install](https://docs.ratel.sh/install): Install the Ratel SDK for TypeScript or Python, or run Ratel Local for MCP clients. - [Optimize agent capabilities](https://docs.ratel.sh/optimization): Progressive disclosure, the efficiency mechanism, and the benchmark-backed numbers. - [Tools, MCP & Skills](https://docs.ratel.sh/tools-mcp-skills): What goes into Ratel's catalogs and how each item is ranked and loaded on demand. - [Retrieval and search](https://docs.ratel.sh/retrieval-and-search): BM25 by default, semantic and hybrid when you opt in, and how to choose. - [Observe your agent](https://docs.ratel.sh/observability): Local trace events and OpenTelemetry spans for the search-and-invoke funnel. - [Architecture](https://docs.ratel.sh/architecture): The layers of the SDK and how one agent turn flows through them. - [FAQ](https://docs.ratel.sh/faq): Common questions about Ratel. - [Full documentation (Markdown)](https://docs.ratel.sh/llms-full.txt): Every docs page in one file, for AI coding assistants to ingest in a single fetch. - [Docs index for LLMs](https://docs.ratel.sh/llms.txt): Page-by-page index of the documentation. ## SDKs - [TypeScript quickstart](https://docs.ratel.sh/typescript/quickstart): Install `@ratel-ai/sdk`, register tools and skills, and hand any agent loop the three capability tools. - [TypeScript framework integrations](https://docs.ratel.sh/typescript/framework-integrations): Official adapters for the Vercel AI SDK and Mastra. - [Python quickstart](https://docs.ratel.sh/python/quickstart): Install `ratel-ai`, register tools and skills, and hand any agent loop the three capability tools. - [Python framework integrations](https://docs.ratel.sh/python/framework-integrations): Wire Ratel into Pydantic AI. - [Package list](https://docs.ratel.sh/packages): Every package with its API reference and changelog. ## Ratel Local - [Ratel Local introduction](https://docs.ratel.sh/local): MCP gateway that fronts Claude Code, Codex, and Cursor with capability search. - [Quickstart for Claude Code and Codex](https://docs.ratel.sh/local/quickstart): Install Ratel Local, run the setup wizard, and verify capability search. - [Cursor setup](https://docs.ratel.sh/local/cursor): Add Ratel Local to Cursor through its MCP configuration. ## Benchmarks - [Ratel benchmark results](https://benchmark.ratel.sh/): Interactive token and accuracy results across model families and tool-pool sizes. - [Benchmark methodology](https://docs.ratel.sh/benchmark): The three arms, the two suites, and what gets measured. - [ratel-bench on GitHub](https://github.com/ratel-ai/ratel-bench): The open harness and full data behind the numbers. ## Source code - [ratel](https://github.com/ratel-ai/ratel): The Rust core and the TypeScript and Python SDKs. - [ratel-local](https://github.com/ratel-ai/ratel-local): MCP server library and CLI behind Ratel Local. - [skills](https://github.com/ratel-ai/skills): Open-source skills for Claude Code, Cursor, and Codex that audit an agent codebase and integrate Ratel. - [Skillset guide](https://docs.ratel.sh/skillset): What the five skills do and how they chain. - [Licensing](https://docs.ratel.sh/licensing): Apache-2.0 for the engine, MIT for everything else. ## Company - [Ratel homepage](https://www.ratel.sh/): What Ratel is, context rot, benchmarks, and use cases. - [Talk to the team](https://calendly.com/giacomo-agentified/30min): Book a call, for teams running agents in production. - [Contact](mailto:hello@ratel.sh): hello@ratel.sh - [Discord](https://discord.gg/75vAPdjYqT): Community chat. - [X](https://x.com/ratelai): Product news and updates. - [LinkedIn](https://www.linkedin.com/company/ratel-ai/): Company profile and announcements. ## Optional - [What's new](https://docs.ratel.sh/whats-new): Release history of the Rust engine and all packages. - [Ratel Cloud](https://docs.ratel.sh/cloud): Hosted context analytics, coming soon. - [Terms of Service](https://www.ratel.sh/legal/terms-of-service): Legal terms. - [Privacy Policy](https://www.ratel.sh/legal/privacy-policy): Privacy policy.