AGENTIC AI in Performance Marketing & Media Buying
A historical argument for connecting commerce and media data with supervised, testable workflows.
Look at how much data a media buyer is supposed to hold in their head.
+ permitted external observations
= a data-definition and decision-design challenge
INTERNAL What you already own
Your authorized stack may contain many definitions, clocks, owners, permissions, and quality limits.
Website reports Site analytics User behavior Heatmaps Session recordings Ad reports Documented campaign fields Campaign creatives Audience overlap CAC / blended ROAS LTV / cohorts Email + SMS perf. ERP system Orders Returns data Refunds Fulfillment cycle Shipping & delivery Inventory levels Support tickets Reviews Repeat rate …etc etc etcEXTERNAL What the market is doing to you
External conditions may coincide with account changes. Use lawful sources and do not infer competitor spend, causality, or a universal effect.
Defined comparison set Dated public sources Comparable offers Visible public campaign observations Prices going up Prices going down Auction fluctuations CPM swings New SKU launches Promo calendars Global crises Country-level issues Weather Seasonality Inflation / FX Doctor recommendations Blogger recommendations Influencer mentions Facebook groups Reddit + TikTok trends News cycle Algorithm changes …limitlessThe practical problem is not that humans are incapable. It is that sources use different definitions, clocks and identifiers. Start with a documented data contract, then test whether a workflow improves a specific decision.
A governed workflow can help organize evidence; it cannot reveal a hidden cause by itself.
Compare a bounded model call with a controlled multi-step workflow.
One bounded invocation under a defined contract.
- You prompt, it answers — done.
- May or may not have connected tools, depending on the product and configuration.
- A fluent answer is not evidence; important claims still need source checks.
- Best suited to bounded drafting and analysis with a clear review step.
A loop with eyes, hands & memory.
- Can read approved data through explicitly configured APIs and files.
- Calls only allowlisted tools with least-privilege credentials.
- Can carry state across steps, but must validate schemas and tool results.
- Produces proposals and evidence for review—not guaranteed truth.
From why → to a historical demo → to controlled pilots.
historical demos
not a runbook
Will my ad accounts get banned?
The myth · The API truthTypes of agentic AI — what to use, what NOT to use
Code vs Cowork vs ExtensionWill AI replace media buyers?
The honest answerMethodology over steps
How to watch a demoInstalling Claude Code
3 commandsIntegrating Meta
Graph API + MCPMeta data analysis
Archived demoCreating ads on Meta
ProgrammaticIntegrating Shopify
Admin APIShopify data analysis
Archived demoCross-reference: Meta × Shopify
Archived demoAgentic actions — Shopify backend
Create products, fix dataAgentic actions — Shopify frontend
Theme + CROTrigger-based proposals
Observe · review · approveLocal host vs cloud host
Where it actually runsHuge opportunities — what to build now
The wide-open market
I'm Mazin Zaki.
8 Years · Media Buying → Shopify Dev → CRO → MarTech
I started as a media buyer, watched every fluctuation — message-to-conversion, iOS 14, the wave of account bans — until I hit a wall where I had no control over anything. So I went deeper. Each step closed a gap the last one couldn't.
Media Buyer
Lived every algorithm shift & ban wave. Hit the ceiling of what control I could get.
Shopify Dev
Solved store problems in a glimpse. Knew the how — but not yet the what to do.
CRO Lead
Drowned in behavior data & split tests. Still missed the deep tech layer.
MarTech
Connecting measurement, systems, controls, and accountable marketing decisions.
This isn't new tech. It's three old systems + one new helper.
They do not waive policy.
Review current terms and permissions.
Meta Graph API
Meta's documented programmatic interface. Access remains subject to current app review, permissions, rate limits, versioning and platform terms. Pin the API version and test migrations.
graph.facebook.comThe Terminal
One interface for running reviewed commands. It is powerful and changes with the operating system and toolchain; it does not make an API workflow safe by itself.
$ ~ /agentic-mediabuyingClaude Code
A coding agent that can help a qualified operator inspect and change files or call tools. It does not replace engineering review, access design, testing, monitoring or incident response.
claude.ai/codeChoose an interface by policy, permissions and evidence—not a universal safety label.
Claude Code
A terminal client can call official APIs, but only the configured integration is in scope—not every action the coding agent can perform.
Separate read and write credentials, allowlist operations, log requests and require approval for changes.
Claude / "Cowork" agents
An AI that drives a virtual computer for you — clicking, typing, scrolling on the actual Ads Manager UI.
UI automation can be brittle and may conflict with platform terms. Check the current policy before use.
Chrome / browser extensions
Claude / GPT extensions that "use the page" inside your logged-in session.
Extensions can access logged-in pages and sensitive data. Vet provenance, permissions, data handling and current platform rules.
Rule of thumb: prefer a documented, version-pinned API and the smallest permission set. Start read-only; place every material write behind a human approval and rollback path.
Automation changes tasks, controls and skill needs differently across organizations. Measure workload, quality, risk and employee impact in a representative pilot; do not turn a tooling hypothesis into a staffing decision.
Watch the methodology, not the keystrokes.
Preserve controls, tests, and failure handling.
Define the task, evidence, controls, and acceptance tests before iterating on implementation.
Pause between sections
We stop, take questions, and discuss real use cases — that's where the value compounds.
Errors are the lesson
You'll see things break. That's exactly the experience you'll have at home — and how you'll learn the system.
Demos are deliberately simple
The point is the pattern: connect data → analyze → act → automate. Scale it later.
Keep the demo synthetic
Translate the method only after a tenant-specific threat model, lawful data review, task eval, and human approval design.
Historical setup. Verify the current official install guide first.
Never install with sudo
Check the official requirements
Supported installation methods and runtime requirements change. Use Anthropic's current setup page for your operating system.
Follow the current official installer
This archived command has been removed because installation methods and package guidance change. Open Anthropic's current Claude Code setup documentation, verify the domain and date, and follow the operating-system-specific instructions without adding unreviewed privilege escalation.
Start in a safe fixture folder
Inspect the working directory, remove secrets and client data, keep permission prompts enabled, and review every proposed command and diff.
Separate read authority from write authority.
How Claude Code talks to Meta
What you actually need
- A dedicated read-only credential for discovery; grant write scopes only to a separate reviewed service after the pilot passes
- Your ad account ID (act_xxxxxxxx)
- A pinned, audited tool server with an explicit operation allowlist, input schemas and outbound-host restrictions
- Server-side policy, idempotency keys, spend ceilings, logs and approval—not a prompt—enforce control
Meta Data Analysis
A read-only pilot can query a bounded date range and propose explanations. Validate definitions, missingness and alternative causes before acting.
From a brief to a draft change set—reviewed before submission.
The natural-language brief
A controlled service can translate the brief into validated draft objects. A human reviews previews, policy, tracking and budget before a separate publisher acts.
What Claude actually does under the hood
- Proposes a PAUSED campaign (objective + budget strategy)
- Validates draft ad sets (audience, placements, schedule)
- Checks approved creatives, rights, copy, links and disclosures
- Sets up monitoring rules in the same loop
- Reports back: campaign IDs, preview links, and what to verify
Meta reports media delivery. Shopify reports commerce events. Neither alone is causal truth.
How Claude talks to your store
Start with the minimum scopes
- Read-only first — request only the fields and retention window needed for the stated evaluation
- Customer data — avoid it unless necessary; document lawful basis, access, deletion and protected-data requirements
- Write scopes — use a separate service identity only after review; never mix with the analyst credential
- Theme changes — create previews in a duplicate theme; require accessibility and regression checks
- Versioning — pin the Admin API version and test before its support window ends
Shopify Data Analysis
Use a minimized or synthetic dataset first. Reconcile totals to the source system and document exclusions before interpreting a cohort.
Cross-Reference: Meta × Shopify
This join can describe tracked orders after reconciliation. It does not by itself prove that advertising caused those orders.
Use incrementality tests for causal questions. Keep source queries and reconciliation evidence.
Keep analysis read-only. Propose reviewed writes separately.
separate executor enforces approved writes
Draft product changes
Create a typed diff against a development store. Validate handles, variants, rights, accessibility and inventory references before approval.
Pricing proposals
Surface evidence and constraints; finance and merchandising owners approve every price or margin change.
Collection previews
Preview deterministic rules in a test collection and check inventory, locale and merchandising exceptions.
Customer + order proposals
Minimize personal data. Refunds, cancellations and material customer decisions stay with authorized humans.
Discount drafts
Validate eligibility, stacking, dates, markets and caps in a dev store; approve and publish through a separate identity.
Bounded operations only
APIs expose specific authorized operations—not every Admin action. Enforce allowlists, idempotency, logs and rollback.
Theme proposals + CRO tests with engineering and accessibility review.
Theme + UX
- Edit a duplicate development theme and inspect the exact Liquid diff
- Preview section variants before any production publish
- Wire only authenticated, representative reviews and substantiated claims with rights and required disclosures
- Mobile, keyboard, screen-reader, performance and visual-regression checks before approval
CRO loop
- Read funnel data → propose hypothesis
- Build the variant in theme code
- Set up the split (theme A/B or app)
- Read the result with uncertainty → owner decides whether to keep, stop or iterate
Prioritize hypotheses with evidence and expected decision value. Faster output is useful only when experiments remain valid, accessible and reversible.
Automate observation. Keep material decisions governed.
Time triggers
Run a bounded read-only check, attach data freshness and emit a report with no write credential.
Event triggers
Validate signed events, deduplicate them and propose a response. Sensitive actions wait for an owner.
Threshold alerts
Use baselines, minimum sample sizes and lag windows. Alert with evidence; do not apply a universal ROAS rule.
External signals
Record the source, timestamp and uncertainty. Treat competitor, weather or news signals as context—not causation.
Support signals
Minimize message data, restrict access and draft a response. A trained person owns refunds and safety escalation.
Service → service
Use typed contracts, per-tenant authorization, trace IDs, timeouts, circuit breakers and an auditable stop control.
Build it on your laptop. Ship it to the cloud.
Where you'll start
A local sandbox is useful for synthetic fixtures and dry runs. Local execution can still read files, invoke tools and use the network you allow; keep credentials out until controls are tested.
Where you'll graduate to
Production needs hardened infrastructure: separate tenants, least-privilege identities, network allowlists, encrypted secrets, observability, budgets, incident response and tested rollback.
A local fixture can test logic but does not prove production readiness. Cloud deployment requires a fresh architecture and security review, tenant isolation, credential separation, load and failure tests, monitoring, incident response, and rollback.
Choose opportunities by validated user need, not scarcity claims.
Decision support
Test whether a cited daily brief improves one defined decision without hiding data gaps or reducing accountability.
Client-safe operations
Build strict tenant separation, client-specific approvals and evidence packs before testing any capacity benefit.
Experiment support
Draft hypotheses and variants while humans protect experiment validity, accessibility and brand quality.
Data reliability
Improve event contracts, reconciliation and observability—the foundations every model-dependent workflow needs.
Bounded tools
Choose a narrow workflow with an identifiable user, measurable baseline and reversible failure mode.
Governance training
Teach source verification, privacy, permissions, evaluation and incident drills alongside prompting.
The next step is not deployment. Write a one-page pilot contract: decision, owner, data boundary, baseline, evaluation set, stop condition and rollback.

Q & A
Now the part that actually matters.
Mazin Zaki · Avamartech · #martech