PODPIPELINE

2 Squirrels AI

Technology Stack

End-to-end AI-powered podcast automation platform with multi-agent orchestration, Human-in-the-Loop (HITL) approval checkpoints, intelligent content discovery, and automated distribution to major platforms.

Orchestration LangGraph
LLM Claude / OpenAI
Web Search Tavily API
TTS Chatterbox / Kokoro
Backend NestJS
Queue BullMQ

Workflow 1: End-to-End Podcast Production Pipeline

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart TB
    subgraph Input["📥 USER INPUT"]
        SUB["🎯 Subjects + Params"]
    end

    subgraph Discovery["🔍 CONTENT DISCOVERY"]
        SEARCH["🌐 Web Search
Tavily API"] RANK["📊 Article Ranking
& Selection"] end subgraph HITL1["👤 HITL CHECKPOINT 1"] APP1{"✅ Human
Approval?"} end subgraph Processing["⚙️ CONTENT PROCESSING"] SUM["📝 Content
Summarization"] HOST["🎭 Host Personality
Generation"] SCRIPT["📜 Script
Generation"] end subgraph HITL2["👤 HITL CHECKPOINT 2"] APP2{"✅ Script
Review?"} end subgraph Production["🎵 AUDIO PRODUCTION"] TTS["🎤 TTS Audio
Generation"] POST["🎚️ Audio
Post-Processing"] end subgraph HITL3["👤 HITL CHECKPOINT 3"] APP3{"✅ Final
Approval?"} end subgraph Distribution["📤 DISTRIBUTION"] PUBLISH["🚀 Platform
Distribution"] ANALYTICS["📈 Analytics &
Monitoring"] end SUB --> SEARCH SEARCH --> RANK RANK --> APP1 APP1 -->|"Approved"| SUM APP1 -->|"Rejected"| SEARCH SUM --> HOST HOST --> SCRIPT SCRIPT --> APP2 APP2 -->|"Approved"| TTS APP2 -->|"Edit"| SCRIPT TTS --> POST POST --> APP3 APP3 -->|"Approved"| PUBLISH APP3 -->|"Reject"| POST PUBLISH --> ANALYTICS

HITL Checkpoints: Three human approval gates ensure quality at critical junctures - content selection, script review, and final audio approval before publishing.

Workflow 2: LangGraph Content Discovery State Machine

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart TB
    subgraph State["📊 DISCOVERY STATE"]
        direction LR
        S1["projectId"]
        S2["parameters"]
        S3["searchResults"]
        S4["articles"]
        S5["rankedArticles"]
        S6["approvalStatus"]
    end

    subgraph Agents["🤖 LANGGRAPH AGENTS"]
        direction TB
        AG1["🔎 searchAgent
Web Search"] AG2["📄 extractAgent
Content Extraction"] AG3["⭐ rankAgent
Ensemble Scoring"] end subgraph HITL["👤 HUMAN IN THE LOOP"] WAIT["⏳ wait_for_approval"] REFINE["🔄 refine_search
Based on Feedback"] end subgraph Edges["🔀 CONDITIONAL EDGES"] COND{"approvalStatus?"} end subgraph Output["📤 OUTPUT"] END1(("🏁 END")) end State --> AG1 AG1 -->|"addEdge"| AG2 AG2 -->|"addEdge"| AG3 AG3 -->|"addEdge"| WAIT WAIT --> COND COND -->|"approved"| END1 COND -->|"rejected"| REFINE COND -->|"pending"| WAIT REFINE -->|"addEdge"| AG1

Workflow 3: AI-Powered Article Ranking System

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart LR
    subgraph Input["📥 ARTICLES"]
        ART["📄 Raw Articles"]
    end

    subgraph Scoring["📊 MULTI-DIMENSIONAL SCORING"]
        direction TB
        SC1["🎯 Relevance
0-100"] SC2["⏰ Freshness
0-100"] SC3["🏛️ Authority
0-100"] SC4["💡 Engagement
0-100"] SC5["✨ Uniqueness
0-100"] SC6["🔥 Controversy
0-100"] SC7["❤️ Emotional
0-100"] end subgraph Ensemble["🧠 ENSEMBLE AGENT"] WEIGHT["⚖️ Weighted
Composite"] CONF["📈 Confidence
Score"] end subgraph Output["📤 RANKED OUTPUT"] RANK["🏆 Ranked Articles
with Scores"] end ART --> SC1 & SC2 & SC3 & SC4 & SC5 & SC6 & SC7 SC1 & SC2 & SC3 & SC4 & SC5 & SC6 & SC7 --> WEIGHT WEIGHT --> CONF CONF --> RANK

Workflow 4: AI Script Generation Pipeline

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart TB
    subgraph Input["📥 INPUTS"]
        ARTICLES["📄 Approved
Articles"] FORMAT["🎬 Show
Format"] end subgraph Summarization["📝 SUMMARIZATION"] SUM1["📰 Article Summary
Agent"] SUM2["🔗 Multi-Doc
Synthesis Agent"] end subgraph Personality["🎭 PERSONALITY"] direction TB TRAITS["📊 Personality Matrix
Intelligence, Tone, Energy"] VOCAB["📖 Vocabulary
& Speech Patterns"] QUIRKS["🎪 Catchphrases
& Quirks"] end subgraph Generation["✍️ SCRIPT GENERATION"] STRUCT["🏗️ Structure Agent
Segments & Pacing"] DIALOG["💬 Dialogue Agent
Host Conversations"] QA["✅ Quality Check
Agent"] end subgraph Metrics["📊 SCRIPT METRICS"] M1["📏 Word Count"] M2["⏱️ Duration Est."] M3["😊 Sentiment"] M4["📈 Energy Profile"] end ARTICLES --> SUM1 SUM1 --> SUM2 FORMAT --> STRUCT TRAITS & VOCAB & QUIRKS --> DIALOG SUM2 --> STRUCT STRUCT --> DIALOG DIALOG --> QA QA --> M1 & M2 & M3 & M4

Workflow 5: TTS Audio Production Pipeline

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart LR
    subgraph Script["📜 APPROVED SCRIPT"]
        SEG["📝 Script
Segments"] end subgraph Config["⚙️ TTS CONFIG"] ENG["🔧 Engine Selection
Chatterbox / Kokoro"] VOICE["🎭 Voice Mapping
Host → Voice ID"] PARAMS["🎛️ Parameters
Pitch, Speed, Emotion"] end subgraph Generation["🎤 TTS GENERATION"] TTS1["🔊 Generate
Audio Segments"] QUEUE["📋 BullMQ
Job Queue"] end subgraph PostProcess["🎚️ POST-PROCESSING"] NORM["📊 Volume
Normalization"] NOISE["🔇 Noise
Suppression"] COMPRESS["📦 Compression"] end subgraph Assembly["🎵 ASSEMBLY"] INTRO["🎼 Intro
Music"] CONCAT["🔗 Concatenate
Segments"] OUTRO["🎼 Outro
Music"] FADE["📉 Fade
In/Out"] end subgraph Output["📤 FINAL"] MP3["🎧 Episode.mp3"] META["📋 Metadata
ID3 Tags"] end SEG --> ENG ENG --> VOICE VOICE --> PARAMS PARAMS --> TTS1 TTS1 --> QUEUE QUEUE --> NORM NORM --> NOISE NOISE --> COMPRESS COMPRESS --> CONCAT INTRO --> CONCAT OUTRO --> CONCAT CONCAT --> FADE FADE --> MP3 FADE --> META

Workflow 6: Multi-Platform Distribution System

%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#C17852', 'primaryTextColor': '#F0F6FC', 'primaryBorderColor': '#4A5E32', 'lineColor': '#E6C98F', 'secondaryColor': '#161B22', 'tertiaryColor': '#0D1117', 'background': '#0D1117', 'mainBkg': '#161B22', 'nodeBorder': '#4A5E32', 'clusterBkg': '#161B22', 'clusterBorder': '#4A5E32', 'titleColor': '#E6C98F', 'edgeLabelBackground': '#161B22'}}}%%
flowchart TB
    subgraph Episode["🎧 FINAL EPISODE"]
        AUDIO["🔊 Audio File"]
        META["📋 Metadata"]
        ART["🖼️ Cover Art"]
    end

    subgraph MetadataAgent["🤖 METADATA AGENT"]
        SEO["🔍 SEO Optimization"]
        DESC["📝 Description
Generation"] CHAP["📑 Chapter
Markers"] end subgraph PlatformAdapters["🔌 PLATFORM ADAPTERS"] direction TB SPOT["🟢 Spotify
for Creators API"] YT["🔴 YouTube
Data API"] APPLE["🍎 Apple Podcasts
Connect"] AMAZON["📦 Amazon Music
RSS"] RSS["📡 Custom
RSS Feed"] end subgraph Analytics["📈 ANALYTICS"] LISTEN["👂 Listen Counts"] ENGAGE["💬 Engagement"] GROWTH["📊 Subscriber
Growth"] end AUDIO & META & ART --> SEO SEO --> DESC DESC --> CHAP CHAP --> SPOT & YT & APPLE & AMAZON & RSS SPOT & YT & APPLE & AMAZON --> LISTEN LISTEN --> ENGAGE ENGAGE --> GROWTH