Agent Wranglers

AGT-66Optional

Answer questions from your own pages

Offer an endpoint that answers plain-language questions from your own content, with sources.

How to do it

Offer /ask?query=… over GET and POST, as the NLWeb project does. Accept the question in the path too, such as /ask/opening%20hours, because some fetch tools drop query strings. Answer a GET with no question with usage instructions, not an error. Answer only from your own pages, and return the source URLs with the answer. NLWeb's own format returns a results list of schema.org items. List the endpoint in llms.txt, because no link relation for it is registered. NLWeb is an open project started by Microsoft, with no stable release, so treat its format as an early proposal. Answer only from your own pages, as Ground answers in your own data says. Search every kind of content an agent comes for, such as documentation or guides, not only the FAQ. A FAQ-only search answers a question about a bug with the nearest FAQ entry. People describe symptoms, not topics, and word matching misreads them. "Users randomly logged out" matches a page on random test failures. Map common symptom words to your topic words, and keep a test list of symptoms. When a question matches several pages about equally, return a short list of candidates instead of one confident answer. When the best match shares under half the question's words, say the match is weak and link the page that lists every topic. An agent trusts JSON as given, so the doubt must be in the answer itself.

Examples

HTTP example

GET /ask?query=do+you+fix+skylights HTTP/1.1
Host: example.com

HTTP/1.1 200 OK
Content-Type: application/json

{"query":"do you fix skylights","answer":"Yes, we repair and replace skylights.","sources":["https://example.com/services"]}

How to check

Ask three questions your pages answer and one they don't. Include one that only a deep page answers, such as a guide. Each answer cites sources that answer 200, and the fourth says it has no answer. Then ask five symptoms phrased as users write them. The page that fixes each one is in the top two results. A question about something the site never covers is marked as a weak match. The same question in the path gets the same answer.

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/agents-as-users/ready-for-ai-agents/nlweb">Agent Wranglers agents as users playbook</a>. In code you write, add a comment next to it with the same link.