> ## 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.

# Master Agent

> A master agent is one agent and campaign you build once and run in every client sub-account, with each sub-account's own calendar, pipeline and number resolved for it.

You have twenty roofing clients and one follow-up script that works. Without a
master agent you build it twenty times and fix a typo twenty times. A **master
agent** is that script built once, in a parent campaign, and mirrored into a
child campaign in each sub-account you link. Change the parent, and every child
follows.

In the dashboard this is **master agent mode**. In the API the same thing
appears as a **master campaign**, because the campaign is what gets mirrored.

## Parent and children

* The **parent** is the campaign you edit. It lives in one project and holds
  the agent, prompt, skills, outcomes and campaign settings.
* Each **child** is a campaign in another project, kept in step with the
  parent. Its leads, calls, contacts and phone numbers are its own.
* Campaign reads carry `masterCampaignEnabled`, and a `master` object when it
  is on: `enabled`, the `masterCampaignId`, and `projects[]` with one entry per
  linked project.
* Each entry in `projects[]` names the project (`locationId`, `projectName`),
  its campaign (`campaignId`, `campaignName`), its `role` of `parent` or
  `child`, whether it is `active`, its `dialing`, its `fromNumbers`, and its
  sync state: `status`, `syncVersion` (what the parent is on), `syncedVersion`
  (what this child has applied) and `lastError`. A child has caught up when
  the two versions match.

Leads never cross sub-accounts. A child dials its own project's contacts and
writes to its own project's CRM.

## Bindings

The prompt says "book into the sales calendar" and "move them to Qualified".
In each sub-account those are different ids. A **binding** is how a child
resolves them.

* When you link a sub-account, each asset the parent uses is looked up **by
  name** in that sub-account: the booking calendar, the human callback
  calendar, the transfer number, and the pipeline and stage a move-stage step
  points at.
* The match is stored on the child and preserved. Renaming the calendar in
  the parent later does not re-point the child.
* The child's `bindingScanStatus` reads `ready` when every asset resolved.
  `bindingScanMatchedCount` and `bindingScanMissingCount` say how many did and
  did not, and `bindingScanError` carries the reason when the scan itself
  failed. A child cannot go live until the status is `ready`. When something is
  missing, create the asset in that sub-account or pick one by hand, then
  rescan from the dashboard. The `rescan` object on `master` reports the last
  rescan as `rescanned`, `failed` and `errors[]`.

See [GoHighLevel resources](/ghl/overview) for why ids are per sub-account.

## What syncs and what does not

| Follows the parent                        | Stays with the child                          |
| ----------------------------------------- | --------------------------------------------- |
| Prompt, begin message and voice           | Phone numbers and caller ID                   |
| Skills and outcome definitions            | Calling window and timezone settings          |
| Campaign type, capabilities and `dialing` | Contacts, calls and analytics                 |
| Workflow branches, with bound ids swapped | Live status. Each child goes live on its own. |

## Reading results across children

Every child has its own `campaignId`. To see the whole programme at once,
filter [analytics](/analytics/overview) and [contacts](/contacts/overview) by
`masterCampaignId` instead. It is mutually exclusive with `campaignId`, since
one is the sum of the others.

## Boundaries

* Switch master agent mode on with `masterCampaignEnabled: true` on the
  campaign, when you create the agent or with Update campaign. Linking
  sub-accounts and rescanning bindings are dashboard operations today. The API
  does not yet expose them.
* Switching it off is not yet available. Plan the parent before you link.
* A master campaign can be [split tested](/split-testing/overview). Run the
  split from the parent; each child applies the same weights to its own leads.
  Converting or adding a variant through a child returns `409`.
* Each child still needs its own project to be connected, its bindings ready
  and a caller ID before it can go live.

## In the API

* [Update campaign](/api-reference/agents/update-campaign) sets
  `masterCampaignEnabled`
* [Get agent](/api-reference/agents/get-agent) shows `master` on the campaign
* [Get analytics summary](/api-reference/analytics/get-analytics-summary) with
  `masterCampaignId`
* [List contacts](/api-reference/contacts/list-contacts) with
  `masterCampaignId`
* [Clone agent](/api-reference/agents/clone-agent) is the one-off alternative:
  a copy that does not stay in step
* Every field above is defined in the [Glossary](/glossary#master-agent)

## Related

* [Clone an agent](/agents/clone-an-agent) when you want a copy you can then
  change freely.
* [Agencies, projects and sub-accounts](/concepts/projects) explains the
  project model the children live in.
