How NanoClaw handles this
NanoClaw lives in the chat apps you already use, so a purge is a message. You changed the footer in your shared theme, and from Telegram you write: @Andy use xSpeed Hub to purge the page cache on every site. The agent in that group's container calls list_sites, then purge_cache, and answers in the same chat. A message is a natural place for a result per site, so a site that failed is a line in the reply rather than something you have to dig for.
The server was added to the agent group with ncl groups config add-mcp-server, the Hub's address and an Authorization: Bearer header holding the connection token, and the group was restarted to pick it up. For a purge the token has to allow writes, so Read-only everywhere must be off. The plugin reports the type, the site, how many entries were cleared, and for a purge of type all the object cache and a connected Cloudflare edge. With site: "all" the Hub runs the sites one after another and returns one result each, which is what lets the agent say landing did not answer while the others purged.
Whether NanoClaw prompts before a tool call depends on how your fork and its admins are set up. Its documentation gates adding a server behind approval but describes no per-tool prompt for the calls themselves. xSpeed Hub has no confirmation step of its own, so a purge runs once the agent calls it and your connection allows writes. For a purge of every site, the Hub tells the agent to say it will touch all of them and wait for your yes, which in NanoClaw is a question in the chat, but that is guidance to the model, not a lock.
Set up NanoClaw once
Already connected? Skip to the prompts. Alternatives and troubleshooting are on the NanoClaw guide.
1Put your sites in xSpeed Hub
Sign in at app.xspeedcache.com with Google or email; the Hub is free and has no site cap. Then connect each WordPress site from its own dashboard: click Connect Hub in the xSpeed Cache top bar, then Connect via xSpeed Hub. Each site needs the free xSpeed Cache plugin.
2Add xSpeed Hub to your agent group
Copy the connection token from Connect AI in the Hub (only the workspace owner sees it). Then run this on the machine that hosts NanoClaw, with your agent group's ID from ncl groups list. The header goes in as a JSON object, because NanoClaw refuses credentials inside the URL. NanoClaw may ask an admin to approve the change.
ncl groups config add-mcp-server --id <group-id> --name xspeedhub \
--url https://app.xspeedcache.com/xspeed/mcp \
--headers '{"Authorization":"Bearer <your connection token>"}' 3Restart the group and ask
The new server takes effect after a restart. Then message your agent with its trigger word, @Andy by default, and ask something that names xSpeed Hub.
ncl groups restart --id <group-id>
Full NanoClaw setup, sign-in options and FAQ
Before you send a prompt that changes something
Reads change nothing on your sites, though contact_support emails xSpeed support. Writes run once your connection allows them, so your client's approval prompt and a read-only connection (the token's Read-only everywhere switch, or a Viewer sign-in) are the gates that matter. Whether NanoClaw asks you before an MCP tool runs depends on how your fork and its admins are set up; its documentation gates adding a server behind approval but describes no per-tool prompt for calls. xSpeed Hub has no confirmation step of its own, so a write runs as soon as the agent calls it and your connection allows writes. The Hub tells the agent to confirm the target site and to ask once before a write that touches every site, which in NanoClaw shows up as a question in the chat. The firm stop is the token: with Read-only everywhere on, the Hub refuses every write tool. Keep it on for scheduled tasks.
What do I ask?
Three prompts written for NanoClaw. More for this job are below.
@Andy use xSpeed Hub to purge the page cache on every site and tell me which ones failed.
@Andy with xSpeed Hub, purge only the assets cache on blog, then start the preloader.
@Andy use xSpeed Hub to read the cache status on shop and tell me whether it needs a purge. Do not purge yet.
What happens, step by step
A purge throws away stored copies so the next visitor gets a fresh page. Through xSpeed Hub an agent can purge everything, only pages, only CSS and JavaScript assets, the object cache or the REST cache, on one site or across every site in a workspace. A full purge also clears the Cloudflare edge when the site has Cloudflare connected.
01
Find the site
The agent calls list_sites when you have more than one site, then matches the name you used to a site handle. If the name could mean two sites, the Hub tells it to ask you rather than guess.
02
Pick the purge type
purge_cache takes a type: all, page, assets, object or rest. all clears the page cache, the object cache and, when they are connected, the Cloudflare edge and CDN. After a theme or CSS change, assets is enough; after a content edit, page; after a deploy, all.
03
Purge
The call runs straight away on that site once your connection allows writes. For every site at once the agent passes site: "all", and the Hub runs the sites one after another with a one-second pause.
04
Clear only the edge if that is all you need
purge_cloudflare empties the Cloudflare edge cache on its own, without touching the copies on your server. A page or assets purge does not reach Cloudflare; a purge of type all does when Cloudflare is connected.
05
Warm it again
start_preloader rebuilds the cache in the background so the first visitors after the purge are not the ones paying for it.
Reference
| Tool | purge_cache (write) |
|---|---|
| Purge types | all, page, assets, object, rest |
| What all covers | Page cache, object cache, plus the Cloudflare edge and CDN when connected |
| Every site at once | site: "all" or a list of handles, one result per site |
| Fan-out pacing | Sites run one after another with a 1 second pause |
| Edge only | purge_cloudflare, a separate write tool |
| Re-warm | start_preloader after the purge |
| Read-only access | purge_cache is refused on a connection token with Read-only everywhere on, and for a Viewer sign-in |
| Confirmation | None on the Hub; your client's prompt is the gate |
Rules worth keeping
- Name the site. With several sites, an unclear name should make the agent ask, and the Hub tells it to.
- A purge of every site is one call with site: "all". The Hub tells the agent to confirm it with you once before it runs.
- Purge the narrowest type that fixes the problem, then warm the cache, so visitors do not all hit uncached pages at once.
- A fan-out result is reported per site. Treat some sites failing as a partial result, not a failure of the whole call.
Good to know with NanoClaw
The token in the group's container configuration is the whole permission model here. With Read-only everywhere off, anyone who can message the agent with its trigger word in that chat can ask it to purge your sites, and in a group chat that may be more people than you expect. Add the server only to agent groups whose chats you control, or hold the token in NanoClaw's credential gateway as its gateway documentation describes. Keep scheduled tasks from ncl tasks create to reads, because a task has no conversation attached and nobody can answer the Hub's ask-once question. Turning Read-only everywhere on stops every purge, and it applies to every client that sends the same token.
More prompts for this job
They work in any client connected to xSpeed Hub.
Use xSpeed Hub to purge the page cache on blog.
I just changed the theme CSS on shop. Use xSpeed Hub to purge only the assets cache there.
With xSpeed Hub, purge every site in my workspace and tell me which ones failed.
Use xSpeed Hub to purge shop, then purge its Cloudflare edge cache too.
With xSpeed Hub, purge the docs site and start the preloader so it is warm again.
Using xSpeed Hub, what purge type should I use after updating a plugin that changes the checkout page?
Frequently asked questions
Keep going
Purge the cache with other agents
More with NanoClaw
Documentation
- How to enable Page Cache
- How to warm your cache ahead of visitors
- Managing your fleet with xSpeed Hub
- How to write prompts for xSpeed Hub
- NanoClaw + xSpeed
- Every AI agent that works with xSpeed
From the blog