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

# Build an Always-On Ad Ops Agent with Claude Cowork

> Set up a Claude Cowork project that builds, verifies, and optimizes your ad campaigns on a schedule. The project-instructions, skills, and scheduled-task pattern that powers production ad ops with Adspirer.

[Claude Cowork](/docs/ai-clients/claude-cowork) is Claude's brand-aware workspace mode. Set
up a Cowork **project** for ad ops once and it becomes an always-on co-worker: it builds
campaigns from your briefs, verifies them against your rules, and optimizes the live ones
on a schedule — all through the [Adspirer MCP](/docs/mcp) connector.

The teams who get the most out of this don't just chat with the agent ad hoc. They give
the Cowork project a durable setup with three moving parts:

<CardGroup cols={3}>
  <Card title="Project instructions" icon="scroll">
    The agent's always-on "constitution" — its role, its hard rules, and how it
    works. Read on every task.
  </Card>

  <Card title="Skills" icon="book">
    On-demand playbooks for specific jobs (build a search campaign, optimize a
    portfolio). Loaded only when the task calls for them.
  </Card>

  <Card title="Scheduled tasks" icon="clock">
    Automation. The same Cowork agent, run unattended on a schedule, making bounded,
    guardrailed changes and posting a summary.
  </Card>
</CardGroup>

This guide gives you a copy-paste template for each, plus the safety model that makes
unattended automation trustworthy.

<Note>
  Haven't connected Cowork yet? Start with [Connect Claude
  Cowork](/docs/ai-clients/claude-cowork), then the [Agent Skills
  overview](/docs/agent-skills/overview) and [Core Workflows](/docs/agent-skills/workflows) — then
  come back here to wire them into an always-on setup.
</Note>

## The mental model

A Claude Cowork project has four lanes. Keeping them separate is the most important
setup decision — mixing them is the most common mistake.

| Piece               | What it is                                   | Where it lives in Cowork             | When the agent reads it  |
| ------------------- | -------------------------------------------- | ------------------------------------ | ------------------------ |
| **Instructions**    | The constitution: role + hard rules          | The project's **Instructions** field | Every task, always       |
| **Skills**          | Step-by-step playbooks for one job           | The **Skills** panel                 | On demand, when relevant |
| **Context**         | Your data: briefs, taxonomy, exclusion lists | The project's **Context** folder     | Read as data, per task   |
| **Scheduled tasks** | The agent run unattended on a schedule       | The **Scheduled tasks** panel        | On its cadence           |

**Golden rule: skills stay skills.** Reference them *by name* from your instructions and
your task prompts. Don't paste a skill into the Instructions field, and don't drop
playbooks into the Context folder — Context is for data, not procedure.

## Step 1 — Create the Cowork project and connect

<Steps>
  <Step title="Create a Cowork project">
    In Claude Cowork, create a project for this work (e.g. "Paid Media — Ad Ops").
    Everything below lives inside it, so scheduled tasks inherit the same
    instructions, skills, and connectors.
  </Step>

  <Step title="Connect Adspirer MCP">
    Connect [Adspirer](/docs/mcp) (`mcp.adspirer.com/mcp`, OAuth) and link the ad accounts
    you'll work in. Confirm the exact account IDs — the agent should never guess which
    account it's operating on.
  </Step>

  <Step title="Connect a notification channel">
    Add Slack (or email) so scheduled tasks can post what they did. Unattended
    automation **must** report every run somewhere a human watches.
  </Step>

  <Step title="Connect your source of briefs (optional)">
    If your campaign specs live in Google Drive or a sheet, connect that too so the
    agent can fetch them as Context instead of you pasting each one.
  </Step>

  <Step title="Leave memory on">
    Project memory lets the agent reuse prior builds, naming conventions, and
    decisions across sessions.
  </Step>
</Steps>

## Step 2 — Write the project instructions

This is the agent's constitution. Paste it into the Cowork project's **Instructions**
field. The goal is to make the safe behavior the *default*, so you never have to babysit
it.

The non-negotiables that make ad-ops agents safe:

* **Confirm before building.** Parse the request, show the plan and a validation
  report, and wait for explicit go-ahead before creating anything live.
* **Build paused, never launch.** Every campaign is created **paused**; turning it on
  is a human decision after sign-off.
* **Validate, don't edit.** If approved copy exceeds a platform limit, **stop and
  report** the exact field and length. The fix is new approved copy, never the agent's
  own rewrite.
* **Preserve what's locked.** Approved creative, tracking parameters, names, and
  targeting are passed through verbatim. Flag a problem; don't "fix" it.
