> For the complete documentation index, see [llms.txt](https://metalbear.com/mirrord/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metalbear.com/mirrord/docs/use-cases/using-mirrord-with-ai/agent-started-trials.md).

# Agent-Started Trials

How an AI coding agent starts a mirrord for Teams trial, and how to claim the organization it creates

Some things an agent needs on a shared cluster only work with mirrord for Teams: branching a database so its writes don't reach everyone else's data, splitting a queue so it doesn't eat messages other people need, or stealing traffic from a target another session already holds.

On a cluster with no license, an agent that follows [metalbear.com/agents.md](https://metalbear.com/agents.md) can start a trial itself rather than stopping and waiting for you to sign up. It ends up with a working cluster and you end up with a link to claim.

### What the agent does

It posts to the signup endpoint. No authentication, no credit card:

```bash
curl -fsS -X POST https://app.metalbear.com/api/v1/agent/signup \
  -H 'content-type: application/json' \
  -d '{"agent": "claude-code", "developer_email": "you@example.com", "cluster_hint": "staging"}'
```

`developer_email` and `cluster_hint` are optional and unverified. They exist so you can recognize the organization as yours on the claim page.

The response is a **provisional organization** carrying an Enterprise trial license, good for seven days from the signup:

```json
{
  "organization_id": "...",
  "api_key": "...",
  "license_type": "enterprise-trial",
  "trial_ends_at": "2026-09-17T12:00:00+00:00",
  "claim_code": "mbclaim_...",
  "claim_url": "https://app.metalbear.com/claim?code=mbclaim_...",
  "instructions_url": "https://metalbear.com/agents.md"
}
```

The agent installs the Operator with that key as `cloud.apiKey.key` (see [Cloud API key](/mirrord/docs/getting-started/installing-mirrord/operator.md#cloud-api-key)), then gives you the `claim_url`.

Because the trial is an Enterprise license, it also covers the features a Team license doesn't, including [Preview Environments](/mirrord/docs/use-cases/preview-environments.md). Those need `operator.previewEnv=true` in the Helm values, which defaults to `false` and can't be turned on after the fact without a `helm upgrade`, so it's worth setting during the agent's install.

### Claiming the organization

Open the claim URL. You can sign in with an existing account or create one on the spot; the link survives either, including the verification mail that account creation sends you. What happens next depends on the account you use.

| You sign in as                                           | Result                                                                                                      |
| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| A new account with no organization                       | A new organization is created for you, keeping the trial's expiry date and everything the agent already did |
| An admin of an existing organization                     | The agent's cloud API key moves into your existing organization                                             |
| A member of an existing organization who is not an admin | Rejected. Ask an admin to open the link                                                                     |

Claiming also deletes the provisional organization, so the cluster keeps working against your real one without reinstalling anything. A new organization inherits the agent's history along with the license, so the getting-started checklist already counts the Operator as installed and your usage shows the sessions the agent ran before you claimed. An organization that already existed keeps its own license, and so its own history.

An existing organization that already holds an active Operator cloud API key will reject the claim rather than replace the key it has. Revoke or rotate the existing key first, under **API Keys**. Read-only keys are a different scope and don't collide, so they can stay.

### Until it is claimed

A provisional organization is not a stuck state for the agent. The trial license works, so the cluster is usable straight away. What is missing is a person:

* **Nobody can administer it.** Billing, seats, and members all need a human owner, and the first person to claim it becomes that owner.
* **It expires with the trial.** An unclaimed organization reaches `trial_ends_at` with nobody able to renew or convert it.

Claim codes are single-use. Once one has been claimed, opening the same link from a different organization fails rather than silently joining it. Reopening it as the same admin who claimed it is harmless.

### If you already have an organization

You don't need any of this. Generate a cloud API key under **API Keys** and give it to the agent, or install the Operator yourself following the [dashboard setup guide](/mirrord/docs/managing-mirrord/admin-dashboard/cloud.md). Signing up again creates a second organization you then have to clean up.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://metalbear.com/mirrord/docs/use-cases/using-mirrord-with-ai/agent-started-trials.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
