Prerequisites
The following example requires theyoutube_transcript_api library.
Example
The following agent will provide a summary of a YouTube video.cookbook/tools/youtube_tools.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
youtube_transcript_api library.
pip install -U youtube_transcript_api
from agno.agent import Agent
from agno.tools.youtube import YouTubeTools
agent = Agent(
tools=[YouTubeTools()],
show_tool_calls=True,
description="You are a YouTube agent. Obtain the captions of a YouTube video and answer questions.",
)
agent.print_response("Summarize this video https://www.youtube.com/watch?v=Iv9dewmcFbs&t", markdown=True)
| Param | Type | Default | Description |
|---|---|---|---|
get_video_captions | bool | True | Enables the functionality to retrieve video captions. |
get_video_data | bool | True | Enables the functionality to retrieve video metadata and other related data. |
languages | List[str] | - | Specifies the list of languages for which data should be retrieved, if applicable. |
| Function | Description |
|---|---|
get_youtube_video_captions | This function retrieves the captions of a YouTube video. |
get_youtube_video_data | This function retrieves the metadata of a YouTube video. |
Was this page helpful?