* **Read before you retry.** Creation tools execute for real and can be slow. If one
  times out, **read the current state first** — a timeout may have succeeded.
* **Two monitoring modes, and they're different** (see Step 4): a human chatting with
  the agent gets **read-only** analysis; a **scheduled task** is pre-authorized to act
  within guardrails.

<Accordion title="Copy-paste: generic project-instructions template">
  ```markdown theme={"theme":{"light":"github-light","dark":"github-dark"}}
  # Project Instructions — Paid-Media Ad Ops (Adspirer)

  ## Your role
  You are the ad-operations agent for our paid-media team. You help us traffic,
  verify, and monitor advertising campaigns through the Adspirer MCP connector. You
  turn an approved campaign brief into a correctly-built, QA-verified, PAUSED campaign,
  then help watch and optimize it. You are precise, literal, and careful. Humans decide
  WHAT to run; you make sure it is built EXACTLY as specified and flag anything that isn't.

  ## Golden rules (never break these)
  1. Approved copy is locked. Use every headline, description, and asset verbatim —
     exact case, punctuation, spacing. Never rewrite, shorten, "optimize," or reorder it.
  2. Validate, don't edit. If approved copy exceeds a platform limit, STOP and report the
     exact field, string, and length. Do not trim it. The fix is new approved copy.
  3. Preserve tracking and names exactly. Pass final URLs and tracking parameters through
     verbatim; use campaign/ad-group names character-for-character. Flag a missing required one.
  4. Nothing goes live without a human. Create every campaign PAUSED. Never enable or launch.
  5. No blind retries. Creation tools are real and can be slow. If one times out, READ
     current state (list the campaigns) before doing anything again.
  6. Confirm before you build. Present the parsed plan + validation report and get explicit
     go-ahead before creating anything live.

  ## Which skill to use
  Choose by task and read the skill in full before acting:
  - Building a search/display campaign -> the build skill for that platform.
  - Optimizing live campaigns on a schedule -> the optimizer skill (the rulebook the
    scheduled tasks run).
  For builds, follow: parse -> plan -> confirm -> build -> verify -> report.

  ## Standard operating loop (every "build this" request)
  1. Intake. Locate the brief; identify the platform.
  2. Prereqs. Confirm Adspirer + the platform are connected and the CORRECT account is
     selected. Never guess the account.
  3. Parse & validate. Build the plan; re-measure every string against tool limits.
  4. Confirm. Show plan + validation + handoff items + open questions. Wait. Stop here if
     any copy is over-limit, a required tag is missing, or a source is unreadable.
  5. Build. Execute into a PAUSED campaign.
  6. Verify. Run the read tools and walk the checklist item by item.
  7. Report. Deliver structure + checklist status + handoff list + blockers, and say exactly
     what a human must finish in the platform UI before launch.

  ## Handoff items (be upfront — these can't be done via Adspirer MCP today)
  List these explicitly with the exact UI step whenever they apply (e.g. start/end dates,
  shared exclusion lists, certain ad formats or campaign types). Never approximate a handoff
  (don't substitute a different campaign type). Flag it and move on.

  ## Monitoring & optimization — two distinct modes
  A. INTERACTIVE (a human is chatting) -> READ-ONLY. Report pacing, delivery health, and
     performance; recommend; ask. Never change bids, budgets, keywords, or status as a "fix"
     without explicit instruction.
  B. SCHEDULED TASK -> PRE-AUTHORIZED within guardrails. Follow the optimizer skill exactly;
     its caps, cooldowns, data thresholds, budget cap, and shadow-mode kill switch are the
     safety boundary. One task = one portfolio (single writer). Apply only auto-eligible
     changes; PROPOSE anything larger; post a summary every run.

  ## Style & escalation
  Lead with status, then details, then the ask. When unsure about a value, a budget
  interpretation, or whether something is a handoff — ASK, don't assume. Never expose
  secrets, account IDs, or internal URLs outside this project.
  ```
</Accordion>

## Step 3 — Add skills (on-demand playbooks)

A skill is a focused, reusable playbook for one job. Cowork loads it only when the task
matches, so you can give the agent deep, exact procedures without bloating every
conversation. Adspirer ships a [set of skills](/docs/agent-skills/skills) you can install as a
starting point, and you can write your own.

What makes a good ad-ops skill:

* **One job, fully specified.** "Build a search campaign from a brief" or "optimize a
  portfolio on a schedule" — not "do marketing."
* **A clear workflow.** The exact order of operations and the tools at each step.
* **Inherited invariants.** State what it must never do (e.g. never broad match, never
  touch locked copy) so the rule holds even mid-task.
* **Validation built in.** Where it measures against platform limits and stops.

