Skip to content

About

Autonomous line producer for film shoots — Gemini + CP-SAT + Grafana MCP. The LLM formulates, the solver decides, a human approves.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🎬 Stripboard — Autonomous Line Producer for Film Shoots

The LLM formulates, the solver decides, a human approves.

The loop: Grafana notices, CP-SAT prices the options, a human Producer approves, and the decision is recorded

Four real screens of the deployed demo, captioned — a composed sequence, not a screen recording.

Stripboard is a multi-agent system that acts as an autonomous line producer for film production: it breaks down a screenplay into typed scenes and elements, builds an optimal shooting schedule, continuously watches for disruptions (cast availability, permits, weather, union rules), and replans in seconds — with ranked options, cost deltas, and a human producer approving every commit.

Built for the Agentic Cinema Hackathon (Google Cloud) — Grafana partner track.

CI .NET 10 Status 3-minute demo Gemini Grafana MCP Tests Grafana Live Dashboard License

Where to look first

Live demo: https://stripboard-web-wc7oib7k6q-ew.a.run.app — deployed on Cloud Run and verified end to end in a browser with zero console errors: inject a disruption, compare the costed options, approve as Producer, read the audit trail. See ADR-011 for what Blazor Server needs from Cloud Run.

The app is at min-instances=0 while nobody is judging, so the first request may take a few seconds — and the Grafana stack, on a free tier, can answer 503 once before it wakes. Everything after that is warm.

That is a cost posture, not the design decision. ADR-011 chose min-instances=1, because scaling a Blazor Server app to zero does not merely add a cold start — it destroys every live circuit, so anyone mid-session loses it. Three weeks of an always-allocated vCPU buys nothing while nobody is looking, so the services sit at zero now and go back to one for the judging week. The calendar and the commands are in Stopping the paid services.

Live Grafana dashboard, no account needed: https://pinkcorridor3522.grafana.net/public-dashboards/1e372a04e0974e1fa34afb2e143957c3 — "Shoot Mission Control", reading the same shoot_* metrics the Conflict Sentinel queries over MCP. It is the shortest way to check that the partner integration is real rather than described.

The 3-minute video: https://youtu.be/6LZxawdvXaU — seven shots, chaptered, with English subtitles. It is the fastest way to see the loop close: a Grafana rule fires, the sentinel reads it back over MCP, the solver prices two options, an agent is refused, a human approves.

The problem

A shooting schedule is a constraint-satisfaction problem with money attached: scenes grouped by location to minimise company moves, cast availability honoured, union rules enforced (12-hour turnaround, meal penalties, night-to-day transitions), permit windows and daylight respected.

It breaks constantly, and the rebuild is manual. An actor calls in sick at 6am; the 1st Assistant Director replans by hand, usually overnight, then redistributes call sheets to the whole crew. The shoot in this repository costs about $7,400 a day — the four-day legal schedule prices at $29,600, from published SAG-AFTRA rates — so the hours that rebuild takes are spent against a clock that is already running. The board the demo opens on is the two-day one the solver reaches when nothing constrains it: $26,800, and a day that visits four locations.

The tools productions use are editors. Movie Magic Scheduling, StudioBinder, Yamdu and Scenechronize are better than this at nearly everything a 1st AD does in a day, and in all of them the arrangement is the human's. None of them watches the shoot. Here a solver plans under union rules as hard constraints, a Grafana alert notices the disruption, and the human's job narrows to approving or refusing a priced option.

→ Who this is for, what it costs them, and whether it already exists — the comparison in full, the figures with their sources, and what is not validated.

What it looks like

The shooting stripboard, with the industry strip colour code and the day's call, wrap and turnaround The board: industry strip colours, and each day's call, wrap and turnaround.

Two options side by side: leave the schedule as it is, or cap the day at two locations for two more shooting days and $2,800 The trade, priced from the board as it stands: obeying the cap costs +2 days and +$2,800. Nothing here is committed — the Producer decides.

Shoot Mission Control: two shooting days, $27K estimated cost, six company moves, risk index 38, no union violations, cost burn-down, cast utilisation and a worst day visiting four locations Mission Control in Grafana Cloud, reading the shoot's own shoot_* metrics. Public, no account. Locations on the worst day: 4 — that is the figure the unit-hopping rule fires on.

The governance audit trail: proposals by sa-replanner, the commit by Producer Proposed by an agent, approved by a human, and the board names both.

Architecture

Grafana is not a destination on the right-hand edge of this diagram; it is step 1 of the loop. Metrics about the shoot leave the application over OTLP, a rule in Grafana Cloud fires on them, and the Conflict Sentinel reads that firing rule back over MCP and starts a replan. Nobody is watching a screen when it happens.

flowchart TD
    Grafana["Grafana Cloud (Hosted)<br>Shoot Mission Control + 4 Alert Rules"]
    Sentinel["Conflict Sentinel (Cloud Run)<br>Grafana MCP Client + Ask Your Shoot"]
    Orchestrator["Orchestrator Agent (ADK)<br>line_producer Root Agent"]
    Solver["CP-SAT Solver (Google OR-Tools)<br>Union Rules & Optimization"]
    Blazor["Blazor UI & Backend (Cloud Run)<br>Schedule Versions, Audit Trail, Call Sheets"]

    Grafana -- "1. Firing alert (shoot_* metrics)" --> Sentinel
    Sentinel -- "2. Replan / Consolidate trigger" --> Orchestrator
    Orchestrator -- "3. Solves schedule options" --> Solver
    Solver -- "4. Costed options & deltas" --> Orchestrator
    Orchestrator -- "Proposes options" --> Blazor
    Blazor -- "5. Producer approves commit (403 for agents)" --> Blazor
    Blazor -- "6. OTLP metrics about the shoot" --> Grafana
    Sentinel -- "Disruptions written back: MCP create_annotation" --> Grafana
Loading

The governance step is drawn as an arrow rather than a note because it is one: an agent may call /api/schedule/commit and the service answers 403 for every identity but a human Producer. What is written back to Grafana over MCP is the disruption: the Conflict Sentinel publishes it as an annotation with create_annotation, so the timeline shows what happened to the shoot. The approval itself is recorded in the audit trail, not in Grafana — the sentinel raised it, an agent proposed it, a human decided, and all three are on a chain nothing rewrites.

The same loop with what each box is and where it runs — [✓] is true today, and there are no open marks left
   ┌──────────────────────────────────────────────────────────────────────┐
   │ GRAFANA CLOUD                                            hosted [✓]  │
   │ "Shoot Mission Control" · 4 alert rules over shoot_* metrics         │
   │ grafana/mcp-grafana, run as a sidecar we control — 73 tools          │
   └──▲─────────────────────────────────────────────────────────────┬─────┘
      │ 6  OTLP: metrics about the SHOOT. The sentinel writes       │ 1  a rule
      │    disruptions back as annotations, over MCP                │    fires
      │                                                             ▼
   ┌──┴─────────────────────────┐            ┌──────────────────────┬─────┐
   │ Blazor UI              [✓] │            │ Conflict Sentinel      [✓] │
   │ Cloud Run + Cloud SQL      │            │ private Cloud Run          │
   │ versions, audit trail      │            │ + "Ask your shoot"         │
   └──▲─────────────────────────┘            └────────────┬───────────────┘
      │ 5  a human Producer approves;                     │ 2  replan or
      │    every other identity: 403                      │    consolidate
      │                                                   ▼
   ┌──┴───────────────────────────────────────────────────┬───────────────┐
   │ 3  Orchestrator — ADK root agent with no tools of its own            │
   │    scheduler · replanner · governance    as sa-orchestrator   [✓]    │
   │                                          Vertex AI Agent Engine [✓]  │
   └──────────────────────────────┬───────────────────────────────────────┘
                                  │ 4  tools/call over MCP. No agent does arithmetic:
                                  ▼    every figure comes from a solver run
   ┌──────────────────────────────┬───────────────────────────────────────┐
   │ CP-SAT solver (Google OR-Tools) · union rules by construction  [✓]   │
   └──────────────────────────────┬───────────────────────────────────────┘
                                  │ people · locations · weather
   ┌──────────────────────────────┬───────────────────────────────────────┐
   │ mcp-schedule · mcp-people · mcp-locations · mcp-weather              │
   │ speak MCP [✓] · consumed by the agents [✓] · private on Cloud Run [✓]│
   └──────────────────────────────────────────────────────────────────────┘

   Feeding the loop, outside it:
   Breakdown — Gemini 2.5 Flash → typed scenes  [✓]
   Call sheets — QuestPDF, role-scoped          [✓]

Design principles the implementation is being held to:

  • The LLM must never "reason" schedules. Gemini's role is to extract, formulate and explain; a deterministic CP-SAT solver computes; union rules live in the domain layer as tested code, not in prompts. The solver and the domain rules already work this way.

  • Nothing commits without a human, and the board says who. The replanner proposes ranked options with cost deltas; only the Producer role can commit a schedule version. Proposed by and approved by are two separate fields and two different people — the proposer is usually an agent, the approver can only ever be a human. They used to be one field, so the board read Committed · created by sa-replanner: a service account presented as the approver of the rule that exists to keep service accounts out. A reader believes the screen over the README.

  • Append-only versioning. Every replan is a new ScheduleVersion with its parent, author (human or agent) and triggering disruption — the audit trail is free.

    The governance audit trail: proposals by sa-replanner, the commit by Producer

  • Least-privilege agents, in two rings. Inside: the commit rule is enforced in ScheduleService.CommitAsync against an identity the platform proved rather than one the caller typed (EV-33). Outside: one service account per agent and per MCP server — twelve in all — of which five hold no project role whatsoever: sa-breakdown, sa-scheduler, sa-replanner, sa-callsheets and sa-mcp-weather. cloudsql.client is held by exactly four: the web app and the three MCP servers that read the schedule. sa-sentinel is not one of them and cannot reach the database. Every deployed service runs as its own identity. See docs/EVIDENCE.md §8 for the policy dump.

    The re-planning proposals screen acting as sa-replanner, with a red band reading "Refused: 'sa-replanner' cannot commit a schedule. Only the Producer role may commit - agents propose, humans decide."

Technology

Piece Technology Status
Solver Google OR-Tools CP-SAT (.NET bindings) ✅ working
Domain & union rules C# / .NET 10, pure domain layer ✅ working
Call sheets QuestPDF ✅ working
Web UI Blazor Server (.NET 10) ✅ driven by the solver
Services Four MCP servers (ModelContextProtocol.AspNetCore) ✅ speak MCP · ✅ deployed, private
Data EF Core 9 → Cloud SQL (PostgreSQL 16), migrations applied at startup ✅ working
Grafana dashboard Versioned JSON + provisioning script (infra/grafana/) ✅ working
Grafana alert rules Versioned JSON over shoot_* metrics, provisioned by script ✅ working
Screenplay breakdown Gemini 2.5 Flash on Vertex AI (google-genai, structured output) ✅ working
Replanner agent Google ADK LlmAgent over the solver API ✅ working
Orchestration Google ADK root agent + sub-agent transfer ✅ working
Agent hosting Vertex AI Agent Engine ✅ deployed, running as sa-orchestrator
Agent-to-agent A2A wire protocol ❌ not implemented, and deliberately not planned — see the gap table below
Partner integration Grafana MCP client — Streamable HTTP, JSON-RPC 2.0, 73 tools ✅ working
MCP servers of our own ModelContextProtocol.AspNetCore 2.1.0, 33 contract tests ✅ built · ✅ consumed by the agents · ✅ private on Cloud Run
Observability (partner) OpenTelemetry OTLP → Grafana Cloud, shoot_* production metrics ✅ working
Governance Commit requires a platform-proved Producer, not a name in the payload ✅ working
Mutation testing Stryker.NET over UnionRulesService — 100%, 0 survivors ✅ working
Security Secret Manager for every credential; one service account per agent, four holding no role at all ✅ working — every deployed service runs as its own identity

The rest of the detail

Moved out of this page so it stays readable. Each is self-contained.

