Skip to main content
An agent page is a copy of one of your pages that Waniwani renders and stores. When an AI agent asks for a path that you serve, the relay sends it the agent page. All other requests go to your site with no change.

Before you start

  • The relay must be live on the website. See Add a website.
  • The relay code must call serveAgentPage. On CloudFront, it must have the two functions. On ASP.NET on IIS, the module does it, and you do not change code. See the pages for Vercel, Cloudflare, AWS CloudFront, self-hosted Next.js and ASP.NET on IIS.
  • The relay must run on each path that you serve. If you set up the relay for Only some paths, add these paths to its matcher, routes or behaviors.
If the code does not call serveAgentPage, the Agent pages card shows Your relay does not serve these pages yet. Click See what to change. The Relay card shows the lines to change in your code.

Turn on agent pages

1

Turn on the switch

Open the website and go to Settings. In the Agent pages card, turn on the switch.
2

Select the MCP tools

In MCP tools to give agents, select a Waniwani agent, or No tools. This row shows only when your organization has a Waniwani agent.
3

Select the paths

Go to Pages. Click Serve next to each path that you want to serve. In Suggested paths to add, click Add or Add all. The suggestions come from the last readiness scan.
A change gets to the relay in approximately 2 minutes. You do not deploy again. The relay serves a path when its agent page is ready.

Paths

A website can have 200 path entries and 1,000 stored agent pages. Until a folder page is ready, the agent gets your normal page. If a folder entry covers a path, you cannot change that path alone. To stop serving a path, open the ⋯ menu of the path in Pages and click Stop serving.

Who gets an agent page

The relay sends the agent page when all of these are true:
  • The website has agent pages on, and the path is served.
  • The method is GET or HEAD.
  • The request comes from an AI agent, or it asks for Markdown in its Accept header.
  • The agent page is ready, and it gets to the relay in time: the headers in 300 ms and the body in 1 second. The body is 1 MB at most.
An agent that reads the page for a person gets Markdown when its Accept header lists text/markdown. If not, it gets HTML. Other clients get Markdown only when they prefer Markdown to HTML. If not, they get your normal page. If a condition is false, or if Waniwani does not answer in time, the request goes to your site with no change. An error in the relay never breaks your page. An agent page response has these headers:

What is in an agent page

Waniwani opens your page in a headless browser and waits until the network is idle. Then it keeps the page and removes:
  • Scripts, except JSON-LD and the Waniwani chat embed
  • <noscript> blocks and HTML comments
  • <link> tags, except canonical, alternate, author, license, prev and next
  • Inline event handlers, such as onclick
  • The Waniwani chat widget that the embed shows on the page
Relative links and image addresses become full addresses on your site. When you select a Waniwani agent, each agent page starts with an MCP tools section after the first heading. The section shows the address of the MCP server and the name and description of each tool in the production environment of the agent. If the page has no Waniwani chat embed, Waniwani adds the embed in off mode. Thus, an agent in a browser with WebMCP also gets the tools.

How pages stay current

When the relay records an agent visit to a ready page, Waniwani gets your live page again. It does this one time in 5 minutes for each path, at most. If the HTML changed, Waniwani renders the agent page again. If your page answers 404 or 410, the agent page shows Failed and agents get your normal page. Waniwani also checks the pages one time each hour:
  • A failed page renders again after 1 day. If your page answered 404 or 410, it renders again after 14 days.
  • If no agent visited a ready page for 14 days, Waniwani gets your live page again and renders the agent page again if the HTML changed.
To render a page again now, click Check again in the ⋯ menu of the path, or Check now on the page of the path. When you select a different Waniwani agent for the tools, Waniwani renders all pages again.

Check and preview

In Pages, each path shows its status: The Tokens column shows the tokens of your page and of the agent page. Click a path to open its page. The Serve to agents switch serves or stops the path. If the render failed, the page shows the reason. The preview has the tabs What agents get, What people see and Compare:
  • What agents get: select Markdown or HTML, and Rendered or Source.
  • What people see: Rendered shows a browser screenshot of the top of your page, with the time of the screenshot. Source shows the first 4,000 characters of your HTML.
The Estimated tokens saved tile multiplies the token difference by the requests from agents that answer people. It does not count the agents that you block on the website. It also counts the requests from before the agent page was ready, so it is an estimate. Copy test command copies a command that asks your live site for the page as an agent does:

More settings

When agent pages are on, Settings shows three more cards.

Goals

Agents pick a goal at the top of your llms.txt. Each goal has a link, /llms.txt?goal= and its name, and up to 5 pages that agents must read. A website can have 12 goals. Click Suggest again to get suggestions, and Approve to use one. Click Add goal to write your own.

Agent files

Agents look for files at fixed addresses, such as /llms.txt, /robots.txt, /agents.md and /.well-known/mcp.json. Waniwani writes these files from your site. You can edit them. Click Publish to serve them through the relay. Click Regenerate to write them again. A file from your own site shows Yours in the Source column.

Protocols

Each protocol goes on or off at once, with no deploy. MCP and WebMCP show Not available yet.

Troubleshooting

Waniwani renders from your public https address. A firewall or a bot protection rule can stop the render. The relay lets the render request through to your site, because it has the header x-waniwani-render.
Your code does not call serveAgentPage. On CloudFront, the viewer request function from the newest zip is not attached. Click See what to change, change the code and deploy. Then click Check now.
This is on CloudFront. The origin request function is not on the behavior. Attach origin-request.mjs as Origin request on the same behaviors, deploy and click Check now.
Make sure that the path shows Agent page · ready, and that the relay runs on that path. A new setting can need 2 minutes to get to the relay.