> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetdarwin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Run opening tests with your own AI assistant

> Let Claude, ChatGPT, Cursor or your own code choose what to test on which page, write the openings and read the results, while Darwin scores every test.

Let Claude, ChatGPT, Cursor or your own code decide what to test on which page, write the openings and read the results, while Darwin shows each visitor one opening and scores them all on visitors who reach booking.

**You need:** an assistant connected to Darwin with **Full access** (see [MCP server](https://docs.meetdarwin.ai/api-reference/mcp.md)), or a key with `experiments:write` and `agent:write`.

**1. Leave new tests to your assistant**

Ask your assistant to *"stop Darwin starting tests on its own"* (`set_test_automation`), or switch off **Darwin starts new tests** in [Experiments → Settings](https://www.meetdarwin.ai/help/experiments/automatic-testing). Keep **Run tests automatically** on: it is what scores the tests. With the API: `PATCH /v1/agent` with `{"automation": {"auto_launch": false}}`.

**2. Look before you test**

*"What does our pricing page say first?"* uses `get_page_opening`, which answers with the opening, whether a test is already running there, and whether it is the page's own opening or the site's. `GET /v1/analytics` has each page's visitors and meetings, for choosing where to test.

**3. Start a test**

*"Test an opening on /pricing that asks for their team size first."* The assistant writes the openings and calls `create_experiment`. With the API:

```bash theme={null}
curl https://api.meetdarwin.ai/v1/experiments \
  -H "Authorization: Bearer $DARWIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pricing: ask the team size",
    "page": "/pricing",
    "openings": [
      { "headline": "How many people would use it? I will show you the plan that fits.",
        "buttons": [{ "label": "Under 10" }, { "label": "10 to 50" }, { "label": "Over 50" }] }
    ]
  }'
```

Darwin adds the opening the page shows now as the current one, so your openings are compared with what visitors see today. Test a whole page type with `"unit": "type:pricing"`, a page group with `"unit": "group:…"`, or every page on the site's opening with `"unit": "site"`. One test per page at a time.

**4. Read the results**

*"How is the pricing test doing?"* uses `get_experiment`: each opening's views, conversations, visitors who reached booking, meetings, chance to beat the current opening and share of visitors, a sentence on where the test stands, and what a new opening still needs before it can be applied. `GET /v1/experiments/exp_…` returns the same under `live`. Reading results saves nothing.

**5. Change, apply or stop**

`edit_opening` and `remove_opening` change a running test; new words start as a fresh opening. `apply_winner` makes the winner the page's opening once it has the evidence Darwin requires; `stop_experiment` ends a test without one. To change a page's opening without a test, use `set_page_opening` (a page, or a section such as `/blog/*`), which is refused while a test runs on that page.

Tests your assistant starts appear in Experiments like any other, marked as written through the API or by an AI assistant, and the `experiment.started` and `experiment.winner_found` [webhooks](https://docs.meetdarwin.ai/api-reference/webhooks.md) fire for them.

**It worked if** `get_page_opening` for the page shows `source: test` with your test's id, and the test appears in Experiments.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.