xSpeed Cache is officially live! Get 50% OFF during Launch Week — Lifetime starts at just $79Lifetime from $79 — 50% OFF, Launch Week! See Plans →

See Plans →
Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin

Purge the WordPress cache with Hermes Agent

Purging the WordPress cache with Hermes Agent means having an always-on agent clear the xSpeed cache on a named site, on request or on a cron schedule, through the xSpeed Hub server connected to it.

list_sitesget_cache_statuspurge_cachepurge_cloudflarestart_preloader

Last updated: October 2026

Example session · Hermes Agent

You: Run the evening job with xSpeed Hub: purge the page cache on shop and warm it, then report where the cache stands.

list_sites read-only
→ 6 sites; shop is shop.example.com

purge_cache(site: shop, type: page) changes site
→ 305 cached pages cleared

start_preloader(site: shop) changes site
→ preloader started, 305 URLs queued

get_cache_status(site: shop) read-only
→ page cache on, 12 cached pages so far, preloader running

Hermes Agent: Purged and warming. 12 of 305 pages are cached so far, so the hit ratio will read low until the preloader finishes.

01

How Hermes Agent handles this

Hermes Agent runs continuously on a machine you control, so the useful purge is often the one that happens without you at a keyboard. Maybe you publish posts in the evening and want the stored pages cleared before morning, or you want a purge after a weekly plugin update. You can also ask it directly in conversation: purge the page cache on shop and tell me what went. Either way it calls list_sites, then purge_cache, then reports what the plugin returned.

For timed runs, Hermes Agent documents cron, and the timing is its job rather than the Hub's, because xSpeed Hub has no scheduler for agent prompts. Treat a scheduled run as a prompt with no one watching: name the site, name the purge type, and say what to report. The result of each run is the plugin's report: the type, the entries cleared, and for all the object cache and a connected Cloudflare edge, so a log of runs is also a log of what was cleared.

A Hermes server entry has a trust setting. The default, full, adds no approval prompt for that server's tools, so a purge runs as soon as the connection allows writes, because xSpeed Hub has no confirmation of its own. Set trust to untrusted and Hermes asks before every call to a tool without a read-only hint, which for the Hub means every call, reads included, and a scheduled run has no one to answer. To keep writes out of a job instead, list only the tools it needs in the tools include filter. The Hub also tells the agent to confirm a purge across every site, but that is guidance to the model, not a lock, so keep scheduled purges to named sites.

02

Set up Hermes Agent once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Hermes Agent 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 config.yaml

Add this entry under mcp_servers. auth: oauth tells Hermes to handle discovery, dynamic client registration, PKCE and token refresh itself. If you edit the file from inside a running session, Hermes reloads its MCP connections with a 30 second timeout, which is too short for a browser sign-in, so finish the entry and then run the login in the next step.

~/.hermes/config.yaml
mcp_servers:
  xspeedhub:
    url: "https://app.xspeedcache.com/xspeed/mcp"
    auth: oauth

3Sign in with hermes mcp login

Run this once. Hermes prints an authorization URL, opens your browser where it can, and waits for the callback on a local loopback port. Sign in to xSpeed Hub and approve. There is no token to paste; Hermes caches the credentials it receives under ~/.hermes/mcp-tokens. On a remote host, paste the redirect URL back into the terminal when Hermes asks, or forward the callback port over SSH.

Terminal
hermes mcp login xspeedhub
hermes mcp test xspeedhub
1 / 3

Full Hermes Agent 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. A Hermes server entry has a trust setting. The default, full, adds no approval prompt for that server's tools, and the approvals setting covers dangerous shell commands, not MCP tools. Set trust: untrusted on the xspeedhub entry and Hermes asks before every call to a tool that lacks a readOnlyHint of true. The Hub does not mark its tools that way, so with untrusted every Hub call asks, reads included. To remove writes instead of prompting, set tools.include on the entry to the read tools; the filter takes globs and include wins over exclude. The Hub itself has no confirmation step.

03

What do I ask?

Three prompts written for Hermes Agent. More for this job are below.

Prompt for Hermes Agent
Run the evening job with xSpeed Hub: purge the page cache on shop, start the preloader, and report how many URLs were queued.
Prompt for Hermes Agent
Every Sunday after the plugin update, use xSpeed Hub to purge shop completely and tell me whether the object cache was flushed too.
Prompt for Hermes Agent
Each morning, ask xSpeed Hub for the cache status of blog and report it. Do not purge anything.
04

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.

05

Reference

Toolpurge_cache (write)
Purge typesall, page, assets, object, rest
What all coversPage cache, object cache, plus the Cloudflare edge and CDN when connected
Every site at oncesite: "all" or a list of handles, one result per site
Fan-out pacingSites run one after another with a 1 second pause
Edge onlypurge_cloudflare, a separate write tool
Re-warmstart_preloader after the purge
Read-only accesspurge_cache is refused on a connection token with Read-only everywhere on, and for a Viewer sign-in
ConfirmationNone on the Hub; your client's prompt is the gate
06

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 Hermes Agent

Background runs and cron never open a browser, so if the refresh token stops working the server is parked and a scheduled run purges nothing until you sign in again from a terminal, and you only find out when you read the run log. Look at the first runs after you set a job up, and have the prompt say to report plainly when a tool call is refused. Avoid site: all in a scheduled prompt, because the one-time confirmation the Hub asks the agent to seek has no one to answer it; name the sites instead.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Use xSpeed Hub to purge the page cache on blog.
Prompt
I just changed the theme CSS on shop. Use xSpeed Hub to purge only the assets cache there.
Prompt
With xSpeed Hub, purge every site in my workspace and tell me which ones failed.
Prompt
Use xSpeed Hub to purge shop, then purge its Cloudflare edge cache too.
Prompt
With xSpeed Hub, purge the docs site and start the preloader so it is warm again.
Prompt
Using xSpeed Hub, what purge type should I use after updating a plugin that changes the checkout page?
08

Frequently asked questions

Yes. Hermes Agent documents cron for timed runs, and a job can call the xSpeed Hub purge_cache tool for a named site. The Hub has no scheduler of its own, so the timing lives in Hermes Agent.

It is as safe as the setup you give it. xSpeed Hub has no confirmation step, and Hermes adds no prompt for a server at its default trust of full, while a prompt under untrusted has no one to answer in a scheduled run. Keep the job to one named site and one purge type, list only the tools it needs in the tools include filter, avoid site: all, and read the first runs to check they behave.

all clears every cache xSpeed manages for the site, including a connected Cloudflare zone or CDN. page clears the stored HTML pages, assets clears minified and combined CSS and JavaScript, object clears the Redis or Memcached object cache, and rest clears cached REST API responses.

A purge of type all does, when the site has Cloudflare connected in xSpeed: it clears the page cache, the object cache and the Cloudflare edge, and reports each one. A page, assets or rest purge stays on your server. purge_cloudflare clears only the edge.

Yes. The agent passes site: "all" to purge_cache and the Hub purges every site in the workspace one after another, returning a result per site. The Hub tells the agent to confirm a write across every site with you once before it runs it.

The next request to each purged page builds it fresh, which is slower than a cached hit. Starting the preloader right after the purge rebuilds the cache in the background so visitors mostly land on warm pages.

09

Keep going

Purge the cache with other agents

More with Hermes Agent

Documentation

From the blog

Purge the cache, from Hermes Agent.

xSpeed Hub is free and has no site cap. Connect your sites once and ask from the agent you already use.