Inspiration

Before a scene can be shot, legal/production teams have to manually check every song, brand, real person, and location referenced in a script for clearance risk: active litigation, licensing disputes, right-of-publicity issues, trademark conflicts. This is slow, manual, and easy to miss things on — a single uncleared song cue or a real person's name in a "based on true events" script can trigger a six-figure lawsuit or a forced re-shoot.

What it does

Rights & Clearance Scout automates the first pass: it reads a script excerpt or shot list, identifies every entity that carries legal risk, researches each one's current status on the open web (not stale training data — active news, lawsuits, disputes), and returns a structured, source-cited risk report with a recommended action per entity.

How we built it

The agent runs a deterministic, multi-step pipeline (not a single free-form chat turn): Extract — Gemini parses the uploaded script/shot list and pulls out every entity that carries clearance risk: song titles, brand/product mentions, real people's names, trademarks, real locations. Research — for each extracted entity, the agent calls the Parallel Search API to pull current, cited web results (recent litigation, licensing news, disputes, right-of-publicity concerns). This is the step that makes the agent "agentic" rather than a single LLM call — it's a tool-use loop over a dynamic list the model itself produced. Synthesize — Gemini classifies each entity's risk (clear / flag / escalate) and writes a structured report, citing the sources Parallel returned.

Challenges we ran into

Getting from "working locally" to "working on Google Cloud" surfaced a string of small but real infrastructure problems: Gemini deprecated the model we started with mid-build (gemini-2.5-flash → gemini-3.6-flash), the free-tier Gemini quota is capped at just 5 requests/minute — easy to blow through once a script has more than a couple of entities, since each one costs its own classification call — and a subtler bug where a PowerShell echo silently baked a trailing newline into our Parallel API key when we stored it in Secret Manager, which surfaced only as a cryptic "illegal header value" deep in an HTTP library. None of these were algorithm problems; they were the unglamorous reality of shipping an agent that actually calls two live third-party APIs from a real cloud environment, not just a notebook demo.

Accomplishments that we're proud of

The pipeline correctly differentiates risk rather than flagging everything indiscriminately — in testing, it distinguished a low-risk softly-branded prop (a Solo cup) from genuinely high-risk material (Spider-Man IP, an active internal legal dispute between Journey's own bandmates over "Don't Stop Believin'"), and it did that with real, live-researched, cited sources rather than guessed answers from training data. We also stress-tested it at both ends: a clean script with zero risky entities and a dense 17-entity scene spanning brands, real people, songs, trademarks, and locations — and it held up at both scales, including gracefully recovering from rate limits mid-scan instead of crashing.

What we learned

The Search tool and the deep-research/Task tool in Parallel's API have different parameter shapes — a mistake worth knowing about if you're building your first agent against their API. Rate-limit and transient-error handling isn't optional polish for a multi-call agent pipeline; it's the difference between a demo that works once and one that works reliably. And Google Cloud's billing model has more moving parts than expected — Cloud Billing (the $300 trial credit) and the Gemini API's own separate prepayment credit pool are two different systems, easy to conflate when you're troubleshooting a "why is this out of credits" error at 1am.

What's next for Rights & Clearance Scout

Registering the agent formally in the Gemini Enterprise console (rather than the deterministic pipeline we shipped) to get governance and permission scoping around exactly what the agent can call. Expanding entity detection to cover trade dress and set-dressing risk (not just named brands/people), letting a production upload a full script rather than a scene at a time, and turning each verdict into an actual clearance request that routes to the right rights-holder — moving from "flags the risk" to "starts the paperwork."

Built With

  • css
  • docker
  • fastapi
  • google-adk
  • google-cloud-run
  • google-cloud-secret-manager
  • google-gemini
  • html
  • parallel-api
  • python
Share this project:

Updates

Submission history