Avamartech Avamartech Archived · 28 Apr 2026
Archived Session · 28 April 2026

AGENTIC AI in Performance Marketing & Media Buying

A historical argument for connecting commerce and media data with supervised, testable workflows.

20 Sections 4 Historical Demos Meta + Shopify Avamartech S1
§ 01 / A Why Generative AI Hits a Wall in Media Buying

Look at how much data a media buyer is supposed to hold in their head.

Internal sources
+ 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 etc

EXTERNAL 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 …limitless

The 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.

§ 01 / B The Myth We've All Heard
"الدنيا نايمة ليه؟"
▼ ▼ ▼
THERE MAY BE SEVERAL EXPLANATIONS — treat every explanation as a hypothesis until the evidence supports it.

A governed workflow can help organize evidence; it cannot reveal a hidden cause by itself.

§ 01 / C What Really Is Agentic AI?

Compare a bounded model call with a controlled multi-step workflow.

GENERATIVE AI

One bounded invocation under a defined contract.

INPUT → MODEL → OUTPUT
  • 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.
ChatGPT (chat mode) Claude (chat) Gemini (chat)
VS
AGENTIC AI

A loop with eyes, hands & memory.

PLAN → ACT → READ → REVISE → ACT → …
  • 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.
Claude Code · evaluate for your task Codex Gemini CLI Manus
§ 02 What This Session Covers — End to End

From why → to a historical demo → to controlled pilots.

Archived deck
historical demos
not a runbook
04
Will my ad accounts get banned?
The myth · The API truth
05
Types of agentic AI — what to use, what NOT to use
Code vs Cowork vs Extension
06
Will AI replace media buyers?
The honest answer
07
Methodology over steps
How to watch a demo
08
Installing Claude Code
3 commands
09
Integrating Meta
Graph API + MCP
10
Meta data analysis
Archived demo
11
Creating ads on Meta
Programmatic
12
Integrating Shopify
Admin API
13
Shopify data analysis
Archived demo
14
Cross-reference: Meta × Shopify
Archived demo
15
Agentic actions — Shopify backend
Create products, fix data
17
Agentic actions — Shopify frontend
Theme + CRO
18
Trigger-based proposals
Observe · review · approve
19
Local host vs cloud host
Where it actually runs
20
Huge opportunities — what to build now
The wide-open market
§ 03 Who I Am — & Why I'm Talking About This
Mazin Zaki

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.

04 yrs
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.

↳ NOW
MarTech

Connecting measurement, systems, controls, and accountable marketing decisions.

§ 04 "But Won't My Ad Account Get Restricted?"

This isn't new tech. It's three old systems + one new helper.

Official APIs reduce risk.
They do not waive policy.
Review current terms and permissions.
VERSIONED PLATFORM API

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.com
DECADES OLD

The 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-mediabuying
THE NEW PIECE

Claude 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/code
YOU'VE SEEN THIS BEFORE → Magic AdX ConvertedIn Ad Signals (Depth Mandala) Smartly Madgicx Examples require current verification
§ 05 Types of Agentic AI — What To Use & What NOT To Use

Choose an interface by policy, permissions and evidence—not a universal safety label.

PREFER DOCUMENTED APIs

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.

CONTROL THE RISK →
Separate read and write credentials, allowlist operations, log requests and require approval for changes.
AVOID FOR ADS MGR

Claude / "Cowork" agents

An AI that drives a virtual computer for you — clicking, typing, scrolling on the actual Ads Manager UI.

WHY RISKY →
UI automation can be brittle and may conflict with platform terms. Check the current policy before use.
AVOID FOR ADS MGR

Chrome / browser extensions

Claude / GPT extensions that "use the page" inside your logged-in session.

WHY RISKY →
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.

§ 06 Will AI Replace Media Buyers / Performance Marketers?
THE OUTCOME IS NOT PREDETERMINED.

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.

§ 07 Before We Start — How To Watch What Comes Next

Watch the methodology, not the keystrokes.

Every step has implementation detail.
Preserve controls, tests, and failure handling.
★ THE ONLY RULE

Define the task, evidence, controls, and acceptance tests before iterating on implementation.

→ Don't try to memorize commands. Memorize the shape of the loop.
01
Pause between sections

We stop, take questions, and discuss real use cases — that's where the value compounds.

02
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.

03
Demos are deliberately simple

The point is the pattern: connect data → analyze → act → automate. Scale it later.

04
Keep the demo synthetic

Translate the method only after a tenant-specific threat model, lawful data review, task eval, and human approval design.

§ 08 Installing Claude Code

Historical setup. Verify the current official install guide first.

Reviewed 31 Aug 2026
Never install with sudo
01
Check the official requirements

Supported installation methods and runtime requirements change. Use Anthropic's current setup page for your operating system.

→ Verify current requirements on the official documentation domain
02
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.

→ Current official Claude Code setup documentation
03
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.

→ Launch only from a reviewed synthetic fixture workspace
§ 09 Integrating Meta — Wiring Claude Into Your Ads Account

Separate read authority from write authority.

THE FLOW

How Claude Code talks to Meta

