Inspiration

Advertising operations is broken. A trend emerges on a Monday morning - by the time a human team has briefed creatives, run it through compliance, allocated budget, and built the ad variants, it's Thursday and the moment has passed. I asked: what if the entire ops workflow - trend discovery, brand evaluation, creative generation, compliance review, and campaign staging - could run autonomously in minutes, with a human only stepping in to approve or reject the output?

TrendJack is the answer.

What I Built

TrendJack is a Fortified Enterprise Fleet of 12 specialized AI agents that operate as a fully autonomous advertising operations center. The system continuously scans for emerging trends, runs each one through a multi-stage evaluation pipeline, and either stages a production-ready campaign or rejects it - all without human initiation.

The Agent Fleet

Each agent owns a distinct responsibility and cannot override the others:

Agent Role
Context Analyst Maps cultural and source context behind the trend
Authenticity Agent Verifies the trend is organic, not astroturfed
Brand Guardian Checks the trend against brand values and no-go zones
Audience Strategist Identifies targetable audience segments
Risk Guardian Flags reputational and legal hazards
Creative Director Generates campaign concept directions
Copywriter Produces all ad copy variants across formats
Media Planner Allocates budget across Google and Meta placements
Compliance Reviewer Checks every variant against ASA (South Africa) standards
Red Team Reviewer Adversarially probes the campaign for misuse potential
Technical QA Validates creative assets against platform spec requirements
Policy Engine Deterministic hard gate - AI agents advise, the policy engine decides

The Policy Engine - AI Advises, Rules Decide

The most important architectural decision: the Policy Engine is not an AI model. It is a deterministic rule evaluator that runs against every run at every gate. Agents score, flag, and recommend - but the Policy Engine has the final verdict (AUTO_STAGE, REVIEW, HOLD, or REJECT). This is intentional: no hallucination or prompt injection can override a hard-coded business rule.

The Command Centre

The human interface is a real-time operations dashboard - not a form. Users observe the fleet working: agents light up as they execute, confidence scores accumulate, policy gates open or close, and a campaign either surfaces in the staging queue or is rejected with a full audit trail.

How I Built It

Backend: FastAPI on Cloud Run, async throughout (asyncpg + SQLModel + Postgres on Cloud SQL). All 12 agents are orchestrated via the Google GenAI SDK with Gemini 3.7 Flash on Vertex AI (locations/global). Agents are registered in the Vertex AI Agent Registry using the A2A v1.0 protocol.

Frontend: Next.js 15 (App Router) on Cloud Run, real-time polling via TanStack Query, Framer Motion for agent activity animations, and a dark command-centre design aesthetic inspired by Palantir and Linear.

Infrastructure: Fully deployed on Google Cloud - Cloud Run (autoscaling, zero cold-start penalty for demo), Cloud SQL (Postgres), Artifact Registry, Cloud Build, Secret Manager for database credentials.

Challenges

Agent coordination without a shared mutable state: Each agent receives a read-only snapshot of the run and writes back structured output. This prevents agents from influencing each other mid-run while keeping the audit trail clean.

Gemini 3.7 Flash availability: The model is only published at locations/global - using us-central1 returns a 404. This took longer than it should have to diagnose.

The Policy Engine independence problem: Early versions had agent outputs directly influencing pipeline flow. I refactored so all routing decisions are made by the deterministic policy layer, with agents contributing evidence only. This makes the system auditable and manipulation-resistant.

Making autonomy legible: An ops center that just works in the background isn't compelling. I invested heavily in the Command Centre UI to make the fleet's reasoning visible - confidence scores, per-agent summaries, audit timelines, and policy verdicts - so the human can trust and verify what the system decided.

What I Learned

A fleet of agents is only as trustworthy as its least-governed component. The insight that changed the architecture: AI should advise, deterministic rules should decide. Every production AI system that touches money or reputation needs a hard policy layer that no model output can bypass.

Built With

Share this project:

Updates

Submission history