Back to Workshops
Workshop Free

Build a Production-Ready YouTube AI Agent with Temporal

December 16, 2025 Alexey Grigorev
ai-agents data-engineering temporal elasticsearch production-systems

We build a deep research agent over the DataTalks.Club podcast archive. We start by downloading and indexing YouTube transcripts. Then we turn that ingestion code into a durable Temporal workflow. Once the data is searchable, we build a Pydantic AI research agent. We add a summarization sub-agent for long transcripts and wrap the agent run in Temporal too.

Links

The main resources for this workshop:

The system you will build

The final system looks like this:

flowchart LR YT["YouTube transcripts"] CACHE["Cached transcript files GitHub fallback"] FLOW["flow/ Temporal ingestion"] ES["Elasticsearch podcasts index"] AGENT["agent/ Pydantic AI research agent"] SUM["Summarization sub-agent"] TW["Temporal workflow agent run"] OPENAI["OpenAI"] YT -->|fetch_subtitles| FLOW CACHE -->|fetch_transcript_cached| FLOW FLOW -->|index_video| ES AGENT -->|search_videos| ES AGENT -->|summarize| SUM AGENT -->|model call| OPENAI SUM -->|model call| OPENAI TW -->|durable execution| AGENT

The ingestion side has the parts that usually fail in production. It makes network calls, runs proxies around YouTube's cloud-IP blocks, and writes to Elasticsearch. It also loops over many videos. Temporal gives that side retries, observability, and durable execution.

The agent side uses the indexed data to answer questions from the podcast archive. It uses Temporal again too, so long agent runs can survive failures.