WEB-257Avoid
Serving one file too large for any agent to read
Never publish a file for agents to read that is larger than an agent's context window. A full-site dump of millions of tokens is one example.
How to do it
An agent cannot read such a file, so it fetches it, truncates it and guesses. Building it on request can also stall the server. On a reference site, a 6 MB full-content file built on each request stalled the server under a burst of agent requests. Offer an outline, section files and search instead. Keep each file under the limit in Offer one file only while it fits an agent's context. JSON meant for tools, not for reading, may be larger when it is labelled that way.
How to check
No file linked from llms.txt, a skill or an agent card passes that limit, apart from JSON labelled for tools.
Related rules
- WEB-185 Offer one file only while it fits an agent's context in Website
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/ready-for-ai-agents/oversized-agent-file">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.