Inspiration

In modern Hollywood and digital entertainment streaming, massive amounts of viewer telemetry, box office pre-sales, and ad attribution data are generated every second. Yet, studio executives and post-production directors are still making multimillion-dollar decisions based on stale, delayed spreadsheets and disconnected dashboards.

When a theatrical release underperforms on opening night or a $150M streaming blockbuster suffers mid-movie viewer drop-offs, every hour of delay in re-cutting trailers or reallocating marketing spend costs millions. We were inspired by Agentic AI and the power of Google Gemini paired with ClickHouse's sub-millisecond OLAP analytics to build CineMetric AIβ€”an autonomous studio director and distribution intelligence network that monitors, diagnoses, and acts on real-time cinematic telemetry.


What it does

CineMetric AI is an autonomous multi-agent studio operations system that continuously ingests streaming playback logs, frame-level attention metrics, global box office tracking, and digital marketing spend.

Key capabilities include:

  1. Audience Retention & Drop-Off Diagnostics: Queries sub-second ClickHouse aggregations across 100,000+ playback events to pinpoint exact scene timestamps, dialogue slumps, or audio imbalances causing viewer drop-off.
  2. Autonomous Scene & Trailer Pacing Optimization: Analyzes engagement curves to recommend dynamic trailer re-edits, alternate cut sequences, and social-first teaser hooks.
  3. Global Box Office Radar: Compares real-time pre-sales and daily gross velocity across 25+ international territories against historical blockbuster comp curves.
  4. Dynamic Ad-Spend Reallocation: Autonomously executes marketing budget transfers from underperforming channels (e.g., low-CTR display ads) to hyper-converting channels (e.g., high-ROAS TikTok and Connected TV) in real time.
  5. Interactive Executive Studio Deck: Provides a real-time Hollywood dark-mode command center with live ClickHouse SQL query tracing and step-by-step agent reasoning logs.

How we built it

We designed CineMetric AI as an end-to-end, enterprise-grade multi-agent architecture:

  • Core Agent Intelligence: Built on Google Gemini (Gemini 2.5 Flash / Gemini Enterprise) with structured tool calling and autonomous reasoning loops.
  • Specialized Agent Hierarchy:
    • Executive Producer Agent (Orchestrator): Coordinates studio directives and synthesizes cross-department strategy.
    • Audience Retention Agent: Specializes in streaming telemetry and frame-level attention drop-offs.
    • Scene Pacing Agent: Evaluates narrative rhythms, trailer cut-points, and emotional resonance scores.
    • Distribution & Marketing Agent: Evaluates international box office pacing and optimizes ad spend.
  • Data & OLAP Engine: Powered by ClickHouse (clickhouse-connect and high-speed columnar OLAP storage), enabling real-time vectorized queries over 100,000+ telemetry rows in under 10 milliseconds.
  • Backend: Python & FastAPI with asynchronous tool dispatching and real-time streaming updates.
  • Frontend: React & TypeScript with Tailwind CSS, Lucide Icons, and Recharts, delivering a cinematic dark-mode studio operations deck.

Challenges we ran into

  1. Sub-Millisecond Aggregation Across High-Volume Telemetry: Media playback generates dense time-series telemetry (pause, seek, buffer, quality switches). Designing ClickHouse schema partitioning and indexed aggregations was essential to ensure Gemini agents could query millions of rows in milliseconds without stalling conversational turns.
  2. Deterministic Agent Action Guardrails: We needed to ensure that while agents could autonomously recommend and execute budget reallocations and scene cut lists, all actions remained fully auditable with transparent SQL execution logs.
  3. Multi-Agent Synthesis: Creating a structured communication protocol between the Audience Retention Agent and the Marketing Agent so that scene fatigue data directly informs advertising trailer selections.

Accomplishments that we're proud of

  • True Sub-10ms ClickHouse Query Latency: Achieving blazing-fast analytical queries that allow Gemini agents to execute multiple deep-dive database aggregations within a single user turn.
  • Deterministic Closed-Loop Automation: Building an agent that doesn't just chat about problems, but actually executes ClickHouse updates to reallocate marketing budgets and generate actionable editing cut-lists.
  • Hollywood-Grade UX: Designing an intuitive, cinematic dark-mode command center that makes complex OLAP data and multi-agent reasoning immediately accessible to studio executives.

What we learned

  • How to combine Google Gemini's advanced tool-calling reasoning with ClickHouse's raw columnar speed for real-time decision-making.
  • The nuances of modern Media & Entertainment distribution pipelines, from territory-specific box office decay curves to second-by-second streaming attention retention.
  • Best practices for designing resilient multi-agent orchestration architectures with transparent reasoning traces.

What's next for CineMetric AI: The Agentic Director

  • Direct NLE Integration: Building direct export plugins for Adobe Premiere Pro, DaVinci Resolve, and Final Cut Pro to import AI-recommended cut-points directly into the editor's timeline.
  • Real-Time Video Multimodal Ingestion: Linking Gemini 1.5/2.5 video understanding directly with ClickHouse telemetry to automatically correlate video frame visual features with audience heart-rate/eye-tracking biometrics.
  • Automated Programmatic Ad Buying APIs: Connecting the Marketing Agent directly to Google Ads and TikTok Marketing APIs for live, autonomous ad bid management.

Built With

Share this project:

Updates

Submission history