Skip to content

AI agents for marketing: build a campaign agent

Every Monday someone stitches ad spend, leads and pipeline into a report, and the budgets move a week late. This agent builds the report and proposes the moves.

Last reviewed November 2026

App, built with Tray Helix

The short answer

AI agents for marketing take the reporting and monitoring work off the team. A campaign performance agent pulls spend from your ad platform and leads and pipeline from your CRM, compares each campaign to its target, and proposes budget moves with the numbers behind them. Changing a budget is a tool marked for approval, so a marketer sees the exact change first. The agent writes the weekly summary and never publishes it.

campaign-agent.helix-app.ai

Campaign Agent

14

Campaigns

3

Off target

3

Moves awaiting approval

Campaign Spend Cost per lead Target Proposed move
Search: integration platform $18,400 $92 $110 Raise daily budget 15%
Display: retargeting $7,200 $214 $120 Cut daily budget 30%
Social: webinar $5,100 $118 $120 No change
Search: competitor terms $9,800 $141 $110 Cut daily budget 20%
A sketch of the week. Each proposal sits next to its target, and nothing changes until a marketer approves it.

What matters here

  • A campaign performance agent joins ad spend to leads and pipeline by campaign, so the numbers come from one place.
  • Changing a campaign budget is a tool marked for approval, so a marketer sees the exact change before it happens.
  • Each proposal carries its evidence: spend, leads, cost per lead and pipeline against the target.
  • Targets live in the app where marketing can edit them, so the agent applies the same rules every week.
  • The agent drafts the weekly summary and never posts it, so what leadership reads stays with a person.

Who this is for

You run marketing operations or demand generation. The data lives in the ad platforms, the marketing automation tool and the CRM, and the weekly report takes a day to build.

How it works in practice

One week of campaigns, from raw numbers to a decision a marketer makes in minutes.

  1. 1

    A scheduled run starts

    A scheduled function runs the agent early each Monday over the previous week.

  2. 2

    It pulls spend and results

    Spend by campaign from the ad platform, and leads and pipeline by campaign from the CRM.

  3. 3

    It compares to targets

    Cost per lead and pipeline against the targets marketing set, with small samples noted, not judged.

  4. 4

    It proposes the moves

    Raise or cut a budget, with the numbers behind each and the campaigns it compared.

  5. 5

    A marketer approves

    change_budget is marked for approval, so the run pauses and shows the exact change. The marketer approves, edits or declines.

  6. 6

    It applies and writes the summary

    Approved changes go to the ad platform. The agent drafts the weekly summary for a person to read and post.

What a campaign agent is made of

Targets, read tools, one gated write and a draft.

Your targets

Cost per lead and pipeline targets per campaign, kept in the app's database where marketing can edit them.

Read tools

Spend by campaign, leads and pipeline by campaign, and site conversions. Read only.

One write tool, gated

change_budget, marked for approval, so every budget move waits for a marketer.

A draft tool

Saves the weekly summary in the app. It has no way to post it.

The prompts

Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.

These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.

1

Targets and the proposal queue

What good looks like, and where proposals wait.

Claude Code, Codex or Cursor

Create a Helix app: a campaign performance agent for marketing.

Store campaigns with a name, channel and owner. Store targets that marketing can edit: cost per lead and pipeline per campaign, and a minimum number of leads before a campaign is judged.

Store proposals: the campaign, the move, the numbers behind it (spend, leads, cost per lead, pipeline) and the outcome (waiting, approved, edited, declined) with who decided and when.

Show a table of this week's campaigns against their targets, and the waiting proposals with approve, edit and decline on each.

2

The agent and its tools

Read, compare, propose, wait.

Claude Code, Codex or Cursor

Add an agent to the app that reviews last week's campaigns.

Give it these tools:

- get_spend: spend by campaign for a date range.

- get_leads_and_pipeline: leads and pipeline by campaign for a date

range.

- get_conversions: site conversions by campaign.

- change_budget: set a campaign's daily budget.

- draft_summary: save the weekly summary in the app. It must not post

anything.

Mark change_budget as needing approval every time.

For each campaign, compare cost per lead and pipeline to its target. Propose to raise or cut a budget only where the numbers clearly miss or beat the target, and show the numbers. If a campaign has fewer leads than the minimum, say there is not enough data and propose nothing.

Asking the agent to say when there is not enough data stops it from reacting to noise.
3

Run it every Monday

A report that is ready before the meeting.

Claude Code, Codex or Cursor

Run the agent early every Monday over the previous seven days.

Post to the marketing channel in Slack with how many proposals are waiting and a link to approve them.

Show a trend view: cost per lead and pipeline by campaign for the last 12 weeks.

4

Connect it to real systems

Your ad platform, your CRM, your analytics.

Claude Code, Codex or Cursor

Now connect it to the systems we actually run.

Anything in angle brackets is a placeholder. Swap it for whatever we use.

<Google Ads>. Read spend by campaign, and set a daily budget when change_budget is approved.

<HubSpot>. Read leads and pipeline by campaign. Read only.

<Google Analytics>. Read conversions by campaign. Read only.

<Slack>. Post the Monday message to the marketing channel.

Only write through change_budget. Everything else is read only.

Tray holds each credential as a workspace authentication, so the app references a name and never the secret itself.
5

Ship it

A URL, and marketing on it.

Claude Code, Codex or Cursor

Deploy my app.

Your assistant runs helix deploy and the app comes back as a URL. Set Access Control so only the campaign owners can approve a budget change.

What it connects to

The agent reads the ad platform and the CRM, and writes only through the tool that waits for approval.

Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.

Running it for real

The build gets you a working agent. It can move real spend, so approval, credentials and the record matter most.

  1. 1

    Deploy the app and its agent together

    One command, or Deploy from CI on every merge, takes the app to a live URL. The agent ships with its app, so you can roll back any deployment.

  2. 2

    Approval before any budget moves

    change_budget waits for a campaign owner every time, who sees the campaign and the exact change. SSO decides who can approve.

  3. 3

    Credentials held by Tray

    The ad platform and CRM credentials are held in Tray, not in the code, so they can be rotated without a redeploy.

  4. 4

    A named owner and every step logged

    The app and its agent have a named owner. Every run, proposal and approved change is logged, and Tray streams the logs to your SIEM.

  5. 5

    Know what the weekly review costs

    AI usage shows per app, so the cost of the review is visible next to the spend it manages.

Questions people ask

What are AI agents for marketing?

AI agents for marketing do the monitoring, reporting and checking that marketing teams do by hand: pulling spend and results together, comparing campaigns to targets, and proposing changes. This one reviews campaigns each week and proposes budget moves. A person approves every change.

What can an AI agent do for marketing, and what stays with a person?

The agent does the pulling, the comparing and the first draft of the summary. A marketer decides on any budget move, and a person reads and posts the summary. Approval is a setting on each tool, so you choose what the agent may do alone.

Can an AI agent change ad budgets?

Yes, through the ad platform's API after a marketer approves. change_budget is marked for approval, so the run pauses and shows the exact change. Every approved change is logged with who approved it.

Which marketing tools does it work with?

The agent's tools reach your ad platforms, marketing automation, CRM and analytics through Tray, which connects to 12,000+ apps, databases, APIs, and services. The build uses Google Ads, HubSpot and Google Analytics as examples.

Build it, then run it properly

Helix is the governed runtime for AI-built apps and agents. Deploy what you build, put SSO in front of it, connect it to your systems with managed credentials, and give it a named owner.