Fincher: Autonomous Post-Production Media Operations Engine

Inspiration

Releasing a flagship streaming title requires coordinating hundreds of post-production assets across 40+ countries: 4K HDR master video, dozens of localized audio dubs, localized subtitles, and regional artwork under strict premiere countdowns.

When an issue occurs right before premiere (such as an audio sync drift on a German dub, an editorial cut revision, or a vendor delivery delay), post-production teams usually have to scramble manually, digging through inspection logs and trying to find replacement vendors.

I built Fincher to automate this entire post-production remediation loop using Google Gemini 2.5 and the official ClickHouse Model Context Protocol (MCP).


What It Does

Fincher is an event-driven operations engine that catches media post-production supply chain anomalies, investigates historical telemetry in ClickHouse, drafts remediation plans, and executes verified fixes:

  1. Event Ingestion: Ingests standard CloudEvents (fincher.audio.sync_drift, fincher.master.cut.revised, fincher.vendor.sla_breach, fincher.qc.completed).
  2. Multi-Agent Investigation:
    • Triage (Gemini 2.5 Flash): Evaluates defect severity and confirms if action is needed.
    • Blast Radius Analysis: Identifies affected markets and puts only those specific country deliveries on HOLD, keeping unrelated global deliveries unaffected.
    • Action Planning (Google ADK Go + ClickHouse MCP): Sub-agents query ClickHouse historical QC logs via MCP to evaluate vendor reliability and pick the best replacement.
  3. Policy Verification Judge: Evaluates proposed plans against operational safety rules (such as minimum 90% vendor accuracy and delivery before premiere deadline) in a bounded 3-attempt loop.
  4. Time-Compressed Vendor Simulation: Each allocated vendor runs as a background Go goroutine using an accelerated clock (1 second = 1 hour), emitting a QC_COMPLETED pass or fail event upon turnaround completion.
  5. Closed-Loop Resolution: If a QC event fails, it triggers the agent loop again to re-route to another vendor. Once a QC event passes, Fincher checks that all delivery components (Video, Audio, and Subtitles) are valid and automatically releases the delivery from HOLD to READY_TO_SHIP without human intervention.
  6. Operations Chat Assistant: Natural language querying over post-production assets and vendor metrics with verifiable SQL query citations backed by ClickHouse.

How I Built It

[ Ingested CloudEvent ] ──► [ Event Router ]
                                   │
        ┌──────────────────────────┼──────────────────────────┐
        ▼                          ▼                          ▼
 [ Incident Flow ]         [ Allocation Flow ]        [ Resolution Flow ]
        │                          │                          │
        ▼                          ▼                          ▼
 [ Gemini 2.5 Agents ] ◄──► [ 6 Agent Tools ]       [ Deterministic Engine ]
                                   │                          │
        ┌──────────────────────────┴──────────────┐           ▼
        ▼                                         ▼    [ Release Deliveries ]
 [ SQLite State DB ]                   [ ClickHouse MCP HTTP ]
  (fincher.db)                                    │
                                                  ▼
                                       [ ClickHouse Analytical DB ]

1. Analytics & MCP (ClickHouse)

  • ClickHouse 24.3: Stores over 250,000 historical post-production CloudEvents (fincher.events), materialized QC records (fincher.qc), and rolling vendor performance metrics (fincher.vendor_metrics).
  • Official ClickHouse MCP (mcp-clickhouse): The Go backend connects to the ClickHouse MCP server over HTTP on port 8000. Agents issue read-only SQL queries to inspect historical vendor pass rates and turnaround track records.

2. Multi-Agent System (Google Cloud & Gemini)

  • Built on Google ADK Go (google.golang.org/adk/v2) and Google GenAI SDK (google.golang.org/genai).
  • Gemini 2.5 Flash handles structured JSON reasoning and tool execution.
  • Two-Phase Pattern: Gathers data using read-only MCP tools first, then emits schema-validated JSON action plans.

3. Backend & Vendor Goroutines (Go 1.24)

  • Echo v4 web framework for REST APIs, SSE streaming (/api/events/stream), and OpenAPI documentation (/openapi.json).
  • Vendor Workers: Each vendor task runs in a background goroutine on an accelerated operational clock (1 second = 1 hour).

4. Operations Console (Preact + Vite)

  • Lightweight Preact runtime with @preact/preset-vite and preact/compat.
  • Vanilla Extract (.css.ts): Zero-runtime, type-safe CSS styling.
  • TanStack Suite: @tanstack/react-router, @tanstack/react-query, @tanstack/react-table for virtualized matrices, and @xyflow/react for the asset lineage graph.

Challenges I Ran Into

  1. Strict AI Read-Only Boundary: Agents never execute database mutations or write SQL directly. Agents only propose structured action plans. The Go backend verifies safety rules and executes the state transitions.
  2. Multi-Component Delivery Integrity: A localized delivery (like Germany) requires global video, localized audio, and localized subtitles. A delivery cannot be released if any single component is failing. The resolution engine verifies the complete component tree before lifting a hold.
  3. Simulating Autonomous Event Loops: Wiring background vendor goroutines so that their completion events emit back into the system router, triggering downstream AI runs on failure or auto-releasing on success, without race conditions.

Accomplishments

  • Closed-Loop Autonomy: Fincher reassigns post-production vendors, runs simulated turnarounds in goroutines, handles downstream pass/fail events, and auto-releases deliveries without human intervention.
  • ClickHouse MCP Integration: Agents run real SQL queries against 250k+ historical rows to choose qualified vendors based on past data.
  • Deterministic Policy Gates: Policy verification judge prevents invalid vendor selections or schedule breaches in a bounded 3-attempt loop.
  • Fast UI: 60fps operations console with live SSE streaming, instant search, territory filters, and an interactive lineage DAG.
  • Live Cloud Deployment: Deployed and running on Google Compute Engine at https://fincher.elliot14a.work.

What I Learned

  • Model Context Protocol (MCP): Connecting ClickHouse to LLM agents through standard MCP provides clear situational awareness without stuffing prompts with raw data dumps.
  • Structured Multi-Agent Design: Separating triage, fact gathering, planning, policy verification, and software execution into separate steps makes agent workflows predictable and reliable.
  • Event-Driven AI Orchestration: Building agents to react to downstream events creates a closed loop that takes problems from initial incident all the way to verified resolution.

What's Next

  • Real Vendor API Connectors: Direct webhook dispatches to external post-production houses (Deluxe, Pixelogic, Iyuno).
  • Predictive Defect Prevention: ClickHouse time-series forecasting to flag degrading vendor quality before premiere week.
  • Automated Audio Conforming: Automated audio time-stretching and frame-rate conversions for multi-cut international releases.

Built With

Share this project:

Updates

Submission history