Inspiration

Media production pipelines run on the same fragile infrastructure as any enterprise network — ingest servers, DRM authentication, CDN distribution — except the assets moving through them are unreleased films and shows worth hundreds of millions of dollars. A single anomaly, like unauthorized access or a burst of failed authentication attempts, is a direct operational and financial risk to the studio.

That's the exact category of problem I've been working on in a different setting: a final-year project on honeypot-based threat detection, plus GRC and ISO 27001 experience from a security internship. Studio crews running production infrastructure face the same reality every SOC team does — too much telemetry, not enough time to read it, and no dedicated tooling built for their specific pipeline. Frame Zero closes that gap: an agent that reads pipeline logs the way a security analyst would, so a human only has to look when something genuinely matters.

What it does

Frame Zero is an agent, built for studio crews, that watches a media production pipeline's logs and investigates anomalies automatically:

Queries pipeline telemetry in Grafana Cloud via the Grafana MCP server — real LogQL queries against Loki, not mocked data. Detects anomalies: unusual access patterns to unreleased assets, spikes in failed DRM authentication, requests from unresolvable or unexpected locations. Reasons over the evidence, not just pattern-matches: it identifies that failed attempts lack a user identity field that every legitimate login has, and that the timing between failed attempts is too regular to be human — genuine correlation, not a keyword flag. Writes a plain-English incident report citing the specific log lines, timestamps, and asset IDs it found. Annotates the Grafana dashboard directly using the create_annotation tool, so the finding is visible to a human reviewer without reading raw logs.

How we built it

Agent platform: Google's Agent Development Kit (ADK) in Python, running a Gemini-backed agent (gemini-3.5-flash) locally via adk web. Observability integration: the official mcp-grafana MCP server, launched as a subprocess via uvx, connected to a real Grafana Cloud instance using a scoped service account token (read/write on logs, nothing broader). Synthetic pipeline data: since real studio data isn't available, a Python script pushes synthetic DRM authentication events — both normal successful logins and a smaller number of deliberately anomalous failed attempts (unusual country codes, missing user identity) — directly into Grafana Cloud's Loki datasource via its push API. Write-back loop: on finding a genuine anomaly, the agent calls Grafana's own create_annotation tool, closing the loop from detection to visible action on the dashboard.

Challenges we ran into

A real version mismatch between ADK and the mcp Python package. ADK's MCPToolset was written against the MCP SDK's v1 structure; installing the latest mcp package (v2, which restructured its internals into mcp-types and httpx2) broke the import with No module named 'mcp.shared.session'. Fixed by pinning mcp<2.0 to match what ADK actually expects. A hardcoded, too-short session timeout. ADK's default MCP session startup timeout is 5 seconds, but the real handshake — spinning up the Go-based mcp-grafana binary via uvx, authenticating against Grafana Cloud, and discovering datasources — regularly took longer than that, especially on first run before the binary was cached locally. Fixed by wrapping StdioServerParameters in StdioConnectionParams with an explicit timeout=60, which isn't the default and isn't obvious from the basic ADK examples. Gemini's free-tier rate limits were the single biggest constraint on development speed — 5 requests/minute and roughly 20/day on the free tier, and a single investigation can burn several of those in one exchange (reasoning, the Loki query call, reasoning again, the annotation call, final answer). This meant testing had to be deliberate and infrequent rather than iterative, and directly shaped the agent's instructions: it's explicitly told to make one targeted query, reason in a single pass, and avoid re-querying, specifically to conserve quota. Model availability shifted mid-build. Google deprecated gemini-2.5-flash for new users and briefly had elevated 503 error rates on gemini-3.6-flash during our build window, requiring us to fall back to gemini-3.5-flash — the model that had already proven reliable in earlier testing — rather than chase the newest release under deadline pressure.

Accomplishments that we're proud of

A genuinely working end-to-end loop: synthetic incident data → Grafana ingestion → live agent investigation via real MCP tool calls → grounded, evidence-cited reasoning → dashboard annotation — with no manual intervention in the middle, running entirely on free-tier infrastructure. The agent's analysis is demonstrably not superficial: it independently identified two distinct suspicious signals (timing regularity and missing user-identity fields) that weren't spelled out in its instructions, purely from reasoning over the queried log data.

What we learned

Practical, first-hand experience with the Model Context Protocol as an integration pattern, including the real friction points — dependency version coupling between a framework (ADK) and the protocol SDK it wraps, and the importance of configuring realistic timeouts for subprocess-based MCP servers rather than trusting framework defaults. That building against free-tier LLM quotas is itself a design constraint, not just an inconvenience: it forced tighter, more deliberate agent instructions that reduce redundant tool calls — a discipline that would also make the agent cheaper and faster to run at any scale.

What's next for Frame Zero

Move off interactive free-tier rate limits onto a properly provisioned deployment, removing the request budget as a design constraint. Extend detection beyond DRM authentication events to cover more of the production pipeline, such as CDN access patterns and transcode pipeline errors. Add automated response actions, such as temporarily flagging or restricting suspicious access, once detection accuracy is validated against a larger and more varied dataset.

Built With

  • api
  • claude
  • command-prompt
  • gemini
  • grafana
  • grafana-stack
  • logs
Share this project:

Updates

Submission history