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

Run and track PageSpeed tests with OpenClaw

Tracking PageSpeed scores with OpenClaw means letting its always-on agent read your stored PageSpeed history on a schedule you set and report drops, using xSpeed Hub as the data source.

list_sitesget_score_historyrun_speed_testget_benchmark_historyrun_benchmark

Last updated: October 2026

Example session · OpenClaw

You: Use xSpeed Hub to run the Monday PageSpeed report: history only, no new tests.

list_sites read-only
→ 4 sites in the default workspace

get_score_history(site: shop) read-only
→ latest mobile 55, previous 61; desktop 82, previous 82

get_score_history(site: docs) read-only
→ latest mobile 71, previous 70; desktop 90, previous 89

get_score_history(site: blog) read-only
→ no run newer than last week; latest mobile 66

get_score_history(site: storefront) read-only
→ no run newer than last week; latest mobile 62

OpenClaw: Report: shop mobile fell six points to 55, desktop flat. Docs rose by one on both devices. Blog and storefront had no new run this week. No tests were started.

01

How OpenClaw handles this

OpenClaw runs all the time and has automations, which suits a job nobody remembers to do. Set one up for Monday morning: read get_score_history for every site you care about, compare each latest run with the one before, and send a short report listing any site whose mobile or desktop score fell. The Hub itself has no scheduler for agent prompts, so the timer is OpenClaw's, and the Hub only answers when OpenClaw calls it.

Keep the scheduled job report-only. get_score_history reads what is stored and starts nothing, and run_benchmark can time every site cached and uncached in one call with no Lighthouse score. Neither changes a site. What the schedule will not do is produce new Lighthouse data on its own, because the Hub does not run scheduled PageSpeed tests. The Hub does pull the plugin's stored PageSpeed and GTmetrix reports each day and sends its own alerts for score regressions, so your weekly report and those alerts complement each other.

When the report shows a drop, you can switch to a normal conversation: ask OpenClaw to run run_speed_test on that one site and compare it with the stored run. That test takes up to about two minutes. Treat it as a deliberate step with you present, since each run spends the shared speed-test allowance. Its result goes to the Hub's own report history, so next week's get_score_history report may not list it.

02

Set up OpenClaw once

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

2Save xSpeed Hub as an MCP server

Run this on the machine that hosts your OpenClaw Gateway. Set the transport to streamable-http: OpenClaw falls back to SSE when you leave it out. With --auth oauth the command saves the server without a connection test, because sign-in has to happen first.

Terminal
openclaw mcp add xspeedhub \
  --url https://app.xspeedcache.com/xspeed/mcp \
  --transport streamable-http \
  --auth oauth

3Sign in with openclaw mcp login

OpenClaw prints an authorization URL and listens on a loopback address for the callback. Open the URL, sign in to xSpeed Hub and approve; the token exchange finishes by itself. There is no token to paste. If your browser is on another machine, copy the code from the redirect and pass it back with openclaw mcp login xspeedhub --code. Then check the connection.

Terminal
openclaw mcp login xspeedhub
openclaw mcp doctor xspeedhub --probe
1 / 3

Full OpenClaw 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. OpenClaw gives you two client-side gates, and the Hub adds none. First, openclaw mcp tools xspeedhub --include limits which tools exist for the agent, so a list of read tools keeps every write out of reach. Second, when the Codex runtime runs your agent turns, MCP tool approvals follow the session's permission posture, and the default full-permission posture does not prompt. openclaw mcp configure xspeedhub --approval prompt asks on every call, and Allow Always saves a grant for that one tool with any arguments. OpenClaw's docs describe that per-call prompt for the Codex runtime; with its own embedded runtime, use the tool filter to decide what the agent can call. The Hub has no confirmation step of its own.

03

What do I ask?

Three prompts written for OpenClaw. More for this job are below.

Prompt for OpenClaw
Every Monday morning, use xSpeed Hub to read the PageSpeed history for all my sites and report any whose mobile or desktop score dropped since the previous run. Do not run any tests.
Prompt for OpenClaw
Ask xSpeed Hub for the latest scores on shop and blog now and tell me which one is further behind on mobile.
Prompt for OpenClaw
This morning's report flagged docs. With xSpeed Hub, run one mobile test on docs and compare it with the stored run.
04

What happens, step by step

PageSpeed Insights is Google's Lighthouse audit, and its score and Core Web Vitals are the numbers most people mean by "my speed". Through xSpeed Hub an agent can read the scores a site has already stored, run a new PageSpeed test on mobile or desktop, and read or run a separate benchmark of cached against uncached response time. The three answer different questions, and the Hub tells the agent which to use for each.

01

Read before you test

get_score_history returns the stored PageSpeed Insights and GTmetrix runs for a site: the score per run, with LCP, FCP, CLS, TBT, Speed Index and TTFB, mobile and desktop. It starts nothing. The Hub tells the agent to use it whenever you ask what your score is, or whether it improved, because a new test spends a shared allowance.

02

Run a new test when you need one

run_speed_test runs a real PageSpeed Insights audit on the site from the Hub and returns the score, the Core Web Vitals and the top opportunities. strategy is mobile (the default) or desktop, and one call tests one of them. It can take up to about 2 minutes, so the agent should say it is running before it calls.

03

Test the other device

Mobile and desktop scores differ, often by a lot. For both, the agent makes two calls, one per strategy. A failure is reported with its reason: PageSpeed not configured, quota reached, a timeout, or a site the audit cannot reach.

