AI agents and automation systems I've built — and use on real accounts
I'm a performance marketer who builds the systems behind the work. Over the last year I designed and shipped AI agents and automation tools that run on real ad accounts and real stores: an autonomous media-buying platform (22.7K lines of TypeScript, 43 data models, 25,675 real performance snapshots), a video-editing pipeline that cuts raw footage without losing a word, engines that turn a store URL into an audit or a batch of ad creatives, and the automation that runs my own operations. Each one below has its stack, what it actually does, and its honest status.
Why a marketer builds systems
Most growth work is the same decisions made again every day: read the numbers, find the leak, produce the next creative, report. I turn those repeat decisions into software — with a human approving anything that spends money — so the team spends its time on judgment, not on copying numbers between tabs.
1. Autonomous media-buying platform
What it does: connects to Meta ad accounts, ingests performance data on a schedule, scores what changed, proposes actions (pause, scale, reallocate) and executes only what a human approves.
- Scale: 22,697 lines of strict TypeScript · 43 Prisma models · 20 test suites · 13,625 entities and 25,675 real performance snapshots from 5 live accounts.
- Live API work: 1,264 real Meta Marketing API calls at 92.5% success, 358 days of history ingested.
- Safety by design: an 11-rule safety gate that reads limits from the database (not from the AI's proposal) and reports every reason a proposal is blocked; the AI layer is fully separated from anything that spends money.
- No-fabrication rule, enforced in code: every decision must cite the snapshot rows behind its numbers, and a validator re-reads those rows before the decision is released — an invented metric is structurally impossible, not just discouraged in a prompt.
- A finding most teams miss: Meta's rate limit on development access is CPU-bound, not call-bound (call count never passed 6% while CPU time hit 80%) — which caps naive hourly polling at roughly 20 accounts. The scheduler was redesigned around a cheap change-detection tick that only escalates to a deep (AI) pass when the change is material.
- Honest status: reads run live on real accounts; the write path is built and tested end-to-end against a mock and is deliberately switched off until a sandbox ad account is in place. Zero writes have ever hit a client account.
Stack: Next.js 15, React 19, TypeScript, Prisma, libSQL/Turso, Meta Marketing API.
2. Daily media-buying and creative agents on a live store
For an ecommerce client selling around EGP 250K a day (anonymised under NDA), I built Claude-based agents that run the daily routine: read the numbers, flag ads spending without returning, surface what to scale, and track ROAS and cost per purchase — while I set the strategy and make the large calls. A companion creative engine turns one winning video dropped into a folder into many variations (sound, voiceover, element swaps) with edits cut to the beat.
3. Automated video-editing pipeline
Raw talking-head footage in, finished vertical video out — no manual editing.
- Whisper transcription with word-level timing; silence cut from the audio energy envelope (not from transcript timing, which smears into silence and clips quiet first words).
- Retake detection: I repeat sentences to get the best take, so the system scores every version — face toward camera, pronunciation confidence, pauses, completeness — instead of assuming the last take wins. On real footage it picked the earlier take in 2 of 4 cases.
- Gaze detection to drop moments of reading off-screen (94% accuracy on a calibrated setup); motion graphics and word-by-word Arabic captions rendered in code with Remotion.
- Result on one real video: 71.8s down to 51.7s with no word lost, verified by re-transcribing the output.
Stack: Python, Whisper, NumPy, ffmpeg/libass (including a fix for Arabic bidi ordering in burned captions), Remotion.
4. Store audit and preview engine
A store URL in, a sales-ready PDF out in about 40 seconds: it pulls the catalogue, screenshots the store, detects the vertical, country and season, runs an automatic CRO diagnosis, and renders the client's own products on four theme previews. I run it several times a day for new prospects.
A newer version audits any site — not only Shopify — by walking the real purchase path on mobile, then injecting the proposed fixes into the live page's DOM to produce honest before/after screenshots of the same store.
Stack: Node.js, Puppeteer, pdf-lib, Python.
5. Static ad creative engine
Pulls a Shopify catalogue, cuts products out of their backgrounds, places them into 16 coded ad layouts (Arabic RTL and English LTR), and renders feed and story sizes in headless Chrome. Packaged as a Claude skill and shared publicly as a free kit with a framework sheet and setup guide.
Stack: Python, rembg, HTML/CSS templates, headless Chrome.
6. Offer engine
I took a complex offer-planning spreadsheet (65 offer types) and re-implemented its formulas one-to-one in code, with a self-test that matches 689 values against the original sheet. In the process it exposed hard-coded values in the source sheet that silently produced wrong numbers for any product but the sample. It now asks for a brand's real numbers and outputs a branded offer deck.
7. Operations automation
- Automatic daily work log: reads the day's AI working sessions, summarises them with Claude, and writes a structured log into ClickUp three times a day via launchd. When it started timing out, I traced it to the laptop sleeping mid-run (not the API) and fixed it with caffeinate, schedule windows and retries.
- LinkedIn publishing scheduler: official LinkedIn API, a local post queue with one-post-a-day and daytime-only rules, PDF carousels and images supported.
- Founder OS: a private 21-page dashboard (Next.js, Prisma, Turso, authenticated) for agency revenue, cash, accounts and decisions.
8. Websites built for search and AI answers
Both this site and saduq.agency (80+ pages in Arabic and English) are generated from Python with structured data, llms.txt and IndexNow. After that work, ChatGPT began browsing and citing this site directly when asked about media buyers in Egypt.
How I build AI systems
- Safety before execution, execution before AI. Guards are built first, so nothing is bolted onto a system that is already spending money.
- Humans approve money. Agents propose and run routine work; anything that changes spend needs approval and is logged.
- No invented numbers. Every figure traces to a row, a screenshot or an API response.
- Measure on real data, then claim. Each result above was checked against real accounts or real output.
- AI-native workflow. I architect, specify and verify; Claude Code is my engineering partner for much of the implementation — which is how one person ships systems at this scale.
Stack at a glance
TypeScript, Next.js, React, Prisma, SQLite/libSQL/Turso · Python, NumPy, Pillow, Whisper · Node.js, Puppeteer · Claude API and Claude Code (agents, skills) · Meta Marketing API, Shopify Admin API, LinkedIn API, ClickUp API · Remotion · Vercel, launchd.
The marketing side of my work — 7+ years, 40+ brands, documented results — is on the English homepage and in the case studies.
Frequently asked questions
What kind of AI agents does Ahmed Ebrahem build?
Agents for growth operations: an autonomous media-buying platform for Meta ads with human approval on spend, daily media-buying and creative agents for a live ecommerce store, and automation for video editing, store audits, ad creatives, offers and internal operations.
Are these systems used on real accounts?
Yes. The media-buying platform reads live data from real ad accounts (1,264 API calls, 25,675 snapshots); its write path is tested on a mock and switched off until a sandbox account exists. The store-audit, creative and video tools are used in client work every week.
What stack does he use?
TypeScript and Next.js with Prisma for applications, Python for data, video and image pipelines, Node.js and Puppeteer for browser automation, and the Claude API and Claude Code for agents, alongside the Meta, Shopify, LinkedIn and ClickUp APIs.
Does he write the code himself?
He architects and specifies each system and verifies it against real data, using Claude Code as an engineering partner for much of the implementation.
How can I contact him?
By email at agriahmedebrahem@gmail.com, or on LinkedIn.
Hiring for growth, performance or AI-automation work — or need one of these systems built?
Email me