Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 CineAgent Studio

Autonomous Multi-Agent Cinema Studio & Mode-Aware Observability Engine

Powered by Google Cloud Gemini 3.7 Flash & Official Grafana Model Context Protocol (MCP)

License Python FastAPI React Gemini Grafana MCP

Built for the Google Cloud "Agentic Cinema: The Blockbuster Hackathon" on Devpost.


🌟 Overview

CineAgent Studio is a full-stack, autonomous film production platform where specialized Gemini 3.7 Flash AI agents collaborate as a virtual movie studio crew to transform high-level creative premises into structured screenplays, visual storyboard prompt specifications, voice direction parameters, and virtual cinematic screenings—all monitored with Model Context Protocol (MCP) observability powered by the official mcp-grafana client.

┌──────────────────────────────────────────────────────────────────────────────────────────┐
│                                  CINEAGENT STUDIO WORKSPACE                               │
│                                                                                          │
│  [ Executive Director ] ──► [ Screenwriter ] ──► [ Storyboard / VFX ] ──► [ Sound Stage ] │
│           │                                                                              │
│           ▼                                                                              │
│  [ mcp-grafana ]                                                                          │
│  (PromQL/Loki)                                                                           │
└──────────────────────────────────────────────────────────────────────────────────────────┘

🚀 Key Features

1. 🤖 Autonomous Multi-Agent Crew

  • Executive Director Agent (director_agent.py): Master pipeline orchestrator built with Gemini agentic orchestration patterns. Validates narrative pacing and enforces production milestones.
  • Lead Screenwriter Agent (screenwriter_agent.py): Deconstructs raw briefs into industry-standard sluglines, character emotional arcs, and dialogue tokens.
  • Storyboard & VFX Prompt Engineer (storyboard_agent.py): Constructs camera setups (Wide, Medium, Close-Up, Dutch Tilt, 35mm Anamorphic vs 85mm Prime lensing, Volumetric lighting) and detailed image prompt specifications.
  • Sound & Voice Direction Agent (audio_director_agent.py): Formulates multi-character vocal direction with voice parameters and musical score cues.
  • StudioOps Observability Sentinel (observability_agent.py): Monitors pipeline latency and system telemetry via mcp-grafana.

2. 🔌 Standards-Compliant Grafana Model Context Protocol (MCP) Client

  • Official Python MCP Client SDK (mcp package): Uses Streamable HTTP ClientSession, initialize(), tool discovery, and call_tool() against the official grafana/mcp-grafana server endpoint.
  • Grafana MCP Tools: Direct execution of official tools including query_prometheus, query_loki_logs, search_dashboards, create_annotation.
  • Verified public Grafana path: the Cloud Run application now bundles official mcp-grafana, authenticates to Grafana Cloud with a dedicated Viewer service account, and has completed live dashboard, Prometheus, and Loki MCP calls through the public backend.

3. 🖥️ Cinematic Glassmorphism Studio UI

  • Crew Command Center: Live agent status cards with step-by-step mode-aware event logs and MCP tool execution logs.
  • Screenplay Room: Formatted multi-scene script breakdown with emotional delivery chips.
  • Storyboard Gallery: Interactive visual cards with camera lenses, lighting parameters, and image prompt copy buttons.
  • Sound Stage: Voice direction and audio performance console.
  • CineOps Control Tower: Live Grafana telemetry views (only after successful MCP calls; otherwise labeled fixtures/errors).
  • Virtual Screening Room: Timed storyboard-card preview plus a real canonical eight-second Veo 3.1 Fast scene with native audio, verification hashes, and a truthful fixed-evidence label.

🛠️ Architecture & Data Flow

flowchart TD
    User(["🎬 Creative Prompt / Script Idea"]) --> Director["🎯 Director Agent (Gemini 3.7 Flash)"]
    
    subgraph "Creative Production Crew"
        Director --> Screenwriter["✍️ Screenwriter Agent (Gemini 3.7 Flash)"]
        Screenwriter --> Storyboard["🎨 Storyboard & VFX Agent (Image Prompt Specification)"]
        Screenwriter --> AudioDirector["🔊 Sound & Voice Direction (Voice Parameters & Score Cues)"]
    end
    
    subgraph "Model Context Protocol (MCP) Services"
        Director -.-> GrafanaMCP["📊 Official mcp-grafana Client<br/>(query_prometheus, query_loki_logs, search_dashboards)"]
        Observability["🛡️ StudioOps Agent"] --> GrafanaMCP
    end
    
    subgraph "Studio Control Room UI"
        Storyboard --> UI["🖥️ React Cinema Studio Workspace"]
        AudioDirector --> UI
        Observability --> UI
        UI --> ScreeningRoom["📽️ Virtual Screening Room"]
    end
Loading

⚡ Quickstart Guide

Prerequisites

  • Python 3.10+
  • Node.js 18+ & npm
  • (Optional) Gemini API Key, Grafana account.

1. Clone & Setup Environment

git clone https://github.com/AtchayamG/cineagent-studio.git
cd cineagent-studio

2. Backend Setup

cd backend
pip install -r requirements.txt
cp .env.example .env
python run_backend.py

The backend API will be live at http://localhost:8000 (Swagger docs at http://localhost:8000/docs).

3. Frontend Setup

cd ../frontend
npm ci
npm run dev

Open http://localhost:5173 in your browser to enter CineAgent Studio.


🧪 Running Automated Tests

cd backend
python -m pytest -q

All agent workflows, MCP tool registries, official ClientSession boundaries, and failure behaviors are covered with automated pytest suites.


☁️ Deployment

Live judge demo: https://cineagent-studio.vercel.app/
Public mode-aware API: https://cineagent-studio-api.vercel.app/api/v1/health
Public source: https://github.com/AtchayamG/cineagent-studio

Verified cinematic scene: evidence, manifest, and release asset

This project is configured as two separate services:

  1. Backend Service:

    • Directory: backend/
    • Config: backend/vercel.json (zero-configuration FastAPI detection)
    • Ensure environment variables are set in the dashboard.
  2. Frontend Service:

    • Directory: frontend/
    • Config: frontend/vercel.json (uses Vite static build)
    • Set VITE_API_BASE_URL to the public URL of your deployed backend service plus /api/v1 (e.g., https://my-backend-app.vercel.app/api/v1).

The production frontend is configured with VITE_API_BASE_URL=https://cineagent-studio-live-79552606912.us-central1.run.app/api/v1. Cloud Run revision cineagent-studio-live-00004-mz4 reports runtime_mode: live: Gemini 3.7 Flash uses Vertex AI ADC and the Grafana path uses official mcp-grafana with a dedicated Grafana Cloud Viewer service account. See docs/evidence/PUBLIC_RUNTIME_VERIFICATION_2026-08-30.md.


📄 Open Source License

This project is open-source software licensed under the MIT License.

About

CineAgent Studio — observable multi-agent filmmaking with Grafana and Gemini

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages