Skip to main content
YouTubeReader fetches the transcript for a YouTube watch URL and applies recursive chunking by default.
youtube_reader.py

Run the Agent

1

Set up your virtual environment

2

Install dependencies

3

Export the API key

4

Run PgVector

5

Run the agent

Reader Parameters

YouTubeReader also accepts the base Reader constructor parameters.
Use Knowledge.insert() with YouTubeReader in v2.7.2. Knowledge.ainsert() passes a document name to YouTubeReader.async_read(), which accepts only the URL, so asynchronous knowledge ingestion fails.

Next Steps