TubeGuardAI is an producion-grade Automated Video Compliance QA Pipeline. Orchestrated by LangGraph, it is designed to audit video content against complex regulatory standards using a Multimodal RAG (Retrieval-Augmented Generation) architecture.
By synthesizing visual cues, transcripts, and OCR (Optical Character Recognition) data from video, TubeGuardAI transforms unstructured video into structured, actionable compliance reports with production-grade observability.
This project uses tools from Microsoft Azure: Cloud Computing Services
- Multimodal Ingestion: Extracts deep insights (transcripts, OCR, and visual Cues) from video using Azure AI Video Indexer.
- Agentic Orchestration: Leverages LangGraph to manage complex, stateful reasoning flow for auditing.
- Intelligent Retrieval: Uses Azure AI Search and Azure OpenAI (Embedding model) to pull relevant regulatory rules based on video context.
- Deterministic Reasoning: Powered by Azure OpenAI (LLM) to detect violations and generate precise, evidence-based reports.
- Full-Stack Observability:
- LangSmith: Granular tracing for LLM workflow optimization.
- Azure Application Insights: Real-time telemetry, logging, and performance monitoring.
TubeGuardAI exposes its agentic workflow through a high-performance FastAPI backend, enabling seamless integration with frontend applications and enterprise dashboards.
- Asynchronous Orchestration: Designed to handle long-running video AI tasks using non-blocking execution patterns.
- Pydantic Data Validation: Strict schema enforcement for
AuditRequestandAuditResponsemodels, ensuring 100% Type Safety. - Production Telemetry: Integrated with Azure Application Insights via a custom telemetry module to track request latency, success rates, and system health.
- Automatic Documentation: Interactive Swagger UI and ReDoc generated automatically for rapid developer onboarding.
- Robust Error Handling: Centralized exception management using FastAPI
HTTPExceptionto provide actionable feedback to clients.
| Method | Endpoint | Description |
|---|---|---|
POST |
/audit |
Triggers the LangGraph compliance workflow for a given video URL. |
GET |
/health |
Service heartbeat and health check. |
The pipeline follows a sophisticated workflow to ensure high-fidelity compliance checks:
- Data Ingestion(Azure Blob Storage): Raw video files are uploaded to an Azure Blob Storage container.
- Data Extraction: Videos are processed through Azure Video Indexer to generate Transcription, OCR data and Visual Cues.
- Regulatory RAG: The system queries a vector database of compliance documents to find rules applicable to the specific video content.
- Audit Logic (LangGraph): An agentic flow evaluates the video data against the retrieved rules from pdfs files.
- Structured Output: The final audit is delivered as a JSON Compliance Report, ready for downstream integration.
| Component | Technology |
|---|---|
| Orchestration | LangGraph |
| Storage | Azure Blob Storage |
| LLM | Azure OpenAI ('GPT-4o') |
| Video Intelligence | Azure AI Video Indexer |
| Vector Database | Azure AI Search |
| Embeddings | Azure OpenAI ('text-embedding-3-small') |
| Observability | LangSmith & Azure Application Insights |
| Language | Python 3.12 |
Before running the pipeline, ensure you have the following:
- An active Azure Subscription.
- Azure OpenAI deployment (GPT-4o and Embedding model).
- Azure AI Search service instance.
- Azure Video Indexer account.
- LangSmith API Key for debugging and tracing.
This project uses uv as the python package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
echo 'export PATH="$HOME/snap/code/221/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
uv --version
https://github.com/yoursrealkiran/TubeGuardAI.git
cd TubeGuardAI
uv venv
source .venv/bin/activate
uv sync
Run the script to begin the audit:
uv run python main.py
uv run uvicorn backend.src.api.server:app --reload
Open /audit endpoint in Swagger UI, enter YouTube URL and execute to begin audit.