Inspiration

The average film production overspends its budget by 30–40%. Line producers spend every morning manually reconciling 12+ spreadsheets across departments and by the time they spot a problem, it's already cost $150K–$500K in delayed scenes or overtime.

The data exists. Call sheets, budget reports, scheduling tools — it's all there. But no one can query across it fast enough to act. We wanted to change that: what if any crew member could just ask a question and get a real answer in seconds?

What it does

CineOps gives any crew member natural-language access to live production data. Type "Which departments are over budget this week?" and a Budget Analyst agent queries the database and responds in seconds. Ask "Show me all crew double-booked on Friday" and a Conflict Detector handles it. Ask "Is Spider-Man ready for release?" and a Release Readiness agent scores it across budget, schedule, and conflict signals.

The app has three main areas:

Chat — talk to the system in plain English. Five specialist agents handle budget, schedule, conflicts, reports, and release readiness. The right agent is automatically picked based on what you ask.

Dashboard — a studio-wide slate showing all productions at once. Health buckets (Critical / At Risk / Healthy), risk rankings, release countdowns, and live budget variance charts. The morning briefing in one screen instead of twelve spreadsheets.

Documents — upload any PDF call sheet or budget report. Gemini reads it using multimodal document understanding, extracts structured data matching the database schema, and loads it into ClickHouse automatically. Switch to Chat and query the new data immediately. No manual data entry.

How we built it

Five specialist agents built on Google ADK: Budget Analyst, Schedule Tracker, Conflict Detector, Report Composer, and Release Readiness sit behind a router agent that picks the right one for each question. Every agent talks to a live ClickHouse Cloud database through mcp-clickhouse (an MCP server), so answers are always backed by real data.

PDF ingestion runs through a POST /ingest/pdf endpoint: Gemini reads the document, extracts rows matching the ClickHouse schema, normalizes dates, and inserts them via the same MCP server.

On top of that we added a semantic cache query embeddings via Vertex AI text-embedding-004, cosine similarity at 0.92 threshold so near-identical questions return instantly without hitting the LLM again. Date-specific and scene-specific queries always bypass it. A two-tier memory system (session context for follow-ups + persistent FAISS for cross-session recall) keeps the agents aware of prior conversation.

Three-layer guardrails protect the system: input sanitization, a SQL allow-list (only SELECT passes through), and output caps. Error and blocked responses are never stored in memory or cache.

The backend is FastAPI deployed on Google Cloud Run. The frontend is a single HTML file — no build step. Imagen 3 handles storyboard generation from scene metadata in ClickHouse.

We also built a full eval suite: 55 LLM-as-Judge test cases scored by a separate Gemini judge call across routing correctness, guardrail compliance, completeness, and factual accuracy.

Challenges we ran into

MCP subprocess management inside ADK — mcp-clickhouse spawns as a subprocess, and getting it to behave reliably inside ADK's async runner took a lot of trial and error. Concurrent queries from different agents needed proper session isolation so they didn't interfere with each other.

Semantic cache tuning — getting the threshold right was harder than expected. Too high and you return stale answers; too low and the cache is useless. We also had to figure out which query patterns (anything with a specific date or scene ID) must bypass the cache entirely, which took real test cases to nail down.

PDF extraction accuracy — Gemini is good at reading PDFs but the schema mapping isn't always clean. Getting it to reliably normalize dates, match column names, and handle missing fields without breaking the insert required careful prompt engineering and validation.

Routing ambiguous queries — some questions don't obviously belong to one agent. "Is the production on track?" could mean budget, schedule, or both. Getting the orchestrator to make a clean decision without hallucinating what agents exist took a lot of iteration on the system prompt.

Accomplishments that we're proud of

92.7% pass rate across 55 LLM-as-Judge eval cases, with guardrail compliance at 4.98/5. Every answer is grounded in a live database query, the model never answers from memory. The Documents tab means the system stays current without anyone manually entering data. And the studio slate dashboard genuinely replaces what used to be a manual, multi-tab morning routine.

What we learned

Grounding agents in a structured database rather than relying on the model to recall facts is the single biggest lever for accuracy. Eval-driven development paid off fast, building the LLM-as-Judge suite early caught routing bugs we would have missed entirely through manual testing. And PDF ingestion via Gemini's multimodal understanding is more capable than we expected and it handles messy, real-world production documents without needing a rigid template.

What's next for CineOps Studio Intelligence

  • Push alerts — proactively notify the right person when a budget threshold is crossed or a conflict is detected, instead of waiting for them to ask
  • Real-time PDF sync — watch a shared folder (Google Drive, Dropbox) and auto-ingest new call sheets as they land, keeping the database current without manual uploads
  • Multi-studio tenancy — proper data isolation so multiple productions or studios can share the infrastructure without seeing each other's data
  • Voice interface — line producers on set don't have time to type; a voice-to-query layer would make CineOps usable on the floor

Built With

  • clickhouse
  • docker
  • faiss
  • fastapi
  • gemini
  • google-adk
  • google-cloud-build
  • google-cloud-run
  • imagen-3
  • mcp
  • numpy
  • pydantic
  • python
  • structlog
  • text-embedding-004
  • uvicorn
  • vertex-ai
Share this project:

Updates

Submission history