1. Project Overview & Quick Summary
Cinema CI is an autonomous CI/CD and runtime lineage platform for generative AI filmmaking. It integrates Google Cloud (Vertex AI Veo 3.1, Gemini 3.8 Flash, Google ADK, Cloud Run) with Grafana Cloud (Tempo, Loki, Prometheus, Official MCP) to solve a critical bottleneck in generative video: the runaway regeneration overhead and cascading destruction caused by creative revisions.
The Core Value & The Grafana Safety Net
- The Primary Mission (Surgical Blast Radius Minimization): When a director changes a character's wardrobe or glasses, generating the entire film again destroys previously approved shots and wastes generation work. Cinema CI mathematically minimizes the rebuild scope—avoiding 1 of 3 Veo 3.1 video-generation operations (33.3%) and 1 of 4 total pipeline operations (25.0%), while safely preserving unaffected assets without unnecessary re-rendering. The submitted demo proves the mechanism on four real production artifacts. The same runtime-lineage model can extend to larger agentic production graphs where downstream dependencies are selected during execution.
- The Critical Safety Net (Grafana Tempo Runtime Lineage): Why can't a simple build script minimize this? Because AI agents make dynamic visual decisions at runtime (such as Gemini selecting a shot keyframe for the theatrical poster) that are never declared in static configuration. Grafana Tempo serves as the execution memory, allowing the ADK agent to uncover hidden downstream dependencies and guarantee that surgical minimization never produces stale assets.
2. Inspiration: The Generative Filmmaking Dilemma
Generative video models like Google Veo 3.1 produce breathtaking cinematic shots. But a real film is not a single prompt—it is a living, interconnected production graph composed of character model sheets, camera setups, multiple shots, key visual posters, dialogue tracks, and master edits.
The real breakdown happens the moment the director asks for a revision:
"Can we remove Marcus's round eyeglasses in the cafe scene?"
Historically, production teams face an impossible trilemma:
The 3-Way Approach Matrix
| Approach | Rebuild Scope | Compute & Cost | Asset Integrity (Shot 02 & Poster) | Studio Feasibility |
|---|---|---|---|---|
| 1. Naive Full Rebuild | 100% (All 4 assets) | 💸 Full re-render of unaffected assets; hours of rendering delays | ❌ Consistency Collapse: Shot 02 (blue envelope) gets randomized and destroyed | Prohibitive & unscalable |
| 2. Manual / Static Guess | Shot 01, Shot 03 (Marcus only) | ⚠️ Low compute, but blind | ❌ Marketing Discrepancy: Theatrical poster is missed and ships with old eyeglasses | Fatal release defect |
| 3. Cinema CI (Ours) | Surgical 3 Rebuild / 1 Reuse | 🏆 1 of 4 operations avoided (25.0%); 1 of 3 Veo calls avoided (33.3%) | ✅ Verified: Shot 02 byte-reused (SHA-256); Poster updated via Tempo | Production-grade AI Cinema |
Cinema CI resolves this dilemma by uniting deterministic graph minimization with distributed runtime tracing.
3. What It Does
Filmmaker Creative Change Request ("Remove Marcus's eyeglasses")
│
▼
Google ADK Agent + Gemini
│
├─────────────────────────────────────────┐
▼ ▼
Declared Dependencies Observed Runtime Lineage
(from cinema.yaml) (from Grafana Tempo via
Shot 01 & Shot 03 feature Marcus official mcp-grafana)
│ Poster dynamically selected Shot 03
│ │
└───────────────────┬─────────────────────┘
▼
TRUE BLAST RADIUS
Declared (2) ∪ Runtime (1) = 3
│
┌───────────────────┴─────────────────────┐
▼ ▼
REBUILD SET (3) SAFE REUSE (1)
Shot 01, Shot 03, Poster Shot 02
(Veo 3.1) (Byte-Identical, SHA-256)
│ │
└───────────────────┬─────────────────────┘
▼
Multi-Stage QA Matrix
25 tests (PyAV Technical + Gemini Video)
│
▼
Release Candidate
(RELEASE_READY)
│
▼
Human Release Gate
(Promote to Final Film Cut)
The Hero Scenario in Numbers
For our reference film project:
- 3 of 4 assets rebuilt (Shot 01, Shot 03, and the discovered Poster).
- 1 of 4 assets byte-identically reused (Shot 02: unaffected prop close-up).
- 1 of 3 video-generation operations avoided (33.3%; 1 out of 3 Veo shots preserved).
- 1 of 4 total pipeline artifact operations avoided (25.0%).
- Asset preservation: Unaffected asset bytes are verified to ensure zero unintended mutation from the baseline.
Generalizing Beyond the Hero Scenario: The Studio-Scale Impact
One might ask: “Is dynamic poster selection just a handcrafted edge case built for this demo?”
No. In agentic production, runtime dependencies are the architectural norm, not an exception.
As generative filmmaking moves from isolated prompts to multi-agent production pipelines, autonomous agents make continuous aesthetic choices during execution that rewrite the dependency graph dynamically:
- Dynamic Key Visual Composition (Demonstrated): An art director agent inspects finished frames and selects the most dramatic composition for marketing deliverables.
- Adaptive B-Roll & Cutaway Insertion: An agentic editing supervisor dynamically picks environmental exterior shots matching the emotional intensity of the generated actor's performance.
- Dynamic Audio Stem Arrangement: An AI sound director dynamically offsets ambient Foley and music stems based on the exact cut durations and speech cadences produced by video models.
- Multilingual Lip-Sync Retargeting: Downstream localized dubbing tracks depend dynamically on whichever visual take was promoted to the master cut.
Extensibility to Larger Production Graphs:
The submitted demo proves the mechanism on four real production artifacts. The same runtime-lineage model can extend to larger agentic production graphs where downstream dependencies are selected during execution:
- A single director revision (modifying wardrobe, prop design, or lighting) cascades across dynamic runtime dependencies.
- Blind full regeneration wastes generation time and destroys previously approved downstream work.
- Cinema CI’s deterministic ImpactEngine combined with Grafana Tempo execution memory provides the verifiable discipline needed to bring agentic cinema into production pipelines.
4. Why Grafana Is Indispensable: Solving the Minimization Paradox
Why can't a software studio simply write a standard Python script or Make rule to minimize the rebuild?
The Minimization Paradox:
To save costs, you must minimize the rebuild set as aggressively as possible. But if you rely only on static manifests, you will inevitably miss dynamic runtime decisions made by autonomous agents—shipping corrupted, mismatched final releases.
"Static manifests show what should depend on what. Grafana Tempo shows what actually did at runtime."
In Cinema CI, Grafana is not an afterthought monitoring dashboard; it is the authoritative execution memory of the pipeline:
- Runtime Choice Recorded: During baseline generation, Gemini extracts keyframes from rendered video files and selects the most dramatic framing for the poster. Cinema CI emits this dynamic choice as an OpenTelemetry span:
span: cinema.reference.select
attributes:
cinema.consumer = "poster"
cinema.reference.selected = "shot_03:keyframe:v1"
cinema.selection.reason = "Shot 03 keyframe provides the strongest protagonist framing and composition for the theatrical poster."
cinema.selection.confidence = 0.96
cinema.source.sha256 = "28531fd8"
- Causal Blast Radius Expanded: When the creative change arrives, the Google ADK Agent queries Grafana Cloud through the official
mcp-grafanaserver over STDIO. It discovers that the Poster consumed Shot 03 at runtime. - Surgical Precision Achieved: The deterministic ImpactEngine unions the declared dependencies with this observed runtime edge. The rebuild set expands to include the Poster, while safely keeping Shot 02 in the byte-identical reuse pool.
- Interactive Lineage Illumination: The UI renders an interactive visual DAG graph with SVG Bezier connectors, illuminating the runtime dependency between Shot 03 and the Poster with a pulsing neon-purple glow.
Static manifests cannot fully represent dependencies created by runtime AI decisions.
5. How We Built It (Architecture & Stack)
Google Cloud & AI Platform
- Google ADK (Agent Development Kit): Orchestrates agentic workflows, session memory, and tool invocation.
- Gemini 3.8 Flash on Vertex AI: Natural-language change semantic interpretation, actual-keyframe visual poster composition, and 25-point multimodal creative video QA.
- Google Veo 3.1 (
veo-3.1-lite-generate-001): Cinematic video generation on Vertex AI. - Cloud Run Services & Responsive UI: High-performance FastAPI control plane serving a zero-build (ES Modules / CSS Tokens) fully responsive UI. While powered by enterprise-grade observability, directors and creators on-set can review 25-point QA matrices and trigger human release approval directly from smartphone or tablet.
- Cloud Run Jobs: Runs asynchronous, long-duration video rendering workers outside the HTTP request lifecycle.
- Cloud Storage (GCS) & Firestore: Enterprise-grade persistence for video artifacts, frame buffers, and build metadata.
Grafana Cloud & Observability
- Grafana Tempo: Distributed tracing storing causal runtime creative lineages.
- Official
mcp-grafana: Subprocess launched viauvx mcp-grafanaover STDIO, exposing official tools across Prometheus, Loki, and Tempo. - Grafana Prometheus: Continuous monitoring of release gates (
cinema_ci_release_ready), active regressions, and avoided operation metrics. - Grafana Loki: Structured audit trails of Gemini multimodal video evaluation decisions.
- OpenTelemetry Python SDK: Distributed tracing with custom spans and Span Links.
Built with Google Antigravity & Cloud Run
Development was accelerated using Google Antigravity for autonomous agentic pairing, automated refactoring, and test execution. Paired with automated continuous deployment to Google Cloud Run, we continuously verified live builds, Veo generation, and Grafana Tempo traces directly from mobile devices throughout the hackathon.
6. Challenges We Overcame
- Making Observability a First-Class Product Dependency: Most AI projects use Grafana merely to display GPU temperatures or API latencies. We had to architect a system where a trace span in Tempo is the direct input to an AI agent's algorithmic graph traversal, discovering runtime visual dependencies (like poster keyframes) that static manifests cannot capture.
- Decoupling Agentic Intelligence from Deterministic Build & Reuse:
We used Gemini and Google ADK for natural-language creative intent understanding and tool discovery, but anchored graph traversal, blast-radius calculations, and asset reuse in deterministic Python (
ImpactEngine). This keeps creative iterations natural while reliably preserving unaffected shots and ensuring execution plans remain auditable and reproducible. - Orchestrating Long-Running Generative Renders in Serverless Cloud Run: Cinematic video generation models like Google Veo take minutes to render and cannot run inside synchronous HTTP request cycles. We decoupled the responsive FastAPI control plane on Cloud Run Service from asynchronous render workers on Cloud Run Jobs, persisting media and build metadata durably in Google Cloud Storage and Firestore.
7. What We Learned
AI agentic pipelines are fundamentally distributed systems. Decisions are made dynamically at runtime, state flows across heterogeneous artifacts, and static configuration files alone cannot capture true causality.
Observability is the missing link for agentic systems. Traces are not just post-mortem debugging logs—they are the causal memory that allows autonomous agents to understand what prior agents did and make informed downstream decisions.
8. What's Next for Cinema CI
- Multi-Modal Lineage Extension: Extending runtime dependency tracking to audio stems, localized dubbing tracks, synthetic Foley effects, and automated B-roll selection.
- Predictive Cost & Latency Simulation: Using historical Tempo trace durations to predict the exact dollar cost and rendering time of an edit before the director confirms it.
Log in or sign up for Devpost to join the conversation.