All articles
Guide 20 min read

How to Run Facebook & Instagram Ads with Your Claude Code AI Agent

A

Adspirer Team

Share Y
How to Run Facebook & Instagram Ads with Your Claude Code AI Agent
Summary

This guide takes your Claude Code marketing agent from general-purpose to Meta Ads specialist. You’ll learn how to diagnose creative fatigue before it tanks your ROAS, analyze audience overlap and saturation, ideate new campaigns using web research that Codex can’t do, create full-funnel Meta campaigns through natural language, and build compounding knowledge that makes your agent smarter with every session.

In Part 2, you installed the Adspirer plugin, created your brand workspace, and ran your first cross-platform performance review. Your agent knows your brand, your KPI targets, and your current campaign performance. Now we specialize it for the platform that needs an AI agent the most.

Meta Ads is different from every other advertising platform. Google Ads is keyword-driven — find the right search terms, write relevant ads, optimize bids. LinkedIn is audience-driven — pick the right job titles and company sizes, then refine. But Meta Ads is creative-driven. The algorithm doesn’t care about your targeting as much as it cares about whether your creative resonates. The right image or video, shown to the right audience, at the right frequency — that’s the entire game.

And that game has a built-in decay mechanism: creative fatigue. Every creative has a shelf life. As frequency rises past 2.5-3.0 for prospecting audiences, CTR drops, CPM rises, and your cost per conversion climbs. By the time most marketers notice in their weekly dashboard check, they’ve already wasted days of budget on dying creatives.

This is exactly the kind of pattern an AI agent with persistent memory catches early. Your Claude Code agent tracks which creatives are fatiguing, which audiences are saturating, and which campaign structures have worked historically — then uses that accumulated knowledge to inform every future decision.

Info

This is Part 3 of a 3-part series.


Understanding Your Meta Ads Data First

Before creating anything new, start by understanding what’s already running. This is the analyze phase — and it’s where most marketers skip straight to campaign creation, missing critical patterns in their existing data that should inform everything they do next.

Your Claude Code agent has access to 20 Meta Ads tools through Adspirer. These cover everything from account-level performance to individual ad creative metrics. But raw tool access isn’t enough — the value comes from the agent’s ability to synthesize data across multiple dimensions simultaneously, compare against your KPI targets, and check for strategy drift.

Meta Ads Deep Dive

Pull my Meta Ads performance for the last 30 days. Break it down by campaign, then by ad set within the top spending campaigns. Show me: spend, impressions, reach, frequency, CPM, CPC, CTR, and conversions. Flag anything unusual — especially rising frequency or declining CTR.

The agent reads your CLAUDE.md for KPI targets, pulls the data from Adspirer, and returns a structured analysis. But here’s where Claude Code’s interactive model transforms the workflow: you can immediately follow up on anything that looks off.

If the report flags a campaign with rising frequency, you don’t need to open Ads Manager or start a new tool. Just ask:

Follow-Up Drill Down

That prospecting campaign has 4.2 frequency — break down the ad set level performance. Which audiences are fatiguing fastest? Show me the daily frequency trend for the last 14 days.

The sub-agent continues the analysis in the same context, building on what it already knows about your account. This iterative drill-down — report, flag, investigate, decide, act — is the natural workflow of experienced media buyers. Claude Code matches that rhythm. Scheduled Codex reports can’t do this; they run, return results, and stop.


Diagnosing Creative Fatigue

Creative fatigue is the silent killer of Meta Ads campaigns. It happens when your audience sees the same creative too many times — CTR drops, CPM rises, and your cost per conversion climbs steadily until the creative is essentially dead. The insidious part is that it happens gradually. Day-over-day changes are small enough to miss. But week-over-week, the damage compounds.

Your agent can catch fatigue early by tracking the relationship between frequency and performance metrics over time. The pattern is predictable and follows a well-documented curve: as frequency rises past 2.5-3.0 for cold prospecting audiences (or 5-6 for warm retargeting), you’ll see CTR decline and CPA increase.

Creative Fatigue Analysis

Analyze creative fatigue across all my active Meta campaigns. For each ad, show me: days running, current frequency, CTR trend (last 7 days vs previous 7), CPM trend, and conversion rate trend. Flag any creatives where CTR has dropped more than 20% week-over-week while frequency increased.

What the Agent Looks For

The agent examines multiple fatigue signals simultaneously — not just frequency in isolation, but the interaction between frequency and performance metrics:

