Skip to main content
    Case Study · Roads Consulting Group US

    marketingAI

    A production full-stack AI marketing SaaS that combines Pydantic AI generation, human approval controls, durable job execution, and Cloudflare-hosted web and API services.

    Project Context & Scope

    Company
    Roads Consulting Group US
    Role
    Automation Engineer / Full-Stack AI Lead
    Period
    Nov 2025 – Jul 2026
    Scope
    Full-stack AI SaaS, human approval workflows & cloud operations

    Problem & Operational Bottleneck

    Marketing workflows crossed AI generation, brand context, approvals, publishing, and channel integrations. Fragmented scripts could not provide one auditable path from request to reviewed output and asynchronous delivery.

    Constraints & Requirements

    • Human approval remained mandatory before publishing or external replies
    • Long-running generation jobs required durable queue and failure states
    • Brand context and structured outputs had to remain consistent across tools
    • Production traffic had to move safely across web, API, queue, database, and object storage

    System Architecture Lifecycle

    Figure 1: marketingAI Multi-Agent Execution Flow
    01 · RequestWeb & API Containers

    Authenticated product requests enter Cloudflare-hosted web and FastAPI services

    02 · DispatchDurable Async Job

    Cloudflare Queues records and dispatches long-running generation work

    03 · AgentPydantic AI Execution

    Typed dependencies and structured tools produce a reviewable result

    04 · ApprovalHuman Review Gate

    Operators review generated content before external publication or replies

    05 · DeliveryChannels & Audit Trail

    Approved work is delivered while PostgreSQL retains operational state

    Detailed architecture diagram illustrating stages and transition safeguards for marketingAI.

    System Architecture & Ownership

    Built a React and TypeScript web application with a Python FastAPI backend and Pydantic AI agents. The current production topology runs web and API services in Cloudflare Containers, dispatches asynchronous work through Cloudflare Queues, and persists data and media in Neon PostgreSQL and R2.

    Engineering Decisions & Rationale

    • Used Pydantic AI for typed dependencies, structured outputs, and explicit tool contracts.
    • Kept approval state and job history durable in PostgreSQL while Cloudflare Queues handles asynchronous dispatch and dead-letter routing.
    • Containerized the web and API services and migrated the production runtime to Cloudflare while retaining documented rollback paths.

    Reliability, Retries & Safeguards

    • Pydantic request, response, and agent-output schemas make invalid states visible at service boundaries.
    • Logfire and OpenTelemetry traces connect application requests to agent execution.
    • Cloudflare Queues and its dead-letter queue preserve asynchronous job outcomes for recovery.
    • Human-in-the-loop approval gates prevent generated content from publishing automatically.

    Evidence & Production Outcomes

    Shipped and maintained in live production at marketingai.roadscg.com, supporting multi-agent marketing generation workflows with strict schema safety and low-latency edge delivery.

    Outcome Summary: Delivered and maintained a live AI SaaS that unifies generation, approval, publishing, and operational workflows behind one auditable product surface.

    Reflection & Engineering Learnings

    The platform made a broader lesson concrete: agent complexity must be matched by explicit approval states, durable job records, and observable service boundaries.

    Need a similar automation system?

    Let's review your operational bottlenecks and design a reliable production pipeline.

    Discuss the bottleneck