04

Measure the cache on its own

run_benchmark times the home page with the cache bypassed and again served from cache, and returns the response times. It is a read tool, and it accepts site: "all" for every site. It does not return a Lighthouse score, so the agent must not use it to answer a PageSpeed question.

05

Compare over time

get_benchmark_history returns past benchmark runs, uncached against cached, together with the settings changes on the same timeline, which is how you answer "did that change help?". For PageSpeed scores over time, use get_score_history.

05

Reference

Read stored scoresget_score_history (read): PageSpeed Insights and GTmetrix runs, starts nothing
Metrics per runScore, LCP, FCP, CLS, TBT, Speed Index, TTFB, for mobile and desktop
Run a new testrun_speed_test (write, uses the shared allowance): one PageSpeed Insights run per call
strategymobile (default) or desktop
DurationUp to about 2 minutes per run
Why a test is a writeIt spends a shared PageSpeed allowance and stores a report; it changes nothing on the site
Read-only accessA connection token with Read-only everywhere on, or a Viewer member's sign-in: run_speed_test is refused; get_score_history, run_benchmark and get_benchmark_history still work. An OAuth sign-in gets the scopes the client asks for
Benchmarkrun_benchmark (read): cached against uncached response time for the home page, no Lighthouse score
Benchmark historyget_benchmark_history (read): past runs plus settings changes on the same timeline
SchedulingThe Hub does not schedule PageSpeed tests itself; its daily pass only reads reports the plugin already stored
Where a new test is storedIn the Hub's own report history, the one the Hub dashboard shows
06

Rules worth keeping

  • Check the history first. Ask for stored scores before starting a test, and run a new one only when you want a fresh measurement or something changed.
  • Never answer a PageSpeed or Lighthouse question with run_benchmark. It times your own cache and carries no score.
  • run_speed_test changes nothing on your site, but the Hub classes it a write because it spends a shared allowance. A connection token with Read-only everywhere on, or a Viewer sign-in, refuses it. An OAuth sign-in gets the scopes the client asks for, so there your client's approval prompt is the gate.
  • Lab scores move a few points between runs of the same page. The agent should compare like with like, same site, same strategy, and not report one run's difference as a trend.
  • A new test does not run on a timer. If you want a regular test, the agent has to be started by something else, such as a scheduled job in your client, and a scheduled run that spends the allowance should be one you are comfortable leaving unattended.

Good to know with OpenClaw

Do not let the schedule run run_speed_test. An automation runs unattended in a fresh session, nobody is there to approve it, each run spends the shared speed-test allowance, and the Hub has no confirmation step to catch a loop. Limit the automation to a tool allowlist that names only list_sites and get_score_history, and connect OpenClaw read-only to the Hub, with the connection token and Read-only everywhere on or a Viewer sign-in. A read-only connection refuses every write tool, so the job can read history and benchmarks and cannot start a test even if its prompt drifts. OpenClaw prompts per call only when the Codex runtime runs your turns and the server is set to prompt, and the default posture does not prompt.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Using xSpeed Hub, what is the mobile PageSpeed score for shop? Check the stored history before you run anything.
Prompt
Use xSpeed Hub to run a new mobile PageSpeed test on blog and tell me the score, LCP and the top opportunities.
Prompt
With xSpeed Hub, test shop on desktop and mobile and tell me which one is worse.
Prompt
Using xSpeed Hub, has the PageSpeed score on docs improved over the last few runs?
Prompt
Use xSpeed Hub to benchmark the cache on every site and tell me which one saves the least time.
Prompt
Did turning on minification on shop help? Use xSpeed Hub to compare the benchmark history around that change.
Prompt
My PageSpeed test failed on staging. Use xSpeed Hub to tell me why.
08

Frequently asked questions

No. The Hub has no scheduler for agent prompts and does not run scheduled PageSpeed tests. It re-checks sites and pulls stored reports each day, and OpenClaw's own automation decides when to call the Hub. A scheduled read of get_score_history is the report-only way to use it.

It can show a drop in the stored history, which is what the plugin stored on each site. A run_speed_test you started is saved in the Hub's own report history instead. If nothing new was measured that week, the report will say there is no new run rather than show an old number as fresh.

run_speed_test runs a real PageSpeed Insights audit and returns a Lighthouse score with Core Web Vitals. run_benchmark measures how fast your own cache answers compared with an uncached request for the home page, and returns no Lighthouse score. Use the first for "what is my PageSpeed score" and the second for "is my caching working".

A single run can take up to about 2 minutes, so the agent should tell you it has started before it calls. One call tests one device, mobile or desktop, so checking both takes two calls.

Yes. get_score_history reads the stored PageSpeed Insights and GTmetrix runs for the site and starts nothing. The Hub tells the agent to read it first whenever you ask what your score is, because a new test spends a shared allowance.

No. The Hub does not schedule PageSpeed tests itself. Its daily pass re-verifies sites, snapshots cache status and pulls the PageSpeed and GTmetrix reports the plugin has already stored, and it can alert on a score regression. If you want regular new tests, they have to be started by a client that can run scheduled jobs.

It does not change your site. The Hub classes run_speed_test as a write because it spends a shared PageSpeed allowance and stores a report, and a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) should not be able to cost the owner anything. Such a connection can still read stored scores with get_score_history.

09

Keep going

Track PageSpeed scores with other agents

More with OpenClaw

Documentation

From the blog

Track PageSpeed scores, from OpenClaw.

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