Inspiration

Before a studio can react to a film's reception, someone has to actually find out what that reception is. In the middle of a release window, marketing and PR teams are pulling reviews from trade press, scanning social sentiment, and tracking competitor activity manually — often across dozens of sources, multiple times a day. That work doesn't scale, and by the time a human analyst spots a shift in sentiment, the window to react has often already closed.

We wanted to build something that treats PR monitoring the way SRE teams treat system monitoring: continuous, automated, and escalation-driven — but for a film's public perception instead of a server's uptime. That's where CAST (Crisis Analysis & Strategy Tracker) started.

What it does

CAST is an autonomous agent that monitors live web sentiment for a film release and its cast, detects meaningful shifts over time, and drafts an executive-ready PR response — without ever taking action on its own.

Concretely:

  • A studio user registers a film campaign (title + cast) to monitor.
  • On trigger, Gemini, running on Vertex AI, autonomously decides what to investigate — critic reception, audience sentiment, cast controversies, competitive context — and issues live web searches through Parallel's Search API to ground its findings in real, current sources.
  • Gemini synthesizes the results into a structured report: an overall sentiment score, a critic/audience split, key narratives, detected controversies, and a recommended PR pivot — with every claim traceable back to the sources it cited.
  • Each report is stored in Firestore, and compared against the campaign's previous run. If sentiment drops sharply, or is already critically low, the agent flags it as a potential crisis.
  • Rather than acting unilaterally, the agent drafts a pending action and sends a real notification email. A studio "executive" — authenticated via Firebase Auth and verified against a role stored in Firestore — has to explicitly approve or reject the recommendation before anything is considered final.

The result is a system that behaves less like a report generator and more like a junior analyst: it investigates, it concludes, it recommends — but a human still signs off.

How we built it

The stack is entirely Google Cloud-native by design:

  • Vertex AI (Gemini) as the reasoning layer, using native tool-grounding to autonomously drive multi-step web investigation rather than following a hardcoded search sequence.
  • Parallel's Search API, integrated via Gemini's native grounding configuration, as the agent's live connection to the web — the thing that lets it reason about this week's news, not its training data.
  • Firestore as both the state store (campaign history, sentiment deltas over time) and the access-control layer (users/{uid} role documents).
  • Firebase Authentication gating the executive approval flow.
  • Resend for real outbound crisis notifications.
  • Cloud Run hosting the deployed application, with Cloud Scheduler as the intended production trigger for autonomous, unattended monitoring runs.

We deliberately designed the "crisis trigger" as a two-condition gate rather than a single threshold: a sentiment delta has to be both large and backed by high-confidence data before it fires, with a separate absolute floor to catch a campaign that starts out already in trouble. It's a small design choice, but it's the difference between a system that's genuinely useful and one that cries wolf.

Challenges we ran into

Grounding vs. control. Our first implementation used a manual ReAct loop — we called Parallel's API ourselves and fed results back to Gemini turn by turn, which gave us full visibility into every request and response. Partway through, we discovered Google's native grounding integration for Parallel, which let Gemini drive its own multi-step search process far more fluidly — but at the cost of losing direct visibility into Parallel's raw results, since that exchange happens server-side inside Vertex AI. We chose to keep native grounding for its stability and had the agent surface its search queries and cited sources back to the dashboard, so the investigation stays auditable even without raw request/response logging.

Guaranteeing structured output without Controlled Generation. Vertex AI doesn't currently allow combining strict schema enforcement with the search tool in the same call, which meant our structured reports were only as reliable as Gemini's adherence to a prompt instruction. We addressed this with a Pydantic-based validation layer that catches malformed output and retries with the specific validation error fed back to the model — turning an occasional soft failure into a self-correcting loop instead of a silent data corruption bug.

Real governance, not a demo of governance. It would have been easy to gate the approval flow behind a single shared password and call it "IAM." We went back and rebuilt it around genuine Firebase Authentication with a server-side Firestore role check, and deliberately tested the negative case — logging in as a non-executive account — to confirm access was actually denied, not just hidden in the UI.

Cloud-native from the start. Early on it would have been faster to prototype against a bare Gemini API key. We corrected course early to build against Vertex AI specifically, since the hackathon's premise is genuinely Google Cloud-native, enterprise-governed agent architecture — and retrofitting that distinction later would have meant rebuilding the authentication and deployment story from scratch.

Accomplishments that we're proud of

  • A genuinely autonomous investigation loop — Gemini decides what to search for and when it has enough information, rather than following a fixed script.
  • A real, tested access-control boundary, not a cosmetic one.
  • An end-to-end action pipeline: detection → draft → real email notification → human approval → audit trail, all backed by live data.
  • A fully deployed, publicly reachable Cloud Run instance running the complete system, not just a local prototype.

What we learned

The most durable lesson was about where autonomy should — and shouldn't — extend. It was tempting to let the agent go further: auto-send the crisis email, auto-adjust marketing spend. But the more interesting and more enterprise-credible design was the opposite instinct: give the agent real investigative freedom, and then deliberately constrain its authority to act. That tension — autonomous reasoning paired with governed action — turned out to be the actual product, not a compliance checkbox on top of it.

What's next for C.A.S.T - Crisis Analysis & Strategy Tracker

  • Scheduled, unattended monitoring via Cloud Scheduler, so campaigns are checked automatically rather than on manual trigger.
  • Multi-source raw grounding transparency — surfacing Parallel's raw retrieved snippets alongside Gemini's synthesis, for teams that want to audit the evidence directly rather than the model's summary of it.
  • Configurable escalation policies per campaign — letting studios tune sensitivity (delta thresholds, confidence requirements) based on a film's release stage or risk profile.
  • Expanded action integrations — beyond email, direct integration with a studio's existing marketing/ad-spend tooling so an approved pivot can trigger a real downstream workflow, not just a notification.

Built With

Share this project:

Updates

Submission history