Agent Wranglers

WEB-262Recommended

Measure how much an agent reads to find an answer

Keep a fixed set of questions with their expected pages. Measure the tokens and fetches a fresh agent needs to reach each one.

How to do it

Write about 30 questions the way people ask them, taken from search logs and support mail. Run them in CI with a scripted agent that starts at llms.txt and follows links. Record tokens read and fetches made per question, and keep the results per release. A rise shows where the layers or the links lost their way. Pair it with Match how people ask as well as title words.

Examples

JavaScript example

const MAX_TOKENS = 5000, MAX_FETCHES = 3;
for (const { question, expected } of questions) {
  const run = await scriptedAgent.find(question, { start: 'https://example.com/llms.txt' });
  assert(run.reached === expected && run.tokens < MAX_TOKENS && run.fetches <= MAX_FETCHES, question);
}

Python example

MAX_TOKENS, MAX_FETCHES = 5000, 3
for case in questions:
    run = scripted_agent.find(case["question"], start="https://example.com/llms.txt")
    assert run.reached == case["expected"] and run.tokens < MAX_TOKENS and run.fetches <= MAX_FETCHES, case["question"]

How to check

Each question reaches its expected page in under 5,000 tokens read and three fetches or fewer. CI keeps the numbers for each release.

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