Why this exists Who suffers, what it costs with sources, the incumbent comparison, and the limits
The Grafana partner track What is on the wire, the four alert rules, and how to see it without an account
Scale and the cost model Whether CP-SAT still answers at feature length, and where every dollar figure comes from
Running it yourself Clone to deployment: our own MCP servers, the agents, Grafana, and stopping the paid services
Evidence Every claim below, with the command that reproduces it

Repository layout

src/           .NET solution: Domain, Application, Infrastructure, Solver,
               four Mcp.* servers, CallSheets, Web (Blazor)
agents/        Python agent layer: breakdown, sentinel, replanner, orchestrator,
               common/ (the MCP transport all of them share)
tests/         xUnit: domain rules, solver, MCP protocol contracts, telemetry, call sheets
infra/         Cloud Run deploy scripts, Grafana dashboard + alert rules, per-agent IAM
adr/           Architecture Decision Records (ADR-005, ADR-008 … ADR-024)
demo/          Sample screenplays (Fountain, .fdx, PDF), demo harnesses, pitch deck
docs/          EVIDENCE.md — logs and figures behind the claims above,
               API_REFERENCE.md — the HTTP and MCP surface, img/ — screenshots
01_Diseno/     Mermaid entity, state and sequence diagrams
stryker-config.json  Mutation testing, scoped to the union rules
LICENSE·NOTICE Apache-2.0 and the attribution notice it asks for

⚠️ Implementation status

This section is the contract between what the rest of this README claims and what the code actually does. It sits near the end rather than at the top: honesty about the gaps is worth more once a reader has seen what the thing is, and a page that opens on its own caveats invites you to stop reading before it has said anything.

The gaps are the visible list; the working list is collapsed below it. The architecture diagram above carries no open marks, because there are none left in it.

Not implemented yet — do not read the sections below as claims that these exist:

Gap Where Tracked by
The replanner still reaches the engine over REST (POST /api/replan), not MCP — mcp-schedule has no replan-from-disruption tool. The scheduler and governance specialists do go over MCP agents/replanner EV-23, remainder
Agents coordinate through ADK sub-agent transfer, not the A2A wire protocol. A decision, not a backlog item: A2A solves separately-owned agents discovering each other across a network, and ours are four LlmAgent objects in one process agents/orchestrator closed, not planned

One of those rows closes with time; the other is closed already, the other way, by a decision. Nothing in that table is waiting on a problem we have not solved.

A third row used to sit there — the Quickstart had never been reproduced on a clean machine. It was, on 2026-08-26, in two containers that cloned from GitHub: dotnet/sdk:10.0 built with 0 warnings and ran 105 tests, 0 skipped, and python:3.12-slim ran 83. The run found one real defect, a missing git in the prerequisites, now listed. What it could not cover is the cloud paths: with no credentials in the container, 14 Python tests skipped. The output is in EVIDENCE §13.

