# Run and track PageSpeed tests with ChatGPT

> Tracking PageSpeed scores with ChatGPT means asking it in chat for your stored scores and, when needed, a fresh test, using an xSpeed Hub connection you set up in ChatGPT as an app.

Page: https://xspeedcache.com/agent/chatgpt/pagespeed-tests/
Last updated: October 2026

You open ChatGPT with a simple question: is my store faster or slower than it was a few weeks ago? With xSpeed Hub connected, ChatGPT calls get_score_history for the site and answers from the stored runs, with the score, LCP, FCP, CLS, TBT, Speed Index and TTFB for mobile and desktop. It is a good place to ask follow-ups, such as which metric is dragging mobile down or whether desktop looks healthy.

A new measurement is a separate step. run_speed_test starts a PageSpeed Insights run from the Hub, mobile or desktop, and takes up to about two minutes. The Hub classes it a write because it spends the shared speed-test allowance, even though it leaves the site alone. ChatGPT is stricter than that: it treats any tool without a read-only marker as a write action, and the Hub declares none, so expect a confirmation for get_score_history as well. If you only want to know whether the cache is doing its job, run_benchmark times the home page cached and uncached, and the Hub classes it a read. It carries no Lighthouse score, so do not expect one from it.

ChatGPT is also where you can ask for a rewrite. Hand it the figures and ask for a short note for a manager, then tell it to keep the numbers exact. Say which site and which device each figure belongs to, so the summary does not blur mobile and desktop together. A test you start here is saved in the Hub's own report history, on the Reports tab, and get_score_history reads the runs the plugin stored on the site, so the new one may not appear in it. One call tests one device, so mobile and desktop need two calls.

## Set up ChatGPT once

### 1. Put 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.

### 2. Turn on developer mode

In ChatGPT on the web, open Settings, then Security and login, and turn on Developer mode. On a Business workspace only admins and owners can use it. On Enterprise and Edu an admin grants access first, and you then turn it on under Settings, Apps, Advanced settings.

```
Settings  >  Security and login  >  Developer mode
```

### 3. Create the app from the Hub URL

Open ChatGPT Plugins, select the plus button and create a developer-mode app. Name it xspeedhub, paste the MCP server URL and choose OAuth. Click Scan Tools, approve access on the xSpeed Hub page that opens, wait for the scan to list the tools, then click Create. Workspace admins can also start from Workspace settings, Apps, Create.

```
https://app.xspeedcache.com/xspeed/mcp
```

### 4. Select the app in a chat

The app appears under Drafts in your app settings with a Dev label. In a new chat, open the plus menu in the composer, choose Developer mode and select xspeedhub. In a workspace, only an admin or owner can publish the app for other members.

```
+  >  Developer mode  >  xspeedhub
```

Full setup: https://xspeedcache.com/agent/chatgpt/

### 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. ChatGPT asks you to confirm write actions by default. You can expand a tool call to read the JSON it will send, and you can choose to remember an approve or deny choice for a tool for the rest of that conversation. ChatGPT respects a tool's read-only annotation and treats a tool without one as a write action; xSpeed Hub's tool definitions do not declare that annotation today, so expect confirmations on reads as well. OpenAI says confirmation also depends on app permissions and context, and some especially risky actions can be blocked. xSpeed Hub has no confirmation step of its own, so once you tell ChatGPT to remember Approve for a tool, that tool runs without a prompt for the rest of the conversation, as soon as your connection allows writes.

## Prompts

- Using xSpeed Hub, what is the latest PageSpeed score for my shop site on mobile and desktop, and when was each measured?
- Use xSpeed Hub to run a mobile test on shop and explain in plain English which metric is the weak point.
- With xSpeed Hub, compare cached and uncached response time on blog, and tell me whether that explains a slow score.

## Example session

```
You: Using xSpeed Hub, is the shop faster than it was last month?
  → get_score_history(site: shop) [read-only]: 5 stored runs; desktop 77 to 82, mobile 55 to 57 over four weeks; newest run 9 days ago
Agent: Desktop is up five points and mobile up two, so it is a small gain rather than a big one. The newest run is nine days old. I can start a fresh mobile test. It takes up to two minutes and counts against a shared allowance. Start it?
You: Yes, mobile.
  → run_speed_test(site: shop, strategy: mobile) [uses quota]: mobile score 58, LCP 3.6 s, CLS 0.04, saved to the Hub report history
Agent: Mobile is 58, a point above the last stored run. LCP is still the largest gap.
```

## How it works

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.

## Reference

| | |
| --- | --- |
| Read stored scores | get_score_history (read): PageSpeed Insights and GTmetrix runs, starts nothing |
| Metrics per run | Score, LCP, FCP, CLS, TBT, Speed Index, TTFB, for mobile and desktop |
| Run a new test | run_speed_test (write, uses the shared allowance): one PageSpeed Insights run per call |
| strategy | mobile (default) or desktop |
| Duration | Up to about 2 minutes per run |
| Why a test is a write | It spends a shared PageSpeed allowance and stores a report; it changes nothing on the site |
| Read-only access | A 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 |
| Benchmark | run_benchmark (read): cached against uncached response time for the home page, no Lighthouse score |
| Benchmark history | get_benchmark_history (read): past runs plus settings changes on the same timeline |
| Scheduling | The Hub does not schedule PageSpeed tests itself; its daily pass only reads reports the plugin already stored |
| Where a new test is stored | In the Hub's own report history, the one the Hub dashboard shows |

## Rules

- 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 ChatGPT

