Antigravity + xCloud

Speed up a slow site with Antigravity on xCloud

Speeding up a slow site with Antigravity means asking Google's agentic IDE to investigate a slow site through xCloud, and getting back a cause with numbers and a clear split between what the agent can do and what you switch in the dashboard.

  • Skill: xcloud:performance
  • Toolsets: pagespeed, sites, servers, broken-links
  • Free with every xCloud account

YouUse xCloud to work out why shop.example.com is slow.

sites_cacheSettingsread-only

sites_wordpress_statusread-only

AgentTwo fixes are yours to make in the dashboard: turn on page cache under Site, WordPress, Caching, and move the site to a newer PHP version under Site, Site Settings. The one thing I can do is purge the caches afterwards, and I will ask first.

YouGood, I will switch both and ping you.

. Keep a human in the loop: xCloud stops and asks before anything that creates, deploys, updates, reboots, deletes or buys.

Setup

How Do You Set Up Antigravity to Speed up a slow site on xCloud?

Connect Antigravity once; every job on this account uses the same connection. Then ask in plain words.

  1. Add xCloud in View raw config

    In the Antigravity IDE, click the three dots at the top of the agent side panel, choose MCP Servers, then Manage MCP Servers, then View raw config. Paste this into mcp_config.json and save. The field is serverUrl: it is the only remote URL property in Antigravity's documented configuration, so do not write url or httpUrl.

    JSON
    {
      "mcpServers": {
        "xcloud": {
          "serverUrl": "https://app.xcloud.host/mcp"
        }
      }
    }
  2. Sign in, then check the connection

    Open Agent settings (Cmd+, on Mac, Ctrl+, on Windows and Linux), go to Customizations and click Authenticate next to xcloud. Approve the teams and the access level in the browser, copy the authorization code it shows, paste it into the settings panel and click Submit. Then ask this in the agent panel.

    Prompt
    Who am I on xCloud?
  3. No browser sign-in? Use an API key

    Create a token with the mcp:invoke scope plus the read abilities for the areas it will use (read:servers and read:sites, with read:billing and read:addons for billing and add-on tools) and the matching write: abilities if it should change things in Settings, Developers, API Tokens and add it as a header. Replace YOUR_TOKEN with the token, which contains a pipe character, and never paste it into chat. Keep this file out of git.

    JSON
    {
      "mcpServers": {
        "xcloud": {
          "serverUrl": "https://app.xcloud.host/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_TOKEN"
          }
        }
      }
    }
  4. Check it worked

    Then ask Antigravity for the job itself, for example:

    Prompt
    Use xCloud to work out why shop.example.com is slow, and list what you can fix and what I must switch in the dashboard.

In practice

How Does Performance Work from Antigravity?

You are in the Antigravity agent panel, the code of the slow site is open beside it, and you ask: use xCloud to work out why shop.example.com is slow, and tell me what you can fix and what I must switch myself. That second half matters, and it is the shape of this job. The agent resolves the site and its server, reads the status, the monitoring history, the cache settings, the latest PageSpeed result, the access log, the services and the PHP version, then sorts the findings into two lists. Things it can do, with your agreement, such as purge a cache. Things only the dashboard can flip, such as turning on page cache or Redis under Site, WordPress, Caching, or moving one site to a newer PHP version under Site, Site Settings.

Antigravity adds its own approval layer. Tools you have not allowed run in Ask mode, so the first time the agent calls an xCloud read you approve it, and each purge or scan is a separate decision. xCloud adds its own stop for anything that creates, deploys, updates, reboots, deletes or buys, though a cache purge and a PageSpeed scan are routine and run without an xCloud prompt. So the agent is the one that should ask first on a live site, and Antigravity's Ask mode is the check that makes sure it does. A scan spends one PageSpeed run, so the agent reads the latest completed result first and only starts a new one when none exists or the site changed.

The agent can also stay honest about slowness versus failure. If the site returns errors rather than loading slowly, the right move is the troubleshooting job, and if a deploy failed, it is the deploy job. Ask the performance question when pages load but take too long. The numbers decide the rest, and when they look normal the agent reports that rather than blaming your theme.

Antigravity specific: Antigravity's permission policy can allow tools with patterns such as mcp(xcloud/tool_name). Allow the read tools one by one for this job. A wildcard like mcp(xcloud/*) would also skip the prompt for the cache purge and the PageSpeed scan, which are the two calls in this job that should still ask. Remember that OAuth ends with a pasted authorization code in Settings, Customizations, so if the first read fails, check that sign-in finished.

What xCloud does for performance

xCloud reads the site's and the server's CPU, RAM and disk samples, which cache layers are on, the latest PageSpeed result, traffic in the access log, service health and the site's PHP version. The agent names the cause from that data, then hands you the switches that only the dashboard can flip.

  1. Resolve the site and its server. The agent looks up the site and the server it runs on, because the answer often comes from both. A slow site is frequently slow because a neighbour on the same server is.
  2. Check status and monitoring history. A site that is mid-deploy or failed explains slowness without any measurement. Otherwise the agent reads the site's and the server's samples, and a 24-hour or 7-day series to tell whether the slowdown is new. Disk comes early: a nearly full disk slows everything, the database first.
  3. Read the cache layers. The agent reads the cache settings before saying anything about caching: whether page cache, Redis or Object Cache Pro object cache and Cloudflare edge cache are on, and which server stack the site runs. It never reports that no cache configuration is readable without calling it.
  4. Read PageSpeed and traffic. The latest completed PageSpeed run is free to read. A new scan is worth starting only when there is no result or the site changed since, and the agent tells you it is spending a scan. The access log shows spikes, a crawl or one client hammering a path.
  5. Check services and PHP. The agent checks that PHP, the web server, Redis and the database are running, and reads the site's PHP version and pending updates. A stopped Redis next to an object cache that reads as on is a found answer.
  6. Name the cause and hand off. You get the most likely cause with its numbers. The fix is either something the agent can do, such as a purge after you agree, or a dashboard switch it names with the path and the site's dashboard link. If every number looks normal, it says so instead of inventing a cause.

