How to Run Facebook & Instagram Ads with Your Claude Code AI Agent
Adspirer Team
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.
This is Part 3 of a 3-part series.
- Part 1: How to Build an AI Marketing Agent for Paid Media
- Part 2: How to Set Up Your AI Marketing Agent with Claude Code
- Part 3 (this post): Running Meta Ads with your Claude Code agent
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.
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:
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.
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:
| Signal | What It Means | Threshold |
|---|---|---|
| Rising frequency + declining CTR | Audience is tuning out the creative | Frequency > 3.0 + CTR drop > 15% |
| Rising CPM + stable reach | Meta is charging more to show stale content | CPM increase > 20% in 7 days |
| Declining conversion rate | People click but don’t convert — message fatigue | Conv rate drop > 25% |
| Shrinking reach | Audience pool exhaustion — frequency will spike next | Reach 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.
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 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.
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.
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.
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.
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.
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.
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:
| Action | Impact on Learning Phase | Agent’s Approach |
|---|---|---|
| Budget increase ≤ 20% | Usually safe — no reset | Recommends gradual scaling, monitors for 48 hours |
| Budget increase > 20% | Likely resets learning | Suggests duplicating the ad set at the higher budget |
| Audience change | Resets learning | Creates a new ad set rather than modifying existing |
| Creative swap | Resets learning for that ad | Recommends adding new creative alongside existing, not replacing |
| Bid strategy change | Resets learning | Only recommends if current strategy is clearly failing |
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:
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.”
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.
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.
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.
Troubleshooting
FAQ
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.
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.
Related Articles
- How to Build an AI Marketing Agent for Paid Media — Part 1: The concept and why it matters
- How to Set Up Your AI Marketing Agent with Claude Code — Part 2: Installation and configuration
- How to Run Facebook & Instagram Ads with Claude AI — Claude web app approach (without sub-agents)
- How to Run Facebook & Instagram Ads with Your Codex AI Agent — The Codex equivalent of this guide
- How to Run Facebook & Instagram Ads with ChatGPT — The ChatGPT Connectors approach
- Adspirer Is Now an Official Claude Code Plugin — Plugin marketplace announcement
- What Is MCP (Model Context Protocol)? — The protocol behind all of this
- PPC Automation with ChatGPT and Claude — Automating paid search workflows
More articles to read
How to Set Up Your AI Marketing Agent with Claude Code [2026]
Install the Adspirer plugin, create your brand workspace, configure sub-agents, and run your first ad performance check — all from the Claude Code CLI.
Adspirer Is Now an Official Claude Code Plugin
Adspirer is now available in the Claude Code official plugin marketplace. Install with one command and manage Google, Meta, LinkedIn, and TikTok Ads from Claude.