SignalWhat It MeansThreshold
Rising frequency + declining CTRAudience is tuning out the creativeFrequency > 3.0 + CTR drop > 15%
Rising CPM + stable reachMeta is charging more to show stale contentCPM increase > 20% in 7 days
Declining conversion ratePeople click but don’t convert — message fatigueConv rate drop > 25%
Shrinking reachAudience pool exhaustion — frequency will spike nextReach declining > 10%/week

When the agent identifies fatigued creatives, it doesn’t just flag them with a number. It checks your STRATEGY.md for creative rotation rules you’ve established, references MEMORY.md for how similar fatigue patterns resolved in the past, and recommends specific actions — pause this creative, refresh that headline, shift budget to the fresher ad set.

Tip

Save creative rotation rules to STRATEGY.md. When you discover that UGC video format consistently lasts 3 weeks before fatiguing while polished brand videos last only 10 days, tell the agent to save it: “Add to STRATEGY.md: ROTATE UGC video creatives after 21 days or frequency > 3.0. ROTATE brand video after 10 days or frequency > 2.5.” The agent references these rules in every future fatigue analysis and campaign recommendation.


Audience Analysis and Overlap Detection

Meta’s audience targeting is powerful but dangerous if you’re not careful. With overlapping custom audiences, lookalikes at different percentages, and interest stacking across ad sets, it’s easy to end up competing against yourself — bidding on the same users across multiple ad sets, driving up your own costs, and fragmenting your data in ways that prevent Meta’s algorithm from optimizing effectively.

Audience Overlap Analysis

Analyze audience overlap across my active Meta ad sets. Identify any ad sets that are likely targeting the same users. Show estimated overlap percentages and recommend consolidation if overlap exceeds 30%. Also check if any broad targeting ad sets are cannibalizing my lookalike campaigns.

Audience Saturation

Beyond overlap, audiences simply get exhausted over time. A 1% lookalike of your customer list might contain 2-3 million people. At $50-100/day spend, you’ll reach most of them within weeks. The agent can detect saturation by tracking the relationship between spend, reach, and frequency at the ad set level — and this is where it gets proactive rather than reactive.

When the agent identifies a saturating audience, it doesn’t just report the problem. It can research new targeting approaches using Claude Code’s web research capability — something that fundamentally differentiates this workflow from what you’d get with Codex or ChatGPT.

Audience Expansion Research

My 1% lookalike audience for purchase events is saturating — frequency at 4.8 with declining reach. Research potential new audience strategies for [your product category]. Look at what’s working for similar brands on Meta right now. Then suggest 3 new audience approaches I should test, with estimated audience sizes and targeting parameters.

The agent uses WebSearch and WebFetch to research competitor strategies, industry reports, and Meta’s latest targeting best practices. It combines that external intelligence with your actual performance data — what audiences have converted for your brand specifically — to suggest targeting that’s both strategically sound and backed by real-world research.


Campaign Ideation with Web Research

This is Claude Code’s unique advantage for Meta Ads. Where Codex is limited to data from your ad accounts and ChatGPT works with whatever context you paste into the conversation, Claude Code can research the web — crawling competitor landing pages, analyzing industry trends, and gathering creative inspiration — all within the same workflow that analyzes your ad data. The research happens in context, not in a separate tool.

Mining Winners for New Campaign Angles

Start with what’s already working in your account. Your top-performing creatives contain signals about what resonates with your audience — messaging themes, visual styles, offer structures, audience segments. The agent can analyze those signals and use web research to find new angles that build on proven patterns.

Campaign Ideation Pipeline

Look at my top 3 performing Meta ad creatives by ROAS over the last 60 days. Analyze what they have in common — messaging themes, offer types, creative format, audience targeting, and time-of-day performance. Then research my competitive landscape: search for [competitor names] and their advertising approach. Based on what’s working for me AND what competitors are doing differently, propose 3 new campaign concepts with specific targeting, creative direction, and offer strategy.

The agent combines internal data (your actual performance metrics and creative history) with external intelligence (competitor positioning, market trends, platform best practices) to generate campaign concepts that are both data-informed and competitively differentiated. This isn’t generic “best practices” advice — it’s specific to your brand, your audience, and your competitive landscape.

Landing Page Analysis

Meta’s algorithm optimizes for the entire user journey — not just the ad click. A high-CTR ad pointing to a slow, confusing, or mismatched landing page will tank your conversion rate and teach Meta’s algorithm to stop showing your ads to high-intent users. Over time, this poisons your entire account’s delivery quality.

Landing Page Audit

Crawl the landing pages for my active Meta ad campaigns. Check for message match between the ad copy and landing page headlines, CTA clarity and placement, and mobile experience indicators. Then crawl 2-3 competitor landing pages for similar offers and compare their approach to mine.