CLAUDE CODE your terminal
↓
META MCP SERVER tool layer
↓
META GRAPH API 17 yrs old
↓
SANDBOX / TEST ACCOUNT read first

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
⚠ Treat tokens like passwords. Never paste them into chat or commit them. Use an approved secret manager, short lifetimes and rotation.
ARCHIVED DEMO 01 · NOT CONNECTED

Meta Data Analysis

A read-only pilot can query a bounded date range and propose explanations. Validate definitions, missingness and alternative causes before acting.

"Why did ROAS drop yesterday?" "Which 3 creatives are dying?" "Compare this week vs last."
→ Historically queried Insights via Graph API
→ Cross-checks vs creative + audience
→ Returns a written diagnosis, not a dashboard
§ 11 Creating Ads on Meta — Programmatically

From a brief to a draft change set—reviewed before submission.

The natural-language brief

"Draft a PAUSED test campaign from approved assets in the sandbox account. Validate policy, targeting, budget and tracking. Return the proposed objects and diffs for approval; do not publish."

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
Official API ≠ automatic compliance. Review current terms.
§ 12 Integrating Shopify — The Other Half of the Brain

Meta reports media delivery. Shopify reports commerce events. Neither alone is causal truth.

THE FLOW

How Claude talks to your store

CLAUDE CODE your terminal
↓
SHOPIFY MCP / ADMIN CLIENT tool layer
↓
SHOPIFY ADMIN GRAPHQL API official
↓
DEV STORE / MINIMIZED EXPORT read first

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
→ Use the current Shopify app authorization flow. Store credentials in an approved secret manager; rotate and audit them.
ARCHIVED DEMO 02 · NOT CONNECTED

Shopify Data Analysis

Use a minimized or synthetic dataset first. Reconcile totals to the source system and document exclusions before interpreting a cohort.

"Top 10 SKUs by margin this month" "Return reasons clustered by SKU" "Repeat-customer LTV by source"
→ Queries a bounded Shopify GraphQL dataset
→ Joins orders × products × customers
→ Returns the answer + the SQL/GraphQL it ran
ARCHIVED DEMO 03 · HYPOTHESIS ONLY

Cross-Reference: Meta × Shopify

This join can describe tracked orders after reconciliation. It does not by itself prove that advertising caused those orders.

"Which campaigns drive profitable customers — not just orders?"
→ Pull Meta spend + UTM by campaign
→ Match against Shopify orders + returns
→ Output: observed tracked revenue net of included refunds, with coverage and lag notes

Use incrementality tests for causal questions. Keep source queries and reconciliation evidence.

§ 15 Agentic Actions — Shopify Backend

Keep analysis read-only. Propose reviewed writes separately.

Model drafts a typed proposal
separate executor enforces approved writes
01

Draft product changes

Create a typed diff against a development store. Validate handles, variants, rights, accessibility and inventory references before approval.

02

Pricing proposals

Surface evidence and constraints; finance and merchandising owners approve every price or margin change.

03

Collection previews

Preview deterministic rules in a test collection and check inventory, locale and merchandising exceptions.

04

Customer + order proposals

Minimize personal data. Refunds, cancellations and material customer decisions stay with authorized humans.

05

Discount drafts

Validate eligibility, stacking, dates, markets and caps in a dev store; approve and publish through a separate identity.

06

Bounded operations only

APIs expose specific authorized operations—not every Admin action. Enforce allowlists, idempotency, logs and rollback.

§ 17 Agentic Actions — Shopify Frontend & CRO

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
Measure cycle time and quality in your own pilot.

Prioritize hypotheses with evidence and expected decision value. Faster output is useful only when experiments remain valid, accessible and reversible.

§ 18 Supervised Triggers — Observe, Propose, Approve

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.

§ 19 Local Host vs Cloud Host — Where This Actually Runs

Build it on your laptop. Ship it to the cloud.

LOCAL · YOUR MACHINE

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.

BEST FOR → development, experimentation, demos, single-operator workflows.
Synthetic fixturesDry runStill permissioned code
CLOUD · A SERVER

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.

ONLY AFTER → representative and adversarial evaluation, shadow mode, owner sign-off and a canary.
MonitoredRate-limitedRecoverable

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.

§ 20 Candidate Opportunities — What To Validate Next

Choose opportunities by validated user need, not scarcity claims.

In-house ops · Agencies · Solo operators · Tool builders
01 · IN-HOUSE
Decision support

Test whether a cited daily brief improves one defined decision without hiding data gaps or reducing accountability.

02 · AGENCY
Client-safe operations

Build strict tenant separation, client-specific approvals and evidence packs before testing any capacity benefit.

03 · CRO
Experiment support

Draft hypotheses and variants while humans protect experiment validity, accessibility and brand quality.

04 · MARTECH
Data reliability

Improve event contracts, reconciliation and observability—the foundations every model-dependent workflow needs.

05 · BUILDERS
Bounded tools

Choose a narrow workflow with an identifiable user, measurable baseline and reversible failure mode.

06 · ENABLEMENT
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

Keyboard navigation

→Next slide ←Previous slide SpaceNext slide PgDnNext slide PgUpPrevious slide HomeJump to first slide EndJump to last slide FToggle fullscreen ?Show / hide this help 1-9Jump by index (single digit)

Press ? or Esc to close