Working today — the full list, with the ADR behind each one
  • Screenplay breakdown with Gemini 2.5 Flash on Vertex AI (agents/breakdown, EV-18 and EV-28) from Fountain, Final Draft .fdx or PDF — a scanned script is read by Gemini multimodal. Native structured output against a Pydantic schema, a validation-feedback retry loop, and an explicitly-labelled fallback. The agent also separates the location the unit travels to from the set within it, which is what makes the company-move count real. See ADR-009 and ADR-013.

  • Grafana observes the shoot, not the app (EV-29): OpenTelemetry exports shoot_* metrics — days, company moves, cost, union violations, a schedule risk index, the worst day's location count and per-actor idle time — to Grafana Cloud, and every Mission Control panel queries them. "Ask your shoot" answers questions in plain English by discovering the Grafana MCP server's tools at runtime and letting Gemini query them; the first turn is forced to call a tool so an answer can never be a number the model made up. It runs as a private multi-container Cloud Run service — agent plus Grafana MCP sidecar — reachable only by the web app. See ADR-014 and ADR-015.

  • Grafana starts the loop, not a person (EV-29): four alert rules over those production metrics live in infra/grafana/alert-rules.json — union violations, a day hopping between locations, cast paid to wait, cost above budget. The Conflict Sentinel reads the firing ones back over MCP and hands them to the agents, so alert → options → human approval runs without a person starting it (demo/run_alert_loop.py). A gauge with no schedule to describe now publishes nothing rather than 0, because a rule watching for union violations reads zero as a clean shoot. See ADR-019.

  • Conflict Sentinel as a live Grafana MCP client (agents/sentinel, EV-19), speaking the MCP Streamable HTTP transport to the official grafana/mcp-grafana server: 73 tools discovered on Grafana Cloud, disruptions published as real annotations via create_annotation. See ADR-010.

  • Deterministic shooting-schedule solver on Google OR-Tools CP-SAT (src/Stripboard.Solver, EV-27): day/night units, Day Out of Days cast availability, permit windows, disruption blocks, an optional hard cap on locations per day, and a day length that includes its meal break and company moves. Union turnaround holds by construction rather than being checked afterwards — see ADR-012.

  • A poor plan is priced, not just replanned around (EV-29): when nothing is blocked but the schedule is bad — a day hopping between four locations — POST /api/schedule/consolidate re-solves under a hard cap and answers with what obeying it costs in shooting days and dollars. Grafana's alerts carry a stripboardAction label saying which of the two a firing rule wants, because what happened and what to do about it are different questions.

  • The UI is driven by the engine (EV-21): the stripboard, the replan options and their cost deltas are all read from persisted schedule versions produced by real solver runs. Importing a different screenplay changes what the board shows.

    The shooting stripboard, with the industry strip colour code and the day's call, wrap and turnaround

  • Disruption → replan → human approval, end to end: a disruption becomes scene-date constraints, each replan strategy is a separate CP-SAT run, and only the Producer role can commit the result.

    Two replan options with cost deltas, and a note saying the second matches the first on every figure

  • The replanner is a Google ADK agent that explains options it did not compute (agents/replanner, EV-24): its single tool calls the solver, so every figure it states is traceable to a CP-SAT run. See ADR-017.

  • A multi-agent orchestrator that delegates rather than answers (agents/orchestrator, EV-25): a root ADK agent with no tools at all routes each request to scheduler, replanner or governance through ADK sub-agent transfer. It owns nothing it could answer from, so no figure it reports can be one a specialist did not produce. The governance agent has the commit tool and is refused by the service with HTTP 403 — the rule is tested by being broken, not by being withheld. See ADR-018.

  • Stripboard is an MCP server too, not only a client (EV-23): the four Stripboard.Mcp.* services speak the real protocol through the official ModelContextProtocol.AspNetCore SDK — initialize, tools/list with generated schemas, tools/call. 33 contract tests drive the protocol itself rather than the classes behind it. See ADR-021.

  • And the agents consume them (EV-23): the orchestrator's scheduler and governance specialists have no tools written in Python. They are read from mcp-schedule with tools/list — at startup when the orchestrator runs locally, and at deploy time against the live server when it is packaged for Agent Engine, because a socket cannot be pickled and a credential belonging to whoever ran the deploy has no business travelling with it. Either way the tool is invoked at runtime with a tools/call, their MCP schemas become Gemini function declarations, and calling one is a tools/call — so adding a tool in ScheduleTools.cs gives the agents a new capability with no Python change. The commit refusal now travels that path too: the governance agent calls commit_schedule over MCP and the server refuses it. Not ADK's MCPToolset, which imports the reference SDK from a vendor the rules name — the toolset is ~80 lines on the transport we already wrote for Grafana. See ADR-023.

  • The four MCP servers are on Cloud Run, and private (EV-23): each runs as its own service account, three reaching Cloud SQL and sa-mcp-weather holding no project role at all — the weather server cannot read the schedule rather than merely not doing so. An anonymous caller gets 403; an authenticated one completes the MCP handshake. Deployment changes what the governance rule can say: locally nothing is verified so nobody may commit, while on Cloud Run the identity is one Google validated, and the refusal names the caller. infra/deploy-mcp.sh, and see ADR-023.

  • The orchestrator runs on Vertex AI Agent Engine, as its own service account (EV-26): deployed with agents/deploy_agent_engine.py, and verified by invoking it remotely — the trace shows get_schedule going out and the committed board coming back. It reaches the private mcp-schedule service over MCP, minting its own identity token as sa-orchestrator from the metadata server: no credential travels in the deployment package, and Cloud Run would answer 403 to any other identity. That is Workload Identity being the thing that stops an agent, rather than a setup script that describes one.

  • An identity is not a string the caller sends (EV-33): committing requires a principal the platform proved — Cloud Run's validated identity token, or an authenticated human session. A name in a request body is a claim, and a claim cannot commit. Before this, an agent told not to commit only had to send identity: "Producer". See ADR-020.

  • The union rules are verified by mutation testing (EV-34) — 100%, 21 mutants killed, 0 survived over UnionRulesService (dotnet stryker). It found two real gaps: the night-to-day rule was never tested for not applying, and the 14-hour boundary was unpinned. See ADR-022.

  • State survives a restart (EV-22): schedules, disruptions and the audit trail live in Cloud SQL, reached over a Unix socket with the connection string held in Secret Manager. See ADR-016.

  • The union agreement is named, and it is configuration (EV-42): turnaround, meal breaks and the night→day transition are IATSE / SAG-AFTRA figures, stated as such, and selectable — Stripboard:UnionAgreement=european switches to the Working Time Directive's eleven-hour daily rest. The longest lawful day is derived from the rest owed, not configured separately, so eleven hours of rest permits a thirteen-hour day and the same screenplay needs fewer of them: changing the profile changes the schedule, not just the warnings. See ADR-024.

  • The agents are observed too, on their own dashboard (EV-47): four instruments in agents/common/telemetry.py — LLM tokens, LLM duration, MCP calls, MCP duration — exported over OTLP to the same Grafana Cloud stack. The counter carries a status label and increments on the failure path, because a counter that only rises on success reports a healthy integration right up until nothing works. Published read-only: https://pinkcorridor3522.grafana.net/public-dashboards/c046a2db657a4d42bf4e243afc825bc9 The track asks for two things and this is the second: observe the agent you build.

  • Role-scoped call sheets as PDF via QuestPDF.

  • Blazor UI with six pages, and a versioned Grafana dashboard and alert rules.

  • 105 xUnit tests and 83 Python tests, green (dotnet test, python -m unittest). The Gemini and Grafana integration tests make real calls and fail — not skip — when the service is configured but broken.