The agent uses WebFetch to crawl your landing pages and competitor pages, comparing messaging, headline structure, offer presentation, and CTA strategy. This competitive landing page analysis would normally require a separate tool (like Unbounce or a manual competitor audit) and hours of manual research. Here it happens as part of a single workflow.


Creating Full-Funnel Meta Campaigns

Once you’ve analyzed existing performance, diagnosed problems, and ideated new approaches, it’s time to create. The agent follows a strict workflow that prevents common mistakes: research before creating, validate before launching, confirm before spending.

The Full-Funnel Approach

Most Meta advertisers run isolated campaigns — a prospecting campaign here, a retargeting campaign there. The agent helps you think in funnels, creating connected campaigns that move users from awareness through conversion.

Full-Funnel Meta Campaign

Create a full-funnel Meta campaign for [product/service]. Here’s what I need:

Top of Funnel (Prospecting):

  • Objective: Brand Awareness or Traffic
  • Audience: 1-3% lookalike of my best customers + interest targeting for [category]
  • Budget: $30/day
  • Creative direction: UGC-style video testimonials

Middle of Funnel (Consideration):

  • Objective: Engagement
  • Audience: Video viewers (75%+) from the TOF campaign
  • Budget: $15/day
  • Creative direction: Product demo with social proof

Bottom of Funnel (Conversion):

  • Objective: Conversions
  • Audience: Website visitors (30 days) + cart abandoners
  • Budget: $20/day
  • Creative direction: Offer/urgency messaging + testimonial overlays

Create all three campaigns PAUSED. Use my brand voice from CLAUDE.md for all ad copy.

What the Agent Does During Campaign Creation

The creation workflow is methodical. The agent doesn’t just fire API calls — it follows a validated sequence for each campaign in the funnel:

Checks Connections and Account State

Verifies Meta Ads is connected, pulls current account metadata, and checks for any existing campaigns that might overlap with what you’re creating.

Validates Against Your Strategy

Checks STRATEGY.md for Meta-specific directives — preferred creative formats, audience rules, budget constraints, past learnings. If your strategy says “PREFER video for prospecting,” it ensures the TOF campaign uses video-optimized placements.

Creates Campaign Structure

Creates the campaign with the correct objective, budget, bid strategy, and optimization settings. All campaigns are created PAUSED by default — nothing goes live without your explicit approval.

Builds Ad Sets with Targeting

Configures audiences, placements, scheduling, and delivery optimization. For lookalike audiences, it references your existing custom audiences from Adspirer’s account data.

Generates Brand-Voice Ad Copy

Writes headlines, primary text, and descriptions using your brand voice from CLAUDE.md. References your top-performing ad copy from the account for tone, structure, and proven messaging patterns.

Verifies Complete Structure

After creation, verifies that all ad sets, ads, and targeting configurations are properly attached and correctly configured. Reports any issues or missing elements.

Warning

All campaigns are created paused. The agent will never launch a campaign or enable spend without your explicit approval. After reviewing the campaign structure in the agent’s report, you enable campaigns yourself through Ads Manager or confirm activation through the agent. See the capabilities and safety documentation.


Budget Strategy and the Learning Phase

Meta’s learning phase is the most misunderstood aspect of the platform — and the place where the most budget gets wasted by advertisers who don’t understand the mechanics. When you launch a new ad set, Meta needs approximately 50 conversion events within a 7-day window to exit the learning phase and optimize delivery. Underspend, and you’ll never exit learning (your ad set runs indefinitely in suboptimal delivery). Overspend, and you’ll burn budget during the unoptimized learning period.

Learning Phase Budget Audit

Analyze my active Meta campaigns’ learning phase status. For each ad set, tell me: current daily budget, conversions in the last 7 days, estimated daily conversions needed to exit learning within 7 days, and whether the current budget is sufficient. Recommend specific budget adjustments for any ad sets stuck in learning.

Scaling Without Resetting Learning

One of the trickiest parts of Meta Ads optimization is scaling winning campaigns without triggering a learning phase reset. The agent helps you navigate this by knowing which changes are safe and which will reset learning:

ActionImpact on Learning PhaseAgent’s Approach
Budget increase ≤ 20%Usually safe — no resetRecommends gradual scaling, monitors for 48 hours
Budget increase > 20%Likely resets learningSuggests duplicating the ad set at the higher budget
Audience changeResets learningCreates a new ad set rather than modifying existing
Creative swapResets learning for that adRecommends adding new creative alongside existing, not replacing
Bid strategy changeResets learningOnly recommends if current strategy is clearly failing
Scale a Winner

