🎬 Inspiration

Film and television productions operate under extreme daily financial risk. A major feature film burns $85,000 to $250,000+ USD per day in fixed overhead—paying for A-list cast, crew call times, equipment rentals, soundstages, location permits, and logistics.

When unexpected real-world disruptions strike—a lead actor falling ill, a primary 8K camera rig failing, bad weather washing out outdoor filming, or a key location permit being revoked—line producers are forced to make high-stakes decisions under immense time pressure.

We were inspired to build Production Chaos Controller: an autonomous agentic AI system that instantly evaluates real-time disruption telemetry, builds dynamic resource dependency graphs, calculates deterministic financial & calendar impacts, and presents human-in-the-loop recovery plans for producer sign-off.


⚡ What It Does

Production Chaos Controller transforms chaotic film production emergencies into clear, optimized recovery decisions:

  • 🎭 Actor Unavailability: Automatically detects actor absence and finds indoor cover set swaps ($0 day delay) or calculates calendar extension penalties.
  • 🎥 Equipment Package Failure: Identifies broken camera/grip gear, checks compatibility, verifies crew authorization, and dispatches emergency hot-courier rentals.
  • 🌧️ Weather Washout Protection: Monitors weather-vulnerable outdoor scenes (e.g. mountain summits) and shifts production to Stage 4 soundstages during rain or blizzards.
  • ⚡ Multi-Disruption "Chaos Mode": Analyzes simultaneous compound disasters (e.g., Lead Actor Sick + Camera Failure + Heavy Rain on Day 6), resolves double-booking resource collisions, and outputs unified master recovery plans.
  • 📊 ClickHouse Telemetry & MCP Integration: Queries high-throughput production data across 10 MergeTree tables and exposes an official Model Context Protocol (MCP) tool server (/api/v1/mcp/clickhouse).
  • 🛑 Human-in-the-Loop Sign-off: All AI recovery proposals default to requires_human_approval: true, empowering line producers to Approve, Reject, or Modify plans.

📐 Impact Calculation Formula

The financial impact $I$ of any production disruption is computed dynamically as:

$$\text{Impact } (I) = \left( \Delta t \times \text{Daily Burn Rate} \right) + \sum_{i=1}^{n} \text{Expedite Cost}_i - \sum \text{Location Savings}$$

Where:

  • $\Delta t$: Shooting calendar delay (in days)
  • $\text{Daily Burn Rate}$: Fixed daily overhead (e.g. $\$85,000/\text{day}$)
  • $\text{Expedite Cost}_i$: Emergency replacement rentals, couriers, or day-player hires

🛠️ How We Built It

  • Backend Intelligence: Built with Python 3.12+ and FastAPI, integrated with Google Gemini 2.0 Flash SDK (google-genai) for multi-step agent reasoning and recovery plan synthesis.
  • Analytics Database: Powered by ClickHouse (clickhouse-connect SDK) with 10 optimized MergeTree tables (scenes, schedules, actors, crew, equipment, locations, disruption_history, etc.) and zero-downtime fallback.
  • Protocol: Built a native Model Context Protocol (MCP) tool server (/api/v1/mcp/clickhouse) allowing AI agents to query production metrics dynamically.
  • Frontend Dashboard: Built with Next.js 15 (App Router), TypeScript, and Tailwind CSS to render real-time dependency graphs, schedule comparisons, and producer approval workflows.
  • Deployment: Hosted backend on FastAPI Cloud and frontend on Vercel.

🧠 What We Learned

  • Agentic Resource Scheduling: Structuring complex dependencies into graph models allows LLMs to avoid resource allocation collisions (e.g., double-booking a soundstage).
  • Deterministic AI Hybrid Architecture: Combining deterministic scheduling rules with Gemini 2.0 Flash reasoning yields fast, reliable, and halluncination-free financial recommendations.
  • High-Throughput Production Analytics: Leveraging ClickHouse's column-oriented storage makes complex queries across historical film telemetry virtually instantaneous.

🔥 Challenges We Faced

  • Simultaneous "Chaos Mode" Collisions: Resolving multiple compound disruptions required building a collision detection engine so independent recovery plans (e.g., moving to Stage 4) wouldn't conflict with existing schedules.
  • Cross-Origin & Real-Time Telemetry: Integrating Gemini AI reasoning with live FastAPI endpoints required zero-latency state synchronization between frontend, backend, and database fallbacks.

🚀 What's Next

  • Predictive Weather Integration: Real-time Doppler weather API feeds to automatically trigger cover-set shifts 48 hours before storms hit.
  • Budget Software Connectors: Direct integration with industry-standard film budgeting tools like Movie Magic Budgeting and Gorilla Scheduling.

Built With

  • ai-agents
  • clickhouse
  • fastapi
  • fastapi-cloud
  • google-gemini-2.0
  • mcp
  • model-context-protocol
  • next.js
  • production-management
  • pydantic
  • python
  • react
  • tailwind-css
  • typescript
  • uv
  • vercel
Share this project:

Updates

Submission history