# raunakpatil/youtube-agentic-ai-studio architecture

> Architecture diagram of the GitHub repository raunakpatil/youtube-agentic-ai-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raunakpatil/youtube-agentic-ai-studio
- Repository: https://github.com/raunakpatil/youtube-agentic-ai-studio

## Overview

This is a faceless YouTube video production studio. Its principal workflow researches a channel-fit topic, writes a long-form or Shorts script, gathers stock imagery, generates narration, renders a video, pauses for human approval, and uploads approved work. The CLI pipeline explicitly orchestrates these stages; the GUI is a separate documented control surface. The README also describes model fallback and background music. Some GUI and renderer internals were not fully sampled, so their specific connections are shown only where documentation supports them.

Main entry points: [`pipeline.py`](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/pipeline.py) (CLI pipeline), [`gui.py`](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/gui.py) (Web GUI), [`video/creator.py`](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/creator.py) (Video renderer), [`review/app.py`](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/review/app.py) (Review dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Studio control"]
  node_cli["CLI pipeline<br/>[pipeline.py]"]
  node_gui["Web GUI<br/>[gui.py]"]
  node_config["Studio settings<br/>[config.py]"]
end

subgraph group_planning["Topic and script"]
  node_research["Topic research<br/>[researcher.py]"]
  node_gemini["Gemini fallback client<br/>[gemini_client.py]"]
  node_script["Script writing<br/>[scriptwriter.py]"]
end

subgraph group_media["Media production"]
  node_stock["Stock images<br/>[stock.py]"]
  node_pexels["Pexels"]
  node_narration["Voice narration<br/>[narrator.py]"]
  node_edge_tts["Edge TTS"]
  node_renderer["Video renderer<br/>[creator.py]"]
  node_music["Background music<br/>[music.py]"]
  node_video_file["Rendered video"]
end

subgraph group_publishing["Review and publishing"]
  node_review["Review dashboard<br/>[app.py]"]
  node_youtube_upload["YouTube uploader<br/>[youtube.py]"]
  node_youtube["YouTube"]
end

node_creator(("Studio user"))
node_reviewer(("Human reviewer"))

node_creator -->|"runs pipeline"| node_cli
node_creator -->|"uses studio"| node_gui
node_cli -->|"calls"| node_research
node_research -->|"generates with"| node_gemini
node_cli -->|"calls"| node_script
node_script -->|"generates with"| node_gemini
node_cli -->|"downloads images"| node_stock
node_stock -->|"searches and downloads"| node_pexels
node_cli -->|"generates narration"| node_narration
node_narration -->|"synthesizes speech"| node_edge_tts
node_cli -->|"renders video"| node_renderer
node_renderer -.->|"mixes background music"| node_music
node_renderer -->|"produces"| node_video_file
node_cli -->|"starts review"| node_review
node_review -->|"presents video for decision"| node_reviewer
node_review -->|"serves video"| node_video_file
node_cli -->|"uploads if approved"| node_youtube_upload
node_youtube_upload -->|"publishes video and metadata"| node_youtube
node_gui -.->|"controls generation"| node_research
node_gui -.->|"supports publishing"| node_youtube_upload

click node_cli "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/pipeline.py"
click node_gui "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/gui.py"
click node_config "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/config.py"
click node_research "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/researcher.py"
click node_gemini "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/gemini_client.py"
click node_script "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/scriptwriter.py"
click node_stock "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/stock.py"
click node_narration "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/narrator.py"
click node_renderer "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/creator.py"
click node_music "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/music.py"
click node_review "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/review/app.py"
click node_youtube_upload "https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/uploader/youtube.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_gui,node_config,node_creator,node_reviewer toneBlue
class node_research,node_gemini,node_script toneAmber
class node_stock,node_pexels,node_narration,node_edge_tts,node_renderer,node_music,node_video_file toneMint
class node_review,node_youtube_upload,node_youtube toneRose
```

## Components

### Studio control

- [CLI pipeline](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/pipeline.py): `pipeline.py`
- [Web GUI](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/gui.py): `gui.py`
- [Studio settings](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/config.py): `config.py`

### Topic and script

- [Topic research](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/researcher.py): `agents/researcher.py`
- [Gemini fallback client](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/gemini_client.py): `agents/gemini_client.py`
- [Script writing](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/agents/scriptwriter.py): `agents/scriptwriter.py`

### Media production

- [Stock images](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/stock.py): `video/stock.py`
- **Pexels**
- [Voice narration](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/narrator.py): `video/narrator.py`
- **Edge TTS**
- [Video renderer](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/creator.py): `video/creator.py`
- [Background music](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/video/music.py): `video/music.py`
- **Rendered video**

### Review and publishing

- [Review dashboard](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/review/app.py): `review/app.py`
- [YouTube uploader](https://github.com/raunakpatil/youtube-agentic-ai-studio/blob/main/uploader/youtube.py): `uploader/youtube.py`
- **YouTube**

### Other components

- **Studio user**
- **Human reviewer**

## Connections

- Studio user → CLI pipeline: runs pipeline (evidence: `README.md`)
- Studio user → Web GUI: uses studio (evidence: `README.md`)
- CLI pipeline → Topic research: calls (evidence: `pipeline.py`)
- Topic research → Gemini fallback client: generates with (evidence: `agents/researcher.py`)
- CLI pipeline → Script writing: calls (evidence: `pipeline.py`)
- Script writing → Gemini fallback client: generates with (evidence: `agents/scriptwriter.py`)
- CLI pipeline → Stock images: downloads images (evidence: `pipeline.py`)
- Stock images → Pexels: searches and downloads (evidence: `video/stock.py`)
- CLI pipeline → Voice narration: generates narration (evidence: `pipeline.py`)
- Voice narration → Edge TTS: synthesizes speech (evidence: `README.md`)
- CLI pipeline → Video renderer: renders video (evidence: `pipeline.py`)
- Video renderer → Background music: mixes background music (evidence: `README.md`)
- Video renderer → Rendered video: produces
- CLI pipeline → Review dashboard: starts review (evidence: `pipeline.py`)
- Review dashboard → Human reviewer: presents video for decision (evidence: `review/app.py`)
- Review dashboard → Rendered video: serves video (evidence: `review/app.py`)
- CLI pipeline → YouTube uploader: uploads if approved (evidence: `pipeline.py`)
- YouTube uploader → YouTube: publishes video and metadata (evidence: `uploader/youtube.py`)
- Web GUI → Topic research: controls generation (evidence: `README.md`)
- Web GUI → YouTube uploader: supports publishing (evidence: `README.md`)