My top Meta prospecting campaign has maintained ROAS above 4.0x for 14 straight days. It’s out of learning and performing well. Propose a scaling strategy: how much should I increase the budget, should I expand the audience, and what’s the safest way to scale without resetting the learning phase? Reference any past scaling attempts in MEMORY.md.

The agent checks MEMORY.md for any previous scaling attempts on this or similar campaigns — what worked, what reset learning, what the performance trajectory looked like after scaling. This historical context is invaluable for making scaling decisions that don’t repeat past mistakes.


The Compounding Knowledge Effect

This is what makes a Claude Code marketing agent fundamentally different from running one-off analyses — and it’s the concept from Part 1 that becomes most tangible when you’re deep in Meta Ads management.

Every time you run a workflow, the agent saves key findings to MEMORY.md. After a few weeks of regular use, the agent has built up a knowledge base about your specific account that no dashboard, spreadsheet, or reporting tool can replicate:

  • Which creative formats work for your brand — UGC outperforms polished brand creative for prospecting by 2.3x ROAS; carousel format converts better than static for retargeting
  • Which audience segments convert at what CPA — 1% purchase lookalike: $18 CPA; interest targeting for “sustainable fashion”: $32 CPA; website visitors 7-day window: $11 CPA
  • Which days and times perform best — Your B2B audience converts Tuesday through Thursday; weekend performance drops 40%; early morning (6-8am) has 1.5x higher CTR
  • What your seasonal patterns look like — Q4 CPMs rise 35% industry-wide; plan creative refresh in October; Black Friday requires 3x the creative volume
  • Which scaling strategies worked — 15% daily budget increases held ROAS stable; 30% increases reset learning and took 5 days to recover; audience expansion to 3% lookalike maintained performance

This memory compounds. A performance review in week 8 is dramatically more useful than in week 1, because the agent can compare current performance against everything it’s learned about your account’s specific patterns — not industry benchmarks, but your benchmarks.

Building Your Meta Ads Playbook

As you confirm findings and make strategic decisions, save them to STRATEGY.md:

Save a Strategic Finding

That audience test confirmed: website visitor retargeting with a 7-day window outperforms the 30-day window by 40% on ROAS for our product. Save this to STRATEGY.md as a PREFER directive for future Meta retargeting campaigns. Also log the specific test results in MEMORY.md with the date and campaign IDs.

Over time, STRATEGY.md becomes a living playbook of proven rules specific to your brand and your audience. MEMORY.md becomes the decision log that explains why each rule exists — the test that proved it, the data behind it, the context around the decision. When a new team member joins, they can read both files and immediately understand your account’s strategic history. No tribal knowledge required. No “ask Sarah, she’s been here the longest.”

Info

This is institutional knowledge, automated. In most organizations, advertising knowledge lives in people’s heads. When someone leaves, the knowledge leaves with them. The agent externalizes that knowledge into files that persist, compound, and transfer across team members and sessions.


Cross-Platform Intelligence

One of the most powerful workflows with Claude Code’s marketing agent is using Meta Ads data to inform other platforms — and vice versa. Your agent has access to all connected platforms simultaneously through Adspirer, and it can spot patterns that only emerge when you look across channels with a unified view.

Cross-Platform Gap Analysis

Compare my Meta Ads audience performance against my Google Ads keyword performance for the last 30 days. Are there Meta audiences that convert well where I’m NOT running Google Search campaigns for related keywords? Find the gaps where I’m generating demand on Meta but not capturing search intent on Google.

The Meta-to-Google Pipeline

When a Meta prospecting campaign discovers a new audience that converts well, that’s a demand signal. Those people who converted from your Meta ads are now aware of your brand — and some percentage of them will search for you on Google before buying again. Your agent can analyze the converting audience’s demographics and interests, then research related Google Ads keywords to capture the search intent that your Meta campaigns created.

Meta to Google Pipeline

My Meta lookalike campaign for “eco-friendly office supplies” is converting at $8 CPA — well below my $15 target. Research Google Ads keywords related to this audience’s likely search behavior. Show me volume, CPC, and competition for the top 20 keywords. Then propose a Google Search campaign to capture this demand before competitors do.

The Google-to-Meta Pipeline

The reverse works just as well. If certain Google Ads keywords convert at high rates, the search terms report reveals the exact language your audience uses when they’re in buying mode. The agent can use those high-converting search terms to craft Meta ad copy that uses the same language — bridging the gap between search intent and social discovery.

Google to Meta Creative Brief

