Agentic Engine Optimization: Addy Osmani’s Documentation Framework
Addy Osmani’s proposed agentic engine optimization framework for technical documentation, its token budgets and the limits of Adobe’s retail referral findings.
Osmani’s suggested quick-start token ceiling
March 2026 retail conversion-rate difference
Q1 2026 year-over-year retail AI referral growth
Token savings depend on the input
Key Takeaways
In April 2026 Addy Osmani published a personal proposal for making technical documentation easier for coding agents to find and consume. Token budgets and predictable document structure are central to the proposal.
Adobe separately measured behavior among AI-referred visits to U.S. retail sites. Those shoppers and agent-driven documentation reads are different populations. See Generative Engine Optimization.
This guide explains Osmani’s proposed signals, including different token budgets for different document types. Test them with your own documentation and agent workflows.
Osmani's definition, verbatim: "Agentic Engine Optimization (AEO) is the practice of structuring, formatting, and serving technical content so that AI coding agents can actually use it."
What Osmani Actually Published
The April 11 post frames a specific problem. AI coding agents — Claude Code, Cursor, Cline, Aider, Codex CLI, Gemini CLI — consume documentation fundamentally differently from humans. They issue a single HTTP request, strip HTML, count tokens, and either use your content as context or silently discard it. Human-optimized documentation patterns (progressive disclosure, accordion sections, tabbed code samples, "click to expand") actively hurt agent consumption. Osmani's framing: "agents want everything at once."
The framework has four concrete artifacts:
- A five-signal model for evaluating any site's agent-readiness
- A six-layer stack in implementation order — what to ship first, second, third
- A tiered token budget for documentation pages by purpose
- The
agentic-seoopen-source CLI that scores a 100-point audit against these criteria and outputs JSON for CI/CD
Agencies should treat this the same way the industry treated Core Web Vitals when Google announced them in May 2020: a specific, measurable set of technical criteria that suddenly becomes the shared vocabulary for a capability everyone had been discussing in vague terms. The parallel is imperfect — Google will not rank on AEO scores directly — but the industry value of a shared audit is the same.
The Five AEO Signals
Osmani's framework organizes everything around five signals that any agent-accessible site should pass:
Server-side rendered HTML at the fetched URL. robots.txt does not block AI crawlers. llms.txt exists at the domain root and lists content in a structured way.
Semantic HTML and semantic Markdown. Heading hierarchy that matches logical structure. Code blocks are fenced, not styled. Tables are actual tables, not visual approximations.
Per-page token counts tracked as documentation metadata. Budgets enforced by page type (15k / 20k / 25k / 30k). Markdown-first to minimize tokenization overhead.
skill.md files declare what a service does, inputs, constraints, and safe-usage boundaries. AGENTS.md gives repo-level project context.
Not a wall, but a known-surface. Block agents from checkout and account pages; allow them on public documentation and marketing. An emerging agent-permissions.json spec adds declarative rules beyond robots.txt.
The five signals map to a six-layer implementation stack, in recommended shipping order:
- Access control —
robots.txtrules that explicitly allow or deny AI crawlers - Discovery —
llms.txtat the domain root as an agent-readable sitemap - Capability signaling —
skill.mdfiles describing what each service, API, or feature does - Content formatting — semantic HTML and Markdown twins of every page
- Token surfacing — per-page token counts published as metadata
- Copy-for-AI UX — copy-to-clipboard, raw-view links, copy-for-AI buttons
The Tiered Token Budget Rule
Popular X posts summarized Osmani's token guidance as "keep docs under 15k tokens." That is the quick-start number only. The real framework is tiered by page purpose:
| Page type | Osmani's budget | Why |
|---|---|---|
| Quick-start / getting-started | < 15,000 tokens | Agents land here first; needs to fit with room for follow-up context |
| Conceptual guides | < 20,000 tokens | Longer narrative OK; still leaves headroom for prompt + response |
| API reference (per endpoint) | < 25,000 tokens | Dense technical detail acceptable; chunk at method level |
| Single-page hard ceiling | 30,000 tokens | Anything larger needs chunking or section-level Markdown twins |
llms.txt itself | < 5,000 tokens | Discovery file — the agent reads the whole thing to pick destinations |
The additional rule: front-load answers within the first 500 tokens. Agents parse linearly and stop early once they have an answer. Buried answers cost the entire page's tokens without delivering the expected signal.
Osmani, verbatim: "token count is now a first-class documentation metric."
Why <15k Beats a 2M Context Window
Token budgets look small compared to April 2026 frontier context windows. Here is the current landscape:
| Model (April 2026) | Standard context | Max / extended | Pricing note |
|---|---|---|---|
| Claude Opus 4.7 | 1M tokens | 1M | Premium tier above 200k on API |
| Claude Sonnet 4.6 | 1M tokens | 1M | Flat $3 in / $15 out per MTok |
| GPT-5.4 | 272K tokens | 1.05M | 2× input / 1.5× output premium above 272k |
| Gemini 3 Pro | 1M tokens | 2M (enterprise) | ~1,500 pages per 1M token ceiling |
| Gemini 3 Flash | 1M tokens | 1M | $0.50 in / $3.00 out per MTok |
| Grok 4.20 / 4.3 Beta | 2M tokens | 2M | See our Grok 4.3 analysis |
Against a 2M context window, a 30,000-token documentation page is 1.5% of total capacity. So why does Osmani's budget still matter? Three reasons:
- Cost economics. GPT-5.4 charges a 2× input premium above its 272k standard window. Claude Opus 4.7 charges a premium above 200k. A single oversized page can flip an agent workflow from cheap to expensive inference.
- RAG-chunk efficiency. Most production agents don't dump whole pages into context — they chunk, retrieve, and compose. A 30k-token page chunked into 6 × 5k retrievable units preserves the useful parts without carrying the whole page's overhead.
- Agent branching. A Claude Code session might consume documentation pages from 5–10 different services in parallel. Even at 1M capacity, ten 30k-token pages burn 30% of the window before the agent has written a single line of code.
Small budgets aren't about fitting into today's windows. They're about the per-interaction economics and the composition pattern real agents use.
llms.txt: Adoption Status in April 2026
llms.txt was proposed by Jeremy Howard (Answer AI) on September 3, 2024 at llmstxt.org. The format is Markdown: H1 site name, blockquote summary, optional paragraphs, H2-delimited link sections, and an "Optional" section for skippable content. Nineteen months later, here is the verified adoption status:
| Domain | Status (Apr 2026) | Notes |
|---|---|---|
| docs.claude.com | Live | ~8,364 tokens; also ships llms-full.txt at ~481,349 tokens |
| platform.openai.com/docs | Live | Published at docs subdomain; root openai.com currently returns 403 to some crawlers |
| vercel.com | Live | Product-segmented sitemap (AI, Build, CDN, Functions) |
| stripe.com | Live | Structured by product, "Optional" section for Climate and peripheral products |
| shopify.com | Live | Company overview + product link index |
| github.com | Live | Auto-generated; references docs.github.com |
| cloudflare.com | Not at root | Published per-product; root apex 404 as of audit |
| hubspot.com | 404 | Not yet published |
| netlify.com | Inconclusive | Redirects to a doc-index; not clearly canonical llms.txt |
The Mueller counter-position. Google's John Mueller has stated publicly that Google does not use llms.txt for ranking, and has called the per-page markdown-twin practice "a stupid idea." This is the official current position. AEO still matters because AI coding agents — not Google's search crawler — are the primary consumers. But any claim that adopting llms.txt improves Google rankings is not supported.
The honest read: llms.txt adoption is meaningful for agent-consumption workflows (Claude Code pulling documentation, Perplexity researching a topic, ChatGPT Advanced Research fetching sources). It is not yet a Google Search ranking factor. Those are two separate value propositions — both real, different audiences.
AGENTS.md: Four Vendors, One Emerging Spec
AGENTS.md is now stewarded by the Linux Foundation's Agentic AI Foundation at agents.md. The format is plain Markdown — no required sections — because, in the spec's framing, "the consumer is a model trained on markdown, and the file's primary job is to be read, not to be parsed." Vendor support as of April 2026:
| Vendor / tool | Primary file | Supports AGENTS.md | Notes |
|---|---|---|---|
| Anthropic — Claude Code | CLAUDE.md | Yes, alongside CLAUDE.md | Most widely deployed in-the-wild today |
| OpenAI — Codex / Codex CLI | AGENTS.md | Yes (origin reference) | Canonical guide at developers.openai.com |
| Google — Gemini CLI / Jules | GEMINI.md | Yes, via spec collaboration | Jules contributes to the shared spec |
| Cursor, Amp, Factory, Aider, Cline | AGENTS.md | Yes (native) | Cursor retains legacy .cursorrules support |
| Microsoft — Copilot / VS Code | .github/copilot-instructions.md | Partial | No single canonical format yet |
The agency-facing recommendation: publish an AGENTS.md as the primary file at repo root, and add a short CLAUDE.md that either mirrors or references it for teams specifically using Claude Code. Common sections that actually help agents (none are required by the spec): project overview, build and test commands, style conventions, architecture notes, and — critically — "things the agent should never do."
Markdown-First: HTML Token Cost Data
Osmani's insistence on Markdown twins has a measurable justification: for the same content, HTML consumes meaningfully more tokens than Markdown because of wrapper divs, CSS classes, ARIA attributes, inline styles, and rendered navigation chrome. The magnitude depends on page type. Here are the reported ranges from third-party measurements:
| Page type | HTML → Markdown token reduction | Driver |
|---|---|---|
| Typical content pages (industry consensus) | 20–30% | Layout wrappers, class attributes |
| Documentation sites with nav + sidebars | 40–60% | Chrome repeated per page |
| E-commerce product pages | up to 95% | Script tags, tracking pixels, upsell widgets |
| App-shell pages with heavy JS | 80–95% | Content may be invisible to non-JS fetchers entirely |
| Table extraction (content type) | Markdown +7pp accuracy | GPT-class models: 60.7% vs 53.6% on HTML |
Token savings depend on the markup, extracted content, tokenizer and formatting. Measure comparable HTML and Markdown with the actual client before forecasting savings.
What Adobe’s retail data can and cannot show
Adobe Digital Insights reported that AI-sourced traffic to U.S. retail sites grew 393% year over year in Q1 2026. In March 2026, the conversion rate of AI-referred visits was 42% higher than that of non-AI traffic. This is a relative difference between observed sources, not a 42-percentage-point increase or the effect of changing documentation. The data do not support projecting incremental sales from implementing AEO.
Auditing a Client Site Against the Framework
Osmani's open-source agentic-seo CLI scores 100 points across five categories. Install and run:
# One-off audit of a live URL
npx agentic-seo --url https://client.example.com
# CI/CD: fail the build below 80 / 100
npx agentic-seo --url https://client.example.com --threshold 80 --json
# Local build-output audit (Next.js, Docusaurus, Astro, Hugo, Jekyll, etc.)
npx agentic-seo --serveThe 100-point scoring breakdown:
| Category | Points | Checks |
|---|---|---|
| Discovery | 25 | robots.txt (10), llms.txt (10), AGENTS.md or CLAUDE.md (5) |
| Content Structure | 25 | Heading hierarchy, semantic HTML (15); Markdown availability (10) |
| Token Economics | 25 | Per-page token counts (15, configurable ceiling); token-count metadata (10) |
| Capability Signaling | 15 | skill.md (10); agent-permissions.json (5) |
| UX Bridge | 10 | Copy-for-AI affordances (10) |
The tool auto-detects Next.js, Docusaurus, Eleventy, Astro, Hugo, Jekyll, Gatsby, VitePress, MkDocs, and Sphinx, and can emit JSON (--json) for wiring into GitHub Actions or Vercel build steps. Osmani's README explicitly calls out that the project is not endorsed by Google — it's an independent open-source effort the framework author happens to lead.
The 30-Day Agency Rollout Plan
For agencies integrating AEO into client engagements, a 30-day rollout keeps scope tight and produces measurable deliverables:
| Week | Scope | Deliverable |
|---|---|---|
| 1 | Baseline audit + AI-traffic share analysis | agentic-seo score + GA4 AI-referrer segment + revenue model |
| 2 | Discovery layer | robots.txt updates, llms.txt published, AGENTS.md shipped |
| 3 | Content structure + markdown twins | Top 20 pages shipped with .md variants; token counts tracked |
| 4 | Capability signaling + CI integration | skill.md for services, agentic-seo wired into deploy pipeline, before/after score report |
The week-4 before/after score report is the delivery artifact that justifies the engagement. Agencies should budget 20–40 hours per client site depending on size — discovery is cheap, markdown twins are the heavy lift.
Cross-link: Pair this engagement with the Google AI Max text-guidelines setup in our 27% conversion lift guide to cover both the paid-search and organic-AI angles in a single client program.
Testing agent-readable documentation
Try Osmani’s documentation framework on one task. Compare whether an agent retrieves the correct version and completes the task, how many requests and tokens it uses, and whether humans can still navigate the same material. For visibility in Google Search AI features, follow Google’s separate eligibility guidance.
Related reading: Get Started.
Related reading: Explore SEO Optimization.
Frequently Asked Questions
Corrections
Correction, : Identified Osmani’s framework as a personal documentation proposal, preserved its token budgets and Adobe’s dated referral data, and removed the unjustified connection to projected revenue.
Deep dives on AI, marketing and development.
Practical guides and fresh insights by email. No recycled takes.
Related Guides
More on Gen-AI SEO, agentic commerce, and how agencies should measure AI-era visibility.