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

> ## Agent Instructions
> Use the public API base URL: https://api.teamfollowup.ai/api.
> Authenticate public API requests with Authorization: Bearer YOUR_API_KEY.
> Use product-owned terms: agents, campaigns, projects (GoHighLevel sub-accounts), contacts, calls, outcomes, skills, cadences, phone numbers.
> Scope requests by locationId rather than projectName.
> Read the guide linked from each API reference group before recommending an endpoint.

# Clone an agent

> Copy a working campaign into another sub-account, or into the same one under a different trigger tag, and choose whether the copy shares the voice agent or gets its own.

The script that books for one roofing client will probably book for the next.
**Clone** copies a campaign, and optionally its agent, so you start from what
works. The copy is yours to change. If you need twenty copies that must stay
identical, use a [Master Agent](/master-agent/overview) instead.

## Prerequisites

* The `id` of the agent whose campaign you are copying.
* The `locationId` of the target project. It can be the same project. See
  [Agencies, projects and sub-accounts](/concepts/projects).
* The target project is connected. A `disconnected` project cannot receive a
  campaign.
* An API key with `agents:write`.

## Step 1: Choose what to copy

| `mode`       | What you get                                                                                                    | Choose it when                                                                                                          |
| ------------ | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `campaign`   | A new campaign with a copy of the workflow, driven by the **same** voice agent as the source.                   | You want the same agent working a second trigger tag or a second sub-account. Editing the agent changes both campaigns. |
| `everything` | A new campaign, a copy of the workflow, and a **new** voice agent cloned from the source agent's configuration. | You want an independent copy you can edit without touching the original.                                                |

Pick `everything` when in doubt. It costs nothing extra and keeps the two
clients' agents apart.

## Step 2: Pick the trigger tags

`activeTags` sets the trigger for the clone. One rule decides them: a tag
drives one campaign per sub-account.

* Cloning into a **different** sub-account: the same tags are fine, and
  usually what you want.
* Cloning into the **same** sub-account: use different tags, or the two
  campaigns would compete for the same contacts.

## Step 3: Clone

Call [Clone agent](/api-reference/agents/clone-agent):

```http theme={"dark"}
POST /api/agent-builder/agents/{id}/clone
```

```json theme={"dark"}
{
  "targetLocationId": "loc_xyz789",
  "mode": "everything",
  "name": "Roofing Follow Up (Acme West)",
  "activeTags": ["new_lead"]
}
```

The response carries the `mode` applied, the new `campaignId`, the `agentId`
that owns it, and the full `agent` and `campaign` records. In `campaign` mode
the `agentId` is the source agent's. In `everything` mode it is the new
agent's.

The request accepts an `Idempotency-Key` header. Send one, and a retry after a
timeout returns the same clone instead of a second one.

## Step 4: Re-point what does not travel

A copy is not a twin. Three things are per sub-account and need your
attention before the clone goes live.

* **Phone numbers.** The clone's `fromNumbers` is empty. Assign or buy one.
  See [Phone numbers and caller ID](/phone-numbers/overview).
* **Calendars, tags and fields.** Ids are per sub-account, so a booking skill
  pointing at the source's calendar, or a workflow node moving to the source's
  pipeline stage, has to be re-pointed at the target's. Look them up with
  [GoHighLevel resources](/ghl/overview).
* **Live state.** The clone starts paused. Test it, then set `active: true`.

## Next steps

* [Test your agent](/agents/test-your-agent) before the first lead does.
* [Go live](/campaigns/going-live) for the three things a campaign needs.
* [Master Agent](/master-agent/overview) when copies must stay in step.
