Ship Your First Campaign
In the next ~15 minutes you'll have an agent that takes a natural-language brief ("target mid-market SaaS VPs in the US, push our demo offer") and produces a launched, live campaign on LinkedIn and Meta — with human approval gates in the right places.
Prerequisite: You have an API key
with read:all, write:audiences, write:creatives,
write:campaigns, and launch:campaigns scopes. Connected ad channels in your
account (LinkedIn + Meta at minimum) — check with get_integrations_status.
1. Establish context
Every agent run should start by grounding the model in the account's current state:
from metadataone import mcp account = mcp.get_account_details() integrations = mcp.get_integrations_status() balance = mcp.get_credit_balance() brand = mcp.get_brand_kit(domain=account["domain"]) assert "linkedin" in integrations["connected"], "Connect LinkedIn first" assert balance["credits_remaining"] >= 100
Total cost so far: 4 credits (4×1).
2. Build the audience
Start cheap — always estimate_target_group before creating. If the estimate is under
10K members on LinkedIn or 50K on Meta, broaden the criteria.
criteria = { "industries": ["Computer Software", "IT Services"], "employee_range": [201, 1000], "countries": ["US"], "seniority": ["vp", "director", "c-level"], "job_functions": ["Marketing", "Sales"], } estimate = mcp.estimate_target_group(criteria=criteria) print(f"Est. reach: {estimate['size']:,}") # Est. reach: 214,000 if estimate["size"] < 50_000: raise ValueError("Audience too narrow, ask user to broaden") audience = mcp.create_firmographic_audience( name="ICP — Mid-market SaaS, US (Q2 2025)", filters=criteria, )
Cost: 6 credits (estimate 1 + create 5).
3. Generate on-brand creatives
generate_brand_creative reads the brand kit (colors, fonts, logo, voice) and produces
assets sized for each channel you'll run on.
creative = mcp.generate_brand_creative( brand_kit_id=brand["id"], prompt=""" Hero ad for our AI-powered demand gen platform. Audience: VPs of Marketing at mid-market SaaS. Tone: confident, slightly urgent. Include CTA: 'Book a demo'. """, aspect_ratios=["1:1", "1.91:1", "16:9"], variants=3, ) # Human-in-the-loop: show creative[n]["preview_url"] for approval approved_ids = show_and_approve(creative["variants"])
Cost: 25 credits. Use edit_brand_creative (10 cr) for tweaks rather than regenerating.
4. Assemble the offer
offer = mcp.create_update_offer( name="Q2 Demo Request", type="leadgen_form", channels=["linkedin", "meta"], fields=[ {"name": "email", "required": True}, {"name": "company", "required": True}, {"name": "job_title", "required": True}, ], privacy_policy_url=mcp.find_privacy_url(domain=account["domain"])["url"], )
5. Assemble the campaign — in Draft
Important: create_campaign always creates in Draft.
No real spend happens until you call launch_campaign. Always show the draft to a human
before launching.
campaign = mcp.create_campaign( name="Q2 ICP Demand — US Mid-Market SaaS", channels=["linkedin", "meta"], audience_ids=[audience["id"]], ad_ids=approved_ids, offer_id=offer["id"], daily_budget=500, duration_days=30, optimization_goal="lead_volume", ) print(f"Draft: {campaign['preview_url']}")
6. Human approval gate → launch
This is the single most important pattern in agentic advertising. The agent never launches spend without explicit human confirmation.
if not human_approves_campaign(campaign): print("Launch aborted by operator.") sys.exit() launched = mcp.launch_campaign(campaign_id=campaign["id"]) print(f"LIVE: {launched['dashboard_url']}")
Cost for steps 4–6: 35 credits (offer 5 + campaign 10 + launch 25 − 5 parity).
7. Close the loop
After 24h of data, re-engage. This is where agents earn their keep — they can run this loop on every campaign, every day, without getting tired.
funnel = mcp.deep_funnel_stats( campaign_id=campaign["id"], date_range="last_7_days", ) if funnel["cpl"] > 500: # Under-performing — pause worst-performing ad perf = mcp.performance_metrics( campaign_id=campaign["id"], dimension="ad", sort="cpl_desc", ) worst = perf["rows"][0] mcp.remove_ad_from_campaign( campaign_id=campaign["id"], ad_id=worst["ad_id"], ) elif funnel["cpl"] < 150: # Over-performing — scale up mcp.update_experiments_daily_budgets( campaign_id=campaign["id"], daily_budget=1000, )
Total cost to ship
| Step | Tools called | Credits |
|---|---|---|
| 1. Context | get_account_details, get_integrations_status, get_credit_balance, get_brand_kit | 4 |
| 2. Audience | estimate_target_group, create_firmographic_audience | 6 |
| 3. Creative | generate_brand_creative | 25 |
| 4. Offer | find_privacy_url, create_update_offer | 6 |
| 5. Campaign | create_campaign | 10 |
| 6. Launch | launch_campaign | 25 |
| 7. Optimize (daily) | deep_funnel_stats, performance_metrics | 6 / day |
| Total to launch | 76 cr | |
| + 30 days of daily optimization | 180 cr | |
At Command Center tier ($0.10/credit), shipping and running a month-long campaign costs roughly $25 in API calls. If the ad spend is $15,000 (30 days × $500), that's 0.17% of media spend.