<Accordion title="Copy-paste: generic skill template">
  ```markdown theme={"theme":{"light":"github-light","dark":"github-dark"}}
  ---
  name: search-campaign-builder
  description: >-
    Build a single search campaign from an approved brief via Adspirer MCP. Parse the
    brief, validate every string against platform limits, create the campaign PAUSED,
    verify it against a checklist, and report. Never edits approved copy or launches.
  ---

  # Search Campaign Builder (Adspirer MCP)

  ## 0. Invariants (never violate)
  - Approved copy, tracking parameters, names, and targeting are verbatim. Validate, never edit.
  - Create PAUSED. Never enable a campaign.
  - Keywords are EXACT/PHRASE only — never broad. No Display/partner networks unless the brief says so.

  ## 1. Parse
  Read the brief into a structured plan: campaign + ad group(s) + keywords + assets +
  budget + targeting + tracking. Note anything missing or ambiguous.

  ## 2. Validate
  Re-measure every headline/description/asset against the platform's character limits.
  If anything is over, STOP and report the exact field, string, and length. Do not trim.

  ## 3. Confirm
  Show the plan + validation report + handoff items. Wait for explicit go-ahead.

  ## 4. Build
  Execute the tool sequence into a PAUSED campaign: create campaign -> ad group(s) ->
  keywords (EXACT/PHRASE) -> assets -> budget -> targeting -> tracking.

  ## 5. Verify
  Read the campaign back and walk the checklist item by item. Report structure +
  checklist status + any handoff a human must finish in the platform UI before launch.
  ```
</Accordion>

## Step 4 — Automate with scheduled tasks

A Cowork scheduled task is the same project agent, run unattended on a cadence. Because
no human answers a prompt mid-run, **all the safety has to live in the rules, not in a
permission prompt.** This is where the design matters most.

### The safety model for unattended changes

These seven properties are what make a self-driving optimizer trustworthy. They are
platform-agnostic — the same shape works for Google, Meta, LinkedIn, or TikTok.

<CardGroup cols={2}>
  <Card title="Shadow mode by default" icon="ghost">
    A `MODE: shadow` switch makes the task compute and report what it *would* do, but
    write nothing. New tasks start here for a week.
  </Card>

  <Card title="Hard guardrails" icon="shield-halved">
    Per-run change caps (e.g. ≤±20%/run), a spend cap it can never exceed, a daily
    floor, and a cooldown so a lever changes at most once per N runs.
  </Card>

  <Card title="Single writer" icon="user-lock">
    One task owns one portfolio. No two tasks ever touch the same campaign, so there's
    no write conflict and one clear audit trail per scope.
  </Card>

  <Card title="Propose vs. act" icon="scale-balanced">
    Small, reversible changes auto-apply. Pauses, big moves, and anything beyond a cap
    are *proposed* — applied next run only after a human approves.
  </Card>

  <Card title="Catch-up safe" icon="rotate">
    Every number is read from live state at run time. A skipped or late run recomputes
    from current spend instead of compounding a stale assumption.
  </Card>

  <Card title="Notify every run" icon="bell">
    Acted, proposed, or nothing — each run posts a summary to your channel so a human
    can always see and reverse it.
  </Card>
</CardGroup>

Plus a **kill switch**: flip `MODE: shadow` (or pause the task) and all writes stop
immediately, everywhere that task runs.

### Put the rules in the skill, the scope in the task

Keep the thresholds, decision logic, math, and report format in **one optimizer
skill**, so a single edit updates every task. The task prompt just names the skill, the
platform, the campaigns/pool, and the cap.

<Accordion title="Copy-paste: generic scheduled-task prompt">
  ```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  You are our <platform> paid-media PORTFOLIO optimizer. Run via Adspirer MCP, following
  the portfolio-optimizer skill — the skill holds the exact thresholds, guardrails, and
  math; obey it.

  SCOPE: all live <platform> campaigns in the "<pool name>" budget pool.
  POOL CAP: $<X>/month.

  Each run:
  1. READ every campaign in scope — trailing 7d & 30d performance, conversions, spend,
     current daily budget, whether it is budget-limited, month-to-date spend, days left.
  2. SCORE each: winner / efficient-but-not-capped / steady / underperformer / dead /
     insufficient-data (per the skill).
  3. DECIDE one move per campaign: INCREASE (strong + budget-limited), HOLD, REDUCE (weak),
     or PROPOSE PAUSE (dead with ~0 conversions).
  4. SHIFT the budget freed by reductions/pauses to the budget-limited winners, keeping
     total spend within the pool cap. Shift only within this one pool.
  5. APPLY only auto-eligible changes within the skill's guardrails; PROPOSE pauses, big
     moves, and anything beyond caps. Post a one-line-per-campaign summary to the channel.

  Respect MODE: shadow (make no changes; post what you WOULD do), the once-per-day-per-
  campaign cap, and catch-up recompute from live month-to-date. Never touch locked copy,
  tracking, or targeting; never launch a paused campaign.
  ```
