Tech AI Insights

Build a Powerful AI YouTube Summary Agent Locally with Streamlit, LangGraph & Ollama

Ever wanted a personal assistant that can watch a YouTube video and give you an intelligent, well-structured summary? In this project, I built a local-first AI YouTube Summary Agent using LangGraph, Ollama, and Streamlit. No cloud APIs, no heavy dependencies—just Python and some brilliant tooling. Let’s dive into what I built, how it works, and how you can run it on your own machine.

Why I Built an AI YouTube Summary Agent

Watching lengthy videos for that one key insight is frustrating. I wanted an agent that can:

  • Extract video transcripts intelligently
  • Summarize content using a local LLM (via Ollama)
  • Search related info using DuckDuckGo
  • Generate a complete structured report
  • Work fully offline and respect user privacy

This agent saves you hours of time and helps you focus only on what really matters—knowledge, not filler.

Key Features

  • 🎥 Summarize YouTube videos using transcripts
  • 🧠 Integrate with local LLMs (like Llama3) using Ollama
  • 🔍 Perform smart web searches with DuckDuckGo
  • 📝 Generate .txt reports with Streamlit download
  • 📊 Built with modular agents using LangGraph
  • 🚀 Fully offline-capable (no OpenAI or cloud dependency)

Each feature is designed to keep things simple yet powerful. Whether you’re summarizing a lecture, a product demo, or a coding tutorial, this agent is your go-to sidekick.

Tech Stack and Tools

  • Python – core language for scripting
  • Streamlit – for building a clean, interactive UI
  • LangGraph – to build stateful multi-step AI workflows
  • Ollama – to run LLMs locally
  • youtube-transcript-api – fetch video transcripts
  • duckduckgo-search – search without trackers

How the AI Agent Works

  1. User inputs a YouTube video URL
  2. The agent fetches the transcript using youtube-transcript-api
  3. Transcript is summarized using a local LLM (Llama3 via Ollama)
  4. DuckDuckGo performs additional search for enhanced context
  5. A full structured report is generated and downloadable as .txt file

Behind the scenes, LangGraph orchestrates the entire workflow. It routes information between components so everything works seamlessly.

How to Run This Project Locally with Ollama

  1. Install Ollama: Visit Ollama’s official site and install it for your OS
  2. Pull a model: ollama pull llama3 or any supported LLM
  3. Clone the project:
    git clone https://github.com/TechAIInsights/youtube-summarizer-ai.git
  4. Navigate into the project folder:
    cd youtube-summarizer-ai
  5. Create a virtual environment (recommended):
    python -m venv venv && source venv/bin/activate
  6. Install dependencies:
    pip install -r requirements.txt
  7. Run Streamlit:
    streamlit run app.py
  8. Input video URL and get a downloadable report in seconds!

This entire setup runs locally on your machine. No data leaves your device, which is perfect for privacy-conscious developers and researchers.

Real-World Use Cases

  • Developers learning from coding tutorials
  • Students summarizing lectures
  • Product managers consuming long product demos
  • Researchers reviewing academic talks

If you’re someone who learns best by watching but doesn’t have time to sit through hour-long videos, this agent can be a game changer for your workflow.

Lessons Learned

  • Combining local tools like Ollama with LangGraph provides full control
  • LangGraph simplifies multi-agent workflows
  • Even a simple UI like Streamlit can make your project highly usable

One key realization: the tooling for local AI has become powerful and accessible enough for almost anyone to build serious apps without any cloud dependency.

Helpful Links

Try It Yourself 👨‍💻

This is just one example of how you can combine tools to create a useful, privacy-first AI assistant. Feel free to fork the repo, improve the prompts, or switch the LLM to another model supported by Ollama. If this helped you, consider giving it a ⭐ on GitHub!

For more insightful tutorials, visit our Tech Blogs and explore the latest in Laravel, AI, and Vue.js development!

Scroll to Top