A systemd service keeps the loop running on a Linux VPS. Each cycle picks a mode from the week’s publish count: build (design and publish), design only (cooldown active), or maintain (weekly cap reached, SEO only).
Built with
Ubuntu, systemd, Bash (loop.sh)
Produces
A mode decision for the cycle, logged to loop.log
Safeguard
Errors go to a separate log; one failed phase never stops the loop silently
Runs before any work. It confirms every required key is set, calls Shopify and Canva to prove the tokens work, and refreshes an expired Canva token. If a credential is broken, the loop exits and nothing runs.
Built with
Python (preflight.py), Shopify Admin API, Canva Connect API
Six agents run in order, each handing its work to the next: Niche Scout, Market Research Analyst, Brand Strategist, Visual Identity Director, Copywriter and SEO Strategist, and Launch Asset Planner. Together they produce the brand guide every later phase reads.
Built with
CrewAI (sequential process), Claude through the Anthropic API
Produces
brand_guide.md: niche, buyer, positioning, visual identity, and launch plan
The Niche Scout and the Market Research Analyst search the web through Serper: competitor stores, buyer reviews, and keywords. The other four agents work only from the context passed to them, which keeps search costs predictable.
Built with
Serper API through the CrewAI tool interface
Used by
Niche Scout and Market Research Analyst only
Safeguard
Search results are inputs to the agents, never instructions to the pipeline
Reads the brand guide and has Claude write each product’s concept, SEO title, at least 13 tags, and a full description in a fixed structure that later phases can parse.
Calls the Anthropic API with Canva’s remote MCP server attached, so Claude designs six listing images in Canva (hero, features and price, preview, how it works, trust, and bundle), then exports and saves them.
Built with
Anthropic API MCP connector, Canva remote MCP server
Produces
Six JPEG mockups per product, queued in SQLite
Cadence
One new product designed per build or design cycle
Renames and resizes every mockup to a 2000 by 2000 pixel JPEG, builds a structured listing payload from the SQLite queue, and stages the files in one folder for upload.
Built with
Python, Pillow, SQLite
Produces
listing.json and images in ReadyToUpload
Next
Hands off to the validator; nothing is uploaded from here
Checks each listing against Shopify’s limits: title length, tag count and length, description length, price range, and at least one image. Any failure is written to the run log and halts that product.
Built with
Python (pre_upload_validator.py)
Checks
Title, tags, description, price, and images
Safeguard
Fails closed: an invalid listing never reaches Shopify
Creates the product with its images and template link, then records the Shopify product ID and URL in SQLite. A weekly cap (five by default) and a 24-hour cooldown limit how much can go live.
Built with
Shopify Admin REST API, custom app with scoped access
After publishing, an SEO pass compares tags with Google Shopping competitors and updates tags and SEO metafields, a sales sync pulls Shopify orders, and a daily health report flags failures and any product stuck for more than 48 hours.
Built with
Python, Serper API, Shopify Admin API, Gmail SMTP
Produces
SEO review and sales tables, daily health report, and email digest
Status
Health report and digest run now; SEO and sales measurement start with live listings
One local database holds the work queue, published listings, a run log for every phase, the SEO audit trail, and sales. Any run can be traced after the fact.
Every API call goes through one retry layer. Rate limits and server errors retry at 2, 4, and 8 seconds and honor Retry-After; other client errors fail at once. Five failures in a row to one host open a circuit breaker for five minutes.
API keys and OAuth tokens live only in a git-ignored .env file; .env.example lists the names without values. gitleaks scans before every commit and again in GitHub Actions, with a pip-audit dependency check.
Every phase writes to the loop log, failures also go to a separate error log, and the daily digest summarizes pipeline health, so problems surface without anyone watching a terminal.
Architecture of the multi-agent commerce pipeline, drawn from the public repository. Nothing reaches Shopify without passing both gates.
Business problem
A small online catalog needs research, design, and listing work every week. Done by hand, it does not scale. Handed to unattended AI agents with API keys, it risks junk listings, leaked credentials, and runaway API use.
Technical architecture
A scheduled loop on a VPS runs a six-agent CrewAI team on Claude for research and copy, Claude with Canva’s MCP server for design, and the Shopify Admin API for publishing. Two gates sit in the path: a credential check before any work and a validator before anything goes live.
Business value
The weekly catalog work runs without me, inside limits I set: a publishing cap, a cooldown, retry limits, and a daily report. Every step is logged, so a failure is diagnosable instead of silent. Live sales results come after the first month of publishing.
7/7pipeline phases built and tested
10/10automated tests passing
0secrets in the repository
5validation checks before a listing can publish
The problem
Running a small print-on-demand catalog means research, copywriting, design and listing work every week. Agents can do most of it, but an unattended agent with API keys can also publish junk, leak credentials or burn through rate limits overnight.
The goal was a pipeline that could run without me, and could be trusted to stop itself.
My role
I wrote the requirements, chose the stack and set every guardrail. Claude drafted the code against those requirements; I reviewed each change, ran the tests and decided what merged. I also operate it: the VPS, the credentials and the daily health report.
How it runs
It runs unattended on a VPS under systemd, cycling through build, design and maintain modes depending on publish limits and configured cooldowns.
The test suite, run against the public repository in October 2026.
The guardrails
CredentialsAPI keys and OAuth tokens stay in .env; .env.example documents the variables without values.
Scanninggitleaks runs pre-commit and again in GitHub Actions on every pull request, with a pip-audit dependency check.
OAuthCanva tokens come from an OAuth PKCE setup script, Shopify credentials from a verified setup script; both checked at preflight.
ValidationTitle length, tag count, price range and asset readiness checked before any live publish.
ResilienceExponential backoff on rate limits and server errors; publish limits and cooldowns prevent burst automation.
OperationsSQLite tracks queue state, listings, run logs, SEO reviews and sales, so failures are diagnosable.
When it fails
Every failure has a defined outcome. The pipeline stops, waits or reports; it never guesses.
Bad credentialsPreflight checks Shopify, Canva and Anthropic before any work starts. If one fails, the loop exits and nothing runs.
Invalid listingThe validator writes the error to the run log and halts that product. Nothing reaches Shopify.
API errorsRate limits and server errors retry at 2, 4 and 8 seconds, honoring Retry-After. Five failures in a row open a circuit breaker for five minutes.
Runaway publishingA weekly cap and a 24-hour cooldown limit how much can go live. At the cap, the loop switches to SEO maintenance only.
Silent failuresErrors go to a separate log, and the daily health report flags any product stuck for more than 48 hours. I read that report and the daily email digest.