Introduction
██████╗ ██████╗ ██████╗██╗ ██╗██╗ █████╗ ██╗ ██╗███████╗██████╗
██╔══██╗██╔═══██╗██╔════╝██║ ██║██║ ██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗
██║ ██║██║ ██║██║ ██║ ██║██║ ███████║ ╚████╔╝ █████╗ ██████╔╝
██║ ██║██║ ██║██║ ██║ ██║██║ ██╔══██║ ╚██╔╝ ██╔══╝ ██╔══██╗
██████╔╝╚██████╔╝╚██████╗╚██████╔╝███████╗██║ ██║ ██║ ███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
The live documentation layer for AI agents
The Problem
AI agents hallucinate APIs. Not because they're broken — because their training data is stale.
A function signature that changed six months ago, a parameter that was renamed, a new method that didn't exist at training time — the model confidently fabricates the old behavior.
The Fix
DocuLayer sits between your agent and the real documentation, fetching live content on demand, returning verbatim text with full source attribution, and never generating a single word.
Your agent (Claude, Cursor, Codex, any MCP client…)
│ "what parameters does httpx.AsyncClient.get() take?"
▼
┌──────────────────────────────────────────────────────────────┐
│ DocuLayer │
│ ────────────────────────────────────────────────────────── │
│ resolve_identifier → shortcut table / PyPI / npm │
│ │
│ discover_llms_txt → targeted page index (when present) │
│ keyword score entries → fetch only relevant pages │
│ │
│ DocParser (HTML → Markdown, heading split) │
│ DocSearcher (BM25 — no ML, no embeddings, no network) │
│ │
│ TTLCache (in-memory only — zero disk writes) │
└──────────────────────────────────────────────────────────────┘
│ verbatim section + source URL + "fetched 3s ago"
▼
LLM — reads real docs, answers correctly
Key Properties
| Property | Value |
|---|---|
| Hallucination risk | Zero — no generated text, ever |
| Storage | None — in-memory TTL cache only |
| Setup | pip install doculayer then doculayer setup |
| MCP compatible | Works with Claude Code, Cursor, VS Code, Windsurf, Zed |
| ML required | No — BM25 only, no embeddings |
Four Tools
Once installed, DocuLayer exposes four MCP tools to your agent:
| Tool | Purpose |
|---|---|
doculayer_search | BM25 search across live doc sections |
doculayer_fetch | Fetch a whole page or named section |
doculayer_symbol | Look up a function, class, or method |
doculayer_sources | List known sources and cache stats |
Every response includes a citation block:
> **Source**: https://docs.pydantic.dev/latest/concepts/validators/
> **Fetched**: 4s ago
No generated text ever appears in a response.
Ready to install? → Quick Install