Reference

Performance Settings and Limits on xCloud

The facts Antigravity works within when it speeds up a slow site. Where a row names the dashboard, that step stays yours to take there.

Setting or limitWhat applies
Monitoring historySite and server CPU, RAM and disk samples as a 24-hour or 7-day series. History is not available on the free plan, and the agent says that is a plan limit rather than reporting no data
Cache stateRead through sites.cacheSettings: page cache, object cache (Redis, Object Cache Pro) and Cloudflare edge cache. It returns settings only, never cache contents
Enabling a cache layerDashboard-only: Site, WordPress, Caching. The API reads the layers and purges them, and cannot switch one on for an existing site
Page cache detailsCache duration, URL and cookie exclusions and ignored query parameters are dashboard-only and are not returned by the cache settings read
PageSpeedThe latest mobile and desktop results and the history are read for free. One scan runs both strategies
Scan conflictsA 409 while a scan is running means it is still pending or scanning. The agent polls it instead of starting another, and it is not a cooldown
Cache purgePurging runs without a confirmation stop but throws away a warm cache, so the agent asks first on a live site and reports each layer as queued or skipped
TrafficThe access log shows spikes and bots. It is read over SSH, so the agent asks for a bounded window
PHP versionRead from the site's status. Changing one site's PHP version is a dashboard step: Site, Site Settings
Server PHP defaultChanging the server default PHP changes only the command-line php and the version new sites get. It does not move any existing site
Broken linksA broken-link scan on a WordPress site returns findings grouped by source page, and a truncated scan is reported as partial

Rules Antigravity has to follow

  • The agent diagnoses from measurements, not guesses, and it calls the cache settings read before it says anything about caching.
  • It never offers to turn on Redis or any other cache layer itself. Enabling a layer is a dashboard step, and the agent gives you the path and the dashboard link.
  • It never presents a change of server PHP default as a substitute for changing one site's PHP version.
  • A cache purge on a live site, a new PageSpeed scan and any server-level PHP change are announced first. Server-level changes also need your explicit yes.
  • A site that errors rather than loads slowly goes to troubleshooting, and a failed deploy goes to deploy.

Example prompts

What Can You Ask Antigravity to Do for Performance?

Type these as written and swap in your own repository, site and server names. Reads and routine actions such as backups, cache purges, PageSpeed scans and vulnerability scans run straight away; creating, deploying, updating, rebooting, deleting, buying or starting a broken-link scan stops and asks first.

Prompt
Use xCloud to work out why shop.example.com is slow, and list what you can fix and what I must switch in the dashboard.
Prompt
Run a PageSpeed scan on shop.example.com only if the latest result is older than my last deploy, and tell me before you spend it.
Prompt
Scan the nginx access log of shop.example.com for a bot hammering one path, last 200 lines only.
Prompt
Why is shop.example.com slow? Check the cache, the server load and the latest PageSpeed result.
Prompt
Is Redis object cache on for the shop site? If it is off, tell me where to switch it on.
Prompt
Show CPU, RAM and disk for the shop site over the last 24 hours and tell me whether the slowdown is new.
Prompt
Run a PageSpeed scan on the shop site and compare the score with the previous scans.
Prompt
Look at the access log of the shop site for a traffic spike or a bot hammering one path.
Prompt
Which PHP version is the blog site running, and are there pending updates I should apply?
Prompt
Purge all caches on the shop site.
Prompt
Scan the shop site for broken links and list the pages with the most.

Antigravity and Performance: Frequently Asked Questions

What people ask before they let Antigravity speed up a slow site through xCloud.

Will Antigravity ask before it starts a PageSpeed scan?

Yes, if you have not allowed that tool. Antigravity runs unconfigured MCP tools in Ask mode, and the agent also tells you it is spending a scan. A scan is only worth starting when there is no recent result or the site has changed.

Can Antigravity change my site's PHP version to speed it up?

No. Changing one site's PHP version is a dashboard step under Site, Site Settings. Antigravity can read the version and tell you if it is old, and it will not offer a server-level PHP default change as a substitute, because that does not move an existing site.

Can the agent turn on caching for my slow site?

No. It can read which cache layers are on and purge them, but switching page cache, Redis object cache or Cloudflare edge cache on for an existing site is a dashboard step under Site, WordPress, Caching. The agent tells you the path and gives you the site's dashboard link.

What does a 409 mean when the agent starts a PageSpeed scan?

It means a scan for that site is still pending or running. The agent polls the existing scan instead of starting another, and it is not a cooldown period. A new scan is only worth starting when there is no recent result or the site has changed.

Will changing the server's PHP default speed up my site?

No. The server default changes only the command-line php and the version new sites get, and it does not move any existing site. The PHP version of one site is changed in the dashboard under Site, Site Settings.

Why does the agent say monitoring history is unavailable?

Monitoring history is a paid-plan feature, so on the free plan the request is refused as a plan limit. The agent reports it that way rather than saying there is no data, and it falls back to the samples and measurements the plan does include.

Does purging the cache ask for my confirmation?

xCloud itself runs a purge without a confirmation stop, because it is a routine action. The agent still asks you first on a live site, since a purge throws away a warm cache and the next visitors wait while it rebuilds.

Other agents

Performance with Other Agents

The same job, the same xCloud tools, a guide for each client.

Run Your Hosting from Antigravity

xCloud MCP, the Agent Skills and the Public API are free with every account. Connect once and ask.