Pull my top 10 converting Google Ads search terms from the last 30 days. Analyze the language patterns — what words, phrases, and pain points keep appearing? Use those insights to write Meta ad copy for a new prospecting campaign that speaks in the same language my converters are already using.


Troubleshooting

Meta Ads account showing 'syncing' status

When you first connect a Meta Ads account, Adspirer syncs historical data. This typically takes 5-15 minutes depending on account size and campaign history. Run /adspirer:refresh-brand-context after syncing completes to update your brand workspace with the latest data.

Missing campaign data or metrics

Make sure your Meta Business Manager permissions include Ads Management and Insights access for the ad account. If you have limited access, some metrics and historical data won’t be available. Reconnect with full permissions at adspirer.com.

Campaign created but missing ad sets or ads

If the agent reports successful campaign creation but elements are missing, run a verification prompt: “Check the structure of my last created campaign — verify ad sets, targeting, and ads are all properly attached.” The post-creation verification step should catch this automatically, but you can trigger it manually.

Agent not using brand voice for ad copy

Make sure your CLAUDE.md has a Brand Voice section with clear guidelines — tone, style, prohibited words, preferred messaging patterns. If it’s missing or thin, run /adspirer:setup again with brand guideline documents in your project folder. The more brand context you provide, the more accurate the copy.

Web research returning irrelevant results

Be specific in your research requests. Instead of “research competitors,” name them: “Search for [Brand X] and [Brand Y] Meta Ads strategies and landing page approaches.” Include your product category and target audience for context. The more specific the query, the more useful the research.


FAQ

How many Adspirer tool calls does a typical Meta Ads workflow use?

A performance review uses 3-5 calls. Creative fatigue analysis uses 4-6 calls. Full-funnel campaign creation uses 8-12 calls depending on complexity. A deep analysis session with follow-up drill-downs might use 15-20 calls total. The free tier (15 calls/month) lets you test the connection and run a couple of analyses. For regular Meta Ads management, the Plus plan (150 calls at $49/month) covers weekly reviews and monthly campaign creation.

Can the agent manage multiple Meta ad accounts?

Yes. If you’ve connected multiple ad accounts through Adspirer, the agent pulls data and creates campaigns across all of them. Specify which account in your prompt: “Pull performance for my Acme Corp Meta account.” See the multi-account documentation.

Does the agent support Meta Advantage+ campaigns?

The agent creates standard Meta campaigns with automatic placements — which is Meta’s recommended approach for most advertisers and covers the vast majority of use cases. For Advantage+ Shopping campaigns and other specialized campaign types, check the Meta Ads tool reference for the latest supported campaign subtypes.

Can I use this with Claude on the web or desktop app?

This guide covers Claude Code CLI, which offers the most powerful agent architecture (sub-agents, persistent memory, web research). The same Adspirer MCP server also works with Claude on the web via Connectors and with the Claude desktop app. The /plugin install method is specific to Claude Code CLI and Cowork. A future guide will cover the web and desktop experience.

How is this different from using ChatGPT with Adspirer for Meta Ads?

Claude Code runs as a CLI tool with sub-agents (isolated context), persistent memory files (MEMORY.md, STRATEGY.md), web research (WebSearch, WebFetch), and local file access to your brand workspace. ChatGPT uses Connectors for MCP access and offers a great conversational interface, but doesn’t have sub-agents, persistent local memory, or the ability to read your brand documents from disk. See the platform comparison for a detailed breakdown.

Will the agent spend money without my approval?

No. All campaigns are created paused by default. The agent cannot enable campaigns, increase budgets on running campaigns, or make any spend-affecting changes without your explicit confirmation. This is enforced at multiple levels — the skill workflow, the agent definition, and Claude Code’s built-in permission system. See capabilities and safety.


What’s Next

You now have a Meta Ads specialist agent that can analyze performance, diagnose creative fatigue before it tanks your ROAS, research competitors and new audiences, create full-funnel campaigns with brand-voice copy, manage the learning phase and scaling, and build compounding knowledge that makes every future session more valuable than the last.

The same patterns apply to Google Ads, LinkedIn Ads, and TikTok Ads — each with their own platform-specific workflows and optimization levers.

The next step is to make this part of your routine. Run a performance review every Monday. When you find a pattern, save it to STRATEGY.md. When you make a decision, let the agent log it to MEMORY.md. Within a month, you’ll have a marketing agent that knows your Meta Ads account better than any dashboard, report, or spreadsheet ever could.

Info

Ready to start? Sign up for Adspirer (free tier: 15 tool calls/month) and install the Claude Code plugin with /plugin install adspirer-ads-agent.

Get started free →


Meta Ads Claude AI Agents Automation

More articles to read