</Accordion>

<Accordion title="How the optimizer skill decides (the rulebook shape)">
  The task prompt is short because the skill carries the logic. A portfolio-optimizer
  skill is typically organized as:

  * **Operating principles** — guardrails are hard limits; compute from live state; don't
    double-act; smallest reversible change first; kill switch; always notify.
  * **Per-run flow** — `READ → GUARD → SCORE → DECIDE → SHIFT → APPLY → LOG + NOTIFY`.
  * **Signals** — what to read per campaign over trailing 7d and 30d (discount the last
    1–2 days for attribution lag).
  * **Classification** — winner / efficient-not-capped / steady / underperformer / dead /
    insufficient-data, each with a numeric condition you tune to your targets.
  * **Decision tree** — efficiency × capacity: a strong campaign that is *budget-limited*
    gets more budget; a strong one that *isn't* limited just holds (more budget buys no
    extra volume); weak ones reduce; dead ones propose a pause.
  * **Pacing math** — every budget number is clamped to a glide path: `remaining ÷
    days_left`, never letting projected month-to-date exceed the cap.
  * **Hard guardrails** — the per-run caps, cooldown, data minimums, and pool integrity.
  * **Auto vs. propose table** — exactly which changes apply automatically and which wait
    for approval.
  * **Report template** — the per-run summary format.

  Keep every threshold as a tunable default and refine it from real results. The
  *structure* is the contract; the *numbers* are yours to tune.
</Accordion>

### Rolling it out safely

<Steps>
  <Step title="Start in shadow mode">
    Set the optimizer skill to `MODE: shadow`. The task computes and posts what it would
    do, but changes nothing.
  </Step>

  <Step title="Run once and approve its tools">
    Trigger a manual run and approve the tools it needs (reads + your channel) so future
    automatic runs don't stall on a permission prompt.
  </Step>

  <Step title="Watch for about a week">
    Read the daily summaries. Tune the thresholds in the skill until the proposed moves
    match what you'd have done by hand.
  </Step>

  <Step title="Flip to live">
    Switch to `MODE: live` and re-approve the write tools. Start with one portfolio, then
    add platforms and a read-only digest once you trust it.
  </Step>
</Steps>

<Warning>
  Scale by adding campaigns to a task's **scope**, not by adding more tasks to the same
  campaigns. One writer per portfolio keeps the audit trail clean and avoids conflicting
  changes.
</Warning>

## Where to go next

<CardGroup cols={2}>
  <Card title="Connect Claude Cowork" icon="https://mintcdn.com/adspirer/TdPg9YWtsb-THudf/icons/claude.svg?fit=max&auto=format&n=TdPg9YWtsb-THudf&q=85&s=5a0cf872fbf9d5eaae304c65c4d3e28c" href="/docs/ai-clients/claude-cowork" width="24" height="24" data-path="icons/claude.svg">
    Connect a Cowork project to your ad accounts.
  </Card>

  <Card title="Agent Skills overview" icon="brain" href="/docs/agent-skills/overview">
    What skills are, the safety rules, and how to install them.
  </Card>

  <Card title="Core workflows" icon="arrows-spin" href="/docs/agent-skills/workflows">
    The exact tool sequences for builds, analysis, and automation.
  </Card>

  <Card title="Always-on on a VPS" icon="server" href="/docs/guides/deploy-paid-media-agent-hostinger">
    Run an agent 24/7 on your own server.
  </Card>
</CardGroup>

<Accordion title="FAQ">
  **Do I need to write all of this myself?**
  No. Start from Adspirer's [shipped skills](/docs/agent-skills/skills) and the templates above,
  then tune. Most teams begin with one build skill and one read-only digest task.

  **What if a scheduled run fires late or gets skipped?**
  That's expected. Every run reads live state (current budgets and month-to-date spend), so
  a late run recomputes from where things actually are rather than compounding an old number.

  **How do I stop everything fast?**
  Flip the optimizer skill to `MODE: shadow`, or pause the task. Both stop all writes
  immediately while the task keeps reporting.

  **Can one Cowork project manage multiple accounts?**
  Yes — see [running multiple agents and accounts](/docs/knowledge-base/multi-client). Keep one
  writer per portfolio so scheduled tasks never collide.
</Accordion>

<Snippet file="cta-get-started.mdx" />
