agents-docs
Ultra-fast local markdown documentation RAG for AI coding agents, enabling instant BM25 search over official framework docs and live AI model registries via MCP.
README
agents-docs
<p align="left"> <a href="https://github.com/Lolaplex/agents-docs/releases"><img src="https://img.shields.io/badge/version-0.42.0-blue.svg?style=flat-square" alt="Version 0.42.0"></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Standard-orange.svg?style=flat-square" alt="MCP"></a> <a href="https://python.org"><img src="https://img.shields.io/badge/Python-3.10+-3776AB.svg?style=flat-square&logo=python&logoColor=white" alt="Python 3.10+"></a> <a href="https://pypi.org/project/agents-docs/"><img src="https://img.shields.io/pypi/v/agents-docs.svg?style=flat-square" alt="PyPI"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat-square" alt="License"></a> </p>
Ultra-fast, zero-bloat local markdown documentation RAG for AI coding agents via MCP.
Instant BM25 search over official framework documentation and live AI model registries. Shared across Cursor, Claude Code, Antigravity, and Zed.
Why .agents/docs?
Coding agents frequently hallucinate deprecated APIs (Svelte 4 vs 5 Runes, Tailwind v3 vs v4, React 19 Actions) or reference outdated LLM models and token pricing.
Traditional vector-embedding RAG solutions are bloated: they require Docker containers, hundreds of megabytes of Python dependencies (Chroma, LangChain), and slow API embedding calls that split code blocks in half.
agents-docs applies the Lolaplex philosophy:
- Zero Vector DBs: Header-aware markdown chunking + pure Python lexical BM25 ranking with header match boost (+6.0) and full phrase boost (+10.0).
- Sub-10ms Search: Instant retrieval directly from plain markdown files on disk (
~/.agents/docs/). - Live AI Models Registry: Real-time tracked context windows, benchmarks, and token pricing ($/1M) for Frontier and Open-Weights models (Claude 5/4, GPT-5/o3/o4, Gemini 3.x, DeepSeek V4/R1, Qwen 2.5 Coder).
- Curated 21+ Framework Catalog: 1-click sync for official
llms.txt(TypeScript Handbook, Svelte 5, FastAPI, Tailwind v3/v4, Tauri 2, Next.js, Supabase, Hono, WXT, Netlify, Coolify, Cloudflare, Resend, React, Vite, Zod, Pydantic, shadcn/ui). - Deterministic Noise Pruning: Automatically strips HTML wrappers, link noise, and cookie banners without altering code blocks or tables.
- Universal MCP Server: FastMCP stdio interface with auto-sync and dependency manifest inspection.
Architecture & Flow
┌─────────────────────────────────────────────────────────────┐
│ DOCS & MODEL REGISTRIES │
│ Official llms.txt · TypeScript Handbook · OpenRouter │
└──────────────────────────────┬──────────────────────────────┘
│ agents-docs sync <name>
▼
┌─────────────────────────────────────────────────────────────┐
│ DETERMINISTIC NOISE PRUNER │
│ Strips HTML boilerplate while preserving 100% of code │
└──────────────────────────────┬──────────────────────────────┘
│ Header-aware chunking
▼
┌─────────────────────────────────────────────────────────────┐
│ LOCAL DOCUMENTATION STORE │
│ ~/.agents/docs/ai-models/ ~/.agents/docs/svelte-5/ │
│ ~/.agents/docs/typescript/ ~/.agents/docs/fastapi/ │
└──────────────┬───────────────────────────────┬──────────────┘
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ LEXICAL BM25 │ │ MCP SERVER & CLERK │
│ Header Match Boost (+6.0) │ │ search_docs · list_docsets │
│ Sub-10ms Exact Retrieval │ │ sync_project_docs │
└─────────────────────────────┘ └─────────────────────────────┘
Quickstart
1-Step Setup
pip install agents-docs && agents-docs init
Scaffolds ~/.agents/docs/, seeds the live ai-models registry, autowires MCP configurations into your installed IDEs, and registers assistant skills.
[!TIP] 🤖 Agent-Driven Setup (Zero Friction):
Simply tell your coding agent: "Install and set up agents-docs for me."
The agent installs the package, runsagents-docs init, and automatically retrieves fresh documentation whenever you ask technical stack or model pricing questions.
CLI Reference
| Command | Purpose |
|---|---|
agents-docs init |
Plug & Play setup: auto-configures MCP across all IDEs and seeds model docs |
agents-docs catalog |
Lists all 21+ pre-configured frameworks and model catalogs |
agents-docs sync <name> |
1-click download/update of official framework documentation |
agents-docs sync <name> --url <URL> |
Ingests any custom llms.txt, llms-full.txt, or markdown URL |
agents-docs search "<query>" |
Fast BM25 search across all installed docsets |
agents-docs search "<query>" --docset <name> |
Scoped search within a specific documentation set |
agents-docs prune |
In-place noise & boilerplate cleaner across all installed docs |
agents-docs list |
Lists all installed docsets on disk with file and byte counts |
agents-docs serve |
Runs the FastMCP stdio server (default) |
MCP Tools Reference
| Tool | Parameters | Description |
|---|---|---|
list_docsets |
None | Lists all installed docsets in ~/.agents/docs/ with file counts and byte sizes. |
search_docs |
query, docset (default: "all"), top_k (default: 4) |
Returns top matching markdown sections with headers and code blocks in milliseconds. Auto-syncs missing catalog docsets on demand. |
get_doc_page |
docset, rel_path |
Returns the raw markdown content of a specific file. |
list_catalog |
None | Lists all 21+ pre-configured frameworks and model catalogs available for 1-click sync. |
sync_docset |
name, url (optional) |
Downloads/updates official documentation from the catalog or custom llms.txt / markdown URL. |
sync_project_docs |
project_path |
Inspects package.json, requirements.txt, pyproject.toml, Cargo.toml and auto-syncs detected docsets. |
sync_memory_docs |
None | Scans ~/.agents/memory/PROJECTS.md and syncs all active stacks. |
Supported Ecosystem
- Claude Code: Bound via MCP server and
.agents/skills/docs-search. - Google Antigravity: Integrated via
.gemini/configrules andagents-docsMCP. - Cursor: Automatically configures
.cursor/mcp.jsonand agent rules. - Zed: Configures
context_serversand mirrors assistant skills. - VS Code / Windsurf: Autowires Cline / Roo-Code MCP configuration.
Open ABI Specification
Detailed architectural specifications live in abi/:
abi/WHY.md— Architectural rationale & BM25 vs Vector embeddings.abi/LAYOUT.md— Storage taxonomy in~/.agents/docs/.abi/MCP.md— Tool surface definitions and schemas.abi/CATALOG.md— Curated catalog schema and supported types.abi/LLMSTXT.md— Support for thellms.txtstandard.
Testing & Verification
Run the test suite across all engines:
python tests/run_all_tests.py
License
MIT License. See LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。