ChatGPT asks you to confirm write actions, and it treats a tool without a read-only marker as a write. The Hub declares no such marker on any tool, so expect a confirmation for get_score_history and run_benchmark as well as run_speed_test. You can open a call to read the JSON it will send, and you can tell ChatGPT to remember Approve for a tool for the rest of a conversation. After that, run_speed_test runs without a prompt in that conversation, because the Hub has no confirmation step of its own. Which write actions an app can take depends on your plan: OpenAI describes full write support as a beta for Business, Enterprise and Edu and says Pro connects with read access, so a missing run_speed_test is likely a plan limit. ChatGPT signs in with OAuth and gets the scopes it asks for, and the Hub's Read-only everywhere switch applies only to the connection token, which ChatGPT cannot send. For read-only access, sign in as a Viewer member of the workspace, or keep ChatGPT's own confirmations on. Custom apps work on the web only, and agent mode does not use them.

## More prompts for this job

They work in any client connected to xSpeed Hub.

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

## Frequently asked questions

### Can ChatGPT read my PageSpeed history without starting a test?

Yes. get_score_history returns the runs already stored and starts nothing, so it is the safe first question. ChatGPT only needs run_speed_test when you want a new measurement or the stored runs are out of date.

### Does ChatGPT ask before it reads my PageSpeed scores?

Usually yes. ChatGPT treats a tool without a read-only marker as a write action, and the Hub declares no such marker on any tool, so reads such as get_score_history can ask for confirmation too. Separately, the Hub classes run_speed_test as a write because it spends the shared speed-test allowance, and a Viewer member's sign-in, which is always read-only, refuses it outright.

### What is the difference between run_speed_test and run_benchmark?

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".

### How long does a PageSpeed test take?

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.

### Can I ask for the last score without running a new test?

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.

### Will the Hub run PageSpeed tests on a schedule?

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.

### Why is a speed test treated as a write tool?

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.

## Track PageSpeed scores with other agents

[Claude Code](https://xspeedcache.com/agent/claude-code/pagespeed-tests/) · [Claude](https://xspeedcache.com/agent/claude/pagespeed-tests/) · [Claude Cowork](https://xspeedcache.com/agent/claude-cowork/pagespeed-tests/) · [Codex](https://xspeedcache.com/agent/codex/pagespeed-tests/) · [Cursor](https://xspeedcache.com/agent/cursor/pagespeed-tests/) · [GitHub Copilot in VS Code](https://xspeedcache.com/agent/github-copilot/pagespeed-tests/) · [Windsurf](https://xspeedcache.com/agent/windsurf/pagespeed-tests/) · [Gemini CLI](https://xspeedcache.com/agent/gemini-cli/pagespeed-tests/) · [Antigravity](https://xspeedcache.com/agent/antigravity/pagespeed-tests/) · [Zed](https://xspeedcache.com/agent/zed/pagespeed-tests/) · [Kiro](https://xspeedcache.com/agent/kiro/pagespeed-tests/) · [OpenCode](https://xspeedcache.com/agent/opencode/pagespeed-tests/) · [OpenClaw](https://xspeedcache.com/agent/openclaw/pagespeed-tests/) · [Hermes Agent](https://xspeedcache.com/agent/hermes-agent/pagespeed-tests/) · [Grok Build](https://xspeedcache.com/agent/grok-build/pagespeed-tests/) · [ChatGPT dots](https://xspeedcache.com/agent/chatgpt-dots/pagespeed-tests/) · [Grok](https://xspeedcache.com/agent/grok/pagespeed-tests/) · [Grok Bot](https://xspeedcache.com/agent/grok-bot/pagespeed-tests/) · [Muse](https://xspeedcache.com/agent/muse/pagespeed-tests/) · [Manus](https://xspeedcache.com/agent/manus/pagespeed-tests/) · [Kimi Code](https://xspeedcache.com/agent/kimi/pagespeed-tests/) · [Paperclip](https://xspeedcache.com/agent/paperclip/pagespeed-tests/) · [NanoClaw](https://xspeedcache.com/agent/nanoclaw/pagespeed-tests/)

## More with ChatGPT

- [Purge the WordPress cache with ChatGPT](https://xspeedcache.com/agent/chatgpt/purge-cache/)
- [Find out why WordPress pages are not cached with ChatGPT](https://xspeedcache.com/agent/chatgpt/troubleshoot-cache/)
- [Scan a website for speed problems with ChatGPT](https://xspeedcache.com/agent/chatgpt/speed-scan/)
- [Raise a WordPress site's PageSpeed score with ChatGPT](https://xspeedcache.com/agent/chatgpt/optimize-site/)
- [Tune WordPress cache settings with ChatGPT](https://xspeedcache.com/agent/chatgpt/cache-settings/)
- [Warm the WordPress cache with ChatGPT](https://xspeedcache.com/agent/chatgpt/preload-cache/)
- [Set up the Redis object cache with ChatGPT](https://xspeedcache.com/agent/chatgpt/object-cache/)
- [Manage Cloudflare caching with ChatGPT](https://xspeedcache.com/agent/chatgpt/cloudflare/)
- [Manage every WordPress site at once with ChatGPT](https://xspeedcache.com/agent/chatgpt/fleet/)

## Documentation

- How to run a speed test: https://xspeedcache.com/docs/external-score/
- PageSpeed Insights integration: https://xspeedcache.com/docs/pagespeed-insights-integration/
- Running speed tests in xSpeed Hub: https://xspeedcache.com/docs/hub-speed-tests-and-notifications/
- How to run a PageSpeed audit: https://xspeedcache.com/docs/pagespeed/
