Skip to main content
from praisonaiagents import Agent

agent = Agent(
    name="YouTubeAgent",
    instructions="Extract and analyse YouTube video content.",
)
agent.start("Summarise the key points from this video: https://www.youtube.com/watch?v=example")
The user shares a video link or search topic; the agent finds content and summarises transcripts or metadata.

YouTube Search PraisonAI Integration

pip install youtube_search praisonai langchain_community langchain
# tools.py
from langchain_community.tools import YouTubeSearchTool
# agents.yaml
framework: crewai
topic: research about the causes of lung disease
agents:  # Canonical: use 'agents' instead of 'roles'
  research_analyst:
    instructions:  # Canonical: use 'instructions' instead of 'backstory' Experienced in analyzing scientific data related to respiratory health.
    goal: Analyze data on lung diseases
    role: Research Analyst
    tasks:
      data_analysis:
        description: Gather and analyze data on the causes and risk factors of lung
          diseases.
        expected_output: Report detailing key findings on lung disease causes.
    tools:
    - 'YouTubeSearchTool'

Quick Start

1

Install

pip install praisonaiagents youtube-transcript-api
2

Extract video content with agent

from praisonaiagents import Agent

agent = Agent(
    name="YouTubeAgent",
    instructions="Extract and analyze YouTube video content.",
)

agent.start("Summarize the key points from this video: https://www.youtube.com/watch?v=example")

Best Practices

YouTube transcripts provide the full spoken content - much richer than titles or descriptions.
Search for videos first, then extract transcripts from the most relevant ones.
Not all videos have transcripts - always check for None before processing.
Long video transcripts may exceed context limits - chunk them into segments for analysis.

Custom Tools

Build your own agent tools

Tools Overview

Browse PraisonAI tool documentation