Agent Wranglers

WEB-259Recommended

Layer agent content with a budget per layer

Arrange agent content in layers, each with a token budget, and link each layer to the next as Markdown.

How to do it

Set the budgets once, for example 2,000 tokens for the discovery file and 15,000 for each navigation file. Allow 5,000 for each unit page, such as one rule or one product, and 2,000 for each answer from search. Label bulk JSON as being for tools, not for reading. Then an agent reads the discovery file, picks a branch, and reads only the page it needs. State each file's size as State the size of every agent file in tokens says.

Examples

JSON example

{
  "discovery": { "files": ["/llms.txt"], "maxTokens": 2000 },
  "navigation": { "files": ["/guide/*/index.md"], "maxTokens": 15000 },
  "unit": { "files": ["/guide/*/*.md"], "maxTokens": 5000 },
  "answer": { "files": ["/ask"], "maxTokens": 2000 }
}

How to check

The build counts every agent file's tokens and fails when one passes its layer's budget.

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/layer-budgets">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.