---
title: "Layer agent content with a budget per · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/ready-for-ai-agents/layer-budgets
id: WEB-259
level: Recommended
updated: 2026-10-22
tokens: 736
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Layer agent content with a budget per layer

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Ready for AI agents](https://agentwranglers.se/playbook/website/ready-for-ai-agents.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: WEB-259
- Level: Recommended
- Chapter: [Ready for AI agents](https://agentwranglers.se/playbook/website/ready-for-ai-agents.md)
- Rule: Arrange agent content in layers, each with a token budget, and link each layer to the next as Markdown.
- Check: The build counts every agent file's tokens and fails when one passes its layer's budget.
- How: 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](https://agentwranglers.se/playbook/website/ready-for-ai-agents/token-counts.md) says.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JSON example

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

## Related rules

- WEB-258 [State the size of every agent file in tokens](https://agentwranglers.se/playbook/website/ready-for-ai-agents/token-counts.md) in Website
- WEB-263 [Split large agent content into named parts behind an index](https://agentwranglers.se/playbook/website/ready-for-ai-agents/named-parts-index.md) in Website
- WEB-251 [Publish a topic index for agents](https://agentwranglers.se/playbook/website/ready-for-ai-agents/topic-index.md) in Website

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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.

- Previous: [State the size of every agent file in tokens](https://agentwranglers.se/playbook/website/ready-for-ai-agents/token-counts.md)
- Next: [Split large agent content into named parts behind an index](https://agentwranglers.se/playbook/website/ready-for-ai-agents/named-parts-index.md)
- [Ready for AI agents](https://agentwranglers.se/playbook/website/ready-for-ai-agents.md)