The runtime evidence behind every claim above, with the commands to reproduce each one, is in docs/EVIDENCE.md.

The 3-minute demo

https://youtu.be/6LZxawdvXaU — seven shots, chaptered, English subtitles.

It lands the Grafana moments in order: the public dashboard reading the shoot's own metrics, a rule in the firing state on a page a judge can open without an account, the Conflict Sentinel reading that rule back through the official Grafana MCP server in a terminal, and the refusal the scheduling service returns when an agent tries to commit its own recommendation.

The shot list and the words are in demo/video/. make_voiceover.py generates the voice and subtitles.srt from narration.md, which is their only copy: there is no second transcript to keep in step, and the subtitles are the script rather than a transcription of it.

One moment that was planned is not in the video, because the system does not do it. An earlier draft of the narration closed on the decision being written back to Grafana as an annotation. Annotations are written by the sentinel when it detects disruptions (agents/sentinel/sentinel_agent.py); nothing under src/ calls the annotations API, and approving a schedule writes none. The closing shot describes the audit trail instead — which is what the screen shows, and what the system actually guarantees.

Development notes

This project is developed primarily with AI assistance (Google Antigravity) under an internal engineering standard (Clean Architecture/DDD, tested domain rules, conventional commits, ADRs). The product is designed so that all runtime AI is Gemini on Google Cloud; no third-party AI SDK is present in this repository.

License

Apache-2.0 · Copyright 2026 Ing. Hugo Valer Rojas — see NOTICE.

About

Autonomous line producer for film shoots — Gemini + CP-SAT + Grafana MCP. The LLM formulates, the solver decides, a human approves.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages