# Update an experiment

> Start, finish or drop an experiment, or link a scheduled or posted post to it so its numbers count (schedule the post first, then link it here with its id, or with the tweet id once it's out). Also: put a linked post in group A or B (group), unlink a post linked by mistake, edit the title or hypothesis, or change the design while the experiment is still proposed.

`mentor.update_experiment` · write

- **MCP tool:** `update_experiment`. Loaded by default in MCP clients.
- **REST:** `POST /v1/mentor/update-experiment`
- **CLI:** `xholic mentor update-experiment`
- **Scope:** `write`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `write`

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `experimentId` | string (uuid) | Yes |  |
| `status` | "RUNNING" \\| "DONE" \\| "DROPPED" | No |  |
| `scheduledPostId` | string ≤ 100 chars | No | A queued post id from schedule_post. |
| `tweetId` | string | No | The X post id. |
| `group` | "a" \\| "b" | No | For a designed A vs B test: which group the linked post belongs to (default a). |
| `unlinkScheduledPostId` | string ≤ 100 chars | No | Unlink this queued post from the experiment. |
| `unlinkTweetId` | string | No | Unlink this posted tweet from the experiment. |
| `title` | string ≤ 160 chars | No |  |
| `hypothesis` | string ≤ 500 chars | No |  |
| `design` | object | No | Replace the design; only while the experiment is proposed. |
| `design.metric` | "impressions" \\| "replies" \\| "bookmarks" \\| "engagement" \\| "profile_clicks" \\| "follows" | Yes | What decides the test. |
| `design.groupA` | object | Yes | The posts being tested. |
| `design.groupA.label` | string ≤ 80 chars | Yes | What makes this group different, e.g. 'with a screenshot' or 'posted 8–9 pm'. |
| `design.groupA.format` | "relatable_scene" \\| "one_liner" \\| "contrast_pair" \\| "hot_take" \\| "contrarian_reframe" \\| "personal_story" \\| "proof_numbers" \\| "build_update" \\| "list_playbook" \\| "framework" \\| "question" \\| "observation" \\| "trend_reaction" \\| "ironic_humor" \\| "advice" \\| "motivation" \\| "networking" \\| "promotion" \\| "other" | No | The post format this group uses, if the test is about format. |
| `design.groupB` | object | No | For an A vs B test: the other group. Then compareTo is group_b. |
| `design.groupB.label` | string ≤ 80 chars | Yes | What makes this group different, e.g. 'with a screenshot' or 'posted 8–9 pm'. |
| `design.groupB.format` | "relatable_scene" \\| "one_liner" \\| "contrast_pair" \\| "hot_take" \\| "contrarian_reframe" \\| "personal_story" \\| "proof_numbers" \\| "build_update" \\| "list_playbook" \\| "framework" \\| "question" \\| "observation" \\| "trend_reaction" \\| "ironic_humor" \\| "advice" \\| "motivation" \\| "networking" \\| "promotion" \\| "other" | No | The post format this group uses, if the test is about format. |
| `design.compareTo` | object | No | What group A is judged against: own_median (this account's median over the last N days before the test), group_b, format (this account's posts in one format) or period (a date range). Default: `{"kind":"own_median","days":30}`. |
| `design.minPosts` | integer 2–20 | No | Posts per group before it's judged. Default: `3`. |
| `design.winAt` | number 1.05–10 | No | Worked when group A's median is at least this many times the comparison. Default: `1.2`. |
| `design.loseAt` | number 0.1–0.95 | No | Didn't work at or below this multiple. Default: `0.8`. |
| `design.settleHours` | 24 or 48 or 72 | No | How long a post runs before its number counts. Default: `48`. |
| `design.endsAt` | string | No | Judge on this date with whatever has settled, even if fewer posts than minPosts. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `note` | string ≤ 20000 chars | No | Optional, on any tool: one or two sentences for Xholic's shared memory about what the user just decided, asked for or said about themselves or their plans (e.g. "Dropping threads for now; focusing on replies to founders"). Every AI the user connects reads it, so they never repeat themselves. In your words, never other people's posts. Leave it out when nothing new was said. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `idempotencyKey` | string ≤ 200 chars | No | A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice. |
