> For the complete documentation index, see [llms.txt](https://ce-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ce-docs.keywordrush.com/ai-agents/connect-gemini.md).

# Connect Gemini

Run Content Egg from Gemini with Google Antigravity — the Gemini app itself can't work on your site yet.

**The Gemini app (web, mobile and Mac) can't work on your site yet.** Its Task mode can open and read public pages, but Google doesn't let it send a login to a website's API, so it can't search products or build pages. Gemini's custom connectors don't help either: they accept only OAuth sign-in, and your site uses an application password.

What does work is **Google Antigravity** — Google's agent for your own computer, included with Google AI Pro and Ultra (and usable with a free Google account, with a smaller quota). It runs Gemini models, reads your site's agent guide and calls the WordPress REST API with your application password, the same way Claude and ChatGPT do. These steps use the **Antigravity CLI** (`agy`), the terminal version.

**Before you start,** finish [**Turning on Agent Access**](https://ce-docs.keywordrush.com/ai-agents/turning-on-agent-access.md) so you have your WordPress **username** and an **application password**.

### 1. Install Antigravity and sign in

On macOS or Linux, run this in a terminal:

```bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```

For Windows and other options, see Google's [install page](https://antigravity.google/docs/install?tab=cli). Then start it with `agy`. The first time, it opens your browser so you can sign in with your Google account.

### 2. Give it the guide and your login

Copy your **Agent guide** link from the AI Agents page and start like this:

> Read this guide and follow it when working on my site: `https://YOUR-SITE.com/wp-json/content-egg/v1/agent-guide` My WordPress username is `USERNAME` and the application password is `xxxx xxxx xxxx xxxx xxxx xxxx`.
>
> **Using Content Egg, show my active modules and search Amazon for wireless earbuds.**

Antigravity asks before it runs each command. Allow the `curl` requests to your site, and it comes back with your active modules and a few products. See [**Example prompts & workflows**](https://ce-docs.keywordrush.com/ai-agents/prompts-and-workflows.md) for what to ask next.

{% hint style="warning" %}
**Anything you type in a chat stays in that conversation.** Use a dedicated WordPress user rather than your own admin account, and revoke the application password when you're done with it — see [**Where your password ends up**](https://ce-docs.keywordrush.com/ai-agents/safety-and-permissions.md#where-your-password-ends-up).
{% endhint %}

### Run it on a schedule

In the same conversation, type `/schedule` followed by the job and when to run it:

> `/schedule every weekday at 9am, follow the Content Egg agent guide, take the next topic from my list that I haven't covered yet — search my existing posts first — write the article, add a relevant product from Content Egg to each section, and leave it as a draft`

The schedule belongs to that conversation, so it already knows your guide and login. Type `/tasks` to see your schedules or stop one.

{% hint style="warning" %}
**Scheduled jobs run on your computer, not in the cloud** — only while Antigravity is open and your computer is on. If a job must run whatever your computer is doing, use [**ChatGPT**](https://ce-docs.keywordrush.com/ai-agents/connect-chatgpt.md#run-it-on-a-schedule) or [**Claude**](https://ce-docs.keywordrush.com/ai-agents/connect-claude.md#run-it-on-a-schedule), whose scheduled tasks run in the cloud.
{% endhint %}

Nobody is there to approve a command when a scheduled job runs, so let Antigravity run `curl` without asking. Add this to `~/.gemini/antigravity-cli/settings.json` (keep anything already in the file) and restart `agy`:

```json
{
  "permissions": {
    "allow": ["command(curl)"]
  }
}
```

The same advice as for any scheduled job applies: give it a **topic queue** and tell it to check your existing posts first, decide whether it publishes or leaves drafts, and keep the cadence sane — every run spends your affiliate networks' API quota.

### Prefer a permanent connection? (advanced)

Antigravity can also connect over **MCP**, so you don't paste your login into each conversation. You need the free **WordPress MCP Adapter** plugin (see [**Connect Claude**](https://ce-docs.keywordrush.com/ai-agents/connect-claude.md#prefer-a-permanent-connection-advanced) for how to install it).

1. On the AI Agents page, open **Other tools → Make a Basic auth token**, enter your username and application password, and copy the token.
2. Put your site in `~/.gemini/config/mcp_config.json`, with `Basic`, a space and the token in the `Authorization` header:

```json
{
  "mcpServers": {
    "content-egg": {
      "serverUrl": "https://YOUR-SITE.com/wp-json/content-egg/mcp",
      "headers": {
        "Authorization": "Basic YOUR-TOKEN"
      }
    }
  }
}
```

3. Restart `agy` and ask it to list its Content Egg tools.

{% hint style="info" %}
The token goes into the file as is — Antigravity doesn't read it from an environment variable. It stays in a file on your own computer and never enters a conversation, but treat the file like your password.
{% endhint %}

### If something goes wrong

* **"Unauthorized" / 401** — use the **application password**, not your normal login password, and confirm Agent Access is switched on.
* **A scheduled job did nothing** — Antigravity was closed or your computer was asleep at that time, or the job stopped at a command it wasn't allowed to run without asking. Check the `curl` rule above.
* **No Content Egg tools (MCP)** — check that the MCP Adapter plugin is active, that the token in `mcp_config.json` starts with `Basic` and a space, and restart `agy`.
* **Requests blocked, 403 or timeouts** — a firewall or security plugin may be blocking the requests. See [**If writes fail but reads work**](https://ce-docs.keywordrush.com/ai-agents/advanced.md#if-writes-fail-but-reads-work).
* **It can search but can't build or edit** — building and editing require **Content Egg Pro**.
