Sanity Challenge 2026 Submission — Path One: Ship an Agent That Queries Real Content
An executive compliance gatekeeper evaluating films and television series against clinical vulnerabilities (photosensitive epilepsy, acoustic shock, PTSD) and statutory CBFC classifications. Grounded strictly in structured records from the Sanity Content Lake.
USHER solves the high-stakes problem of cinematic compliance:
- Zero Hallucination Policy: If a movie is uncertified in Sanity, USHER strictly refuses to speculate or generate probabilistic medical advice.
- Relational Integrity: Queries typed graph documents connecting Movies, CBFC Statutory Ratings, Clinical Triggers (with exact millisecond timestamps and decibel surges), and Governing Accessibility Rules.
- Dual-Theme Design: Sleek Space Black & Metallic Slate (default) and Warm Coffee & Mocha Beige.
- Audited Catalog: 42 certified titles across 8 genres with official high-resolution artwork.
┌────────────────────────────────────────────────────────┐
│ USHER Web Interface │
│ Next.js App Router · Dual Theme · Poster Catalog │
└───────────────────────────┬────────────────────────────┘
│ /api/chat
▼
┌────────────────────────────────────────────────────────┐
│ Compliance Gateway API │
│ Gemini 3.5 Flash Lite + Multi-Key Failover Loop │
│ + Deterministic Fallback Engine │
└───────────────────────────┬────────────────────────────┘
│ search_knowledge_base
▼
┌────────────────────────────────────────────────────────┐
│ Sanity Content Lake Query │
│ Live GROQ Query / Sanity Context MCP Endpoint │
└───────────────────────────┬────────────────────────────┘
│ Structured Graph
▼
┌────────────────────────────────────────────────────────┐
│ Sanity Knowledge Base │
│ [Movie] ──> [CBFC Statutory Rating] │
│ │ │
│ ├───> [Trigger Warnings] (Mild, Severe, Critical) │
│ └───> [Accessibility Rules] (ITU-R, CBFC, WHO) │
└────────────────────────────────────────────────────────┘
usher/
├── studio/ # Sanity Studio schemas & seeding script
│ ├── schemas/ # movie, triggerWarning, accessibilityRule, cbfcRating
│ ├── seed.mjs # Master seeder (42 titles, 13 triggers, 7 rules, 5 ratings)
│ └── sanity.config.ts
└── web/ # Next.js web application
├── src/app/ # page.tsx, globals.css, layout.tsx, api/chat/route.ts
├── src/lib/ # mcp-client.ts (GROQ Knowledge Lake & MCP interface)
├── .env.example # Production environment variables template
└── package.json
USHER is optimized for single-click deployment on Vercel:
When importing your GitHub repository into Vercel:
- Set Root Directory to
web(since the Next.js app is inside theweb/folder). - Framework Preset: Next.js.
Add the following in Vercel Project Settings → Environment Variables:
| Variable | Description | Example / Source |
|---|---|---|
GOOGLE_GENERATIVE_AI_API_KEY |
Google Gemini API Key(s). Supports comma-separated keys for automatic failover. | AIzaSy... or key1,key2 |
SANITY_PROJECT_ID |
Sanity Project ID | ntxlr356 |
SANITY_DATASET |
Sanity Dataset | production |
SANITY_ORGANIZATION_TOKEN |
Read token with Content Lake access | skJ2LArYUVufd3... |
SANITY_CONTEXT_MCP_URL |
Sanity Context MCP Remote Endpoint | https://mcp.sanity.io |
Click Deploy. Vercel will install dependencies, build the Next.js application, and deploy to a live .vercel.app domain.
cd web
npm install
npm run devOpen http://localhost:3000.
cd studio
npm install
node seed.mjs- ITU-R BT.1702-2: Guidance for the reduction of photosensitive epileptic seizures caused by television.
- CBFC Guidelines 2023: Indian Cinematograph Act 1952 statutory rating directives.
- WHO Auditory Safety Standards: High-decibel sound threshold (>85 dB sustained, >115 dB impulse blast).
- Active Production Engine: Direct GROQ queries over the Sanity Content Lake HTTP Query API (
https://<projectId>.api.sanity.io/v2024-01-01/data/query/<dataset>). - Agent Tool Integration: Implemented as a Vercel AI SDK tool named
search_knowledge_baseinsideweb/src/lib/mcp-client.ts, which dereferences the relational graph in ~100ms. - MCP Compatibility: Includes a JSON-RPC 2.0 client adapter (
callSanityContextMcp) structured to communicate with Model Context Protocol (MCP) endpoints.
- Titles, CBFC Classifications, and Documented Hazards: Sourced from official public film records and well-documented media advisories (e.g., Disney's theatrical warning letters for Incredibles 2 photic seizures, public dynamic audio reports for Oppenheimer and A Quiet Place, CBFC certification database entries).
- Timestamps & Acoustic Measurements: Exact runtime timestamps and decibel surge values are curated demonstration data created for the Sanity Challenge 2026 to model real-world clinical schemas, not laboratory EEG or sound meter certified datasets.