# Chat with YouTube

Fetches a video's metadata and transcript, then answers questions with clickable timestamp citations.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<DocsBaseSwitcher base="langgraph" agent="chat-with-youtube" />

<AgentPreview
  agent="chat-with-youtube"
  framework="langgraph"
  inputFields="[
  {
    name: &#x22;url&#x22;,
    label: &#x22;YouTube URL&#x22;,
    placeholder: &#x22;https://youtu.be/dQw4w9WgXcQ&#x22;,
    type: &#x22;text&#x22;,
  },
  {
    name: &#x22;question&#x22;,
    label: &#x22;Question&#x22;,
    placeholder: &#x22;Summarize the video with chapter timestamps.&#x22;,
    type: &#x22;text&#x22;,
  },
]"
/>

## Summary [#summary]

The **Chat with YouTube Agent** answers questions about a video using its
transcript. It pulls the video's metadata and full transcript, then summarizes,
answers follow-ups, and generates chapter timestamps — each citation a clickable
link straight to that moment. Reach for it to skim long talks, lectures, or
podcasts without watching end to end.

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @agentcn/langgraph/chat-with-youtube
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @dawn-ai/sdk youtube-transcript-scraper
      ```

      <Step>
        Copy and paste the following agent route files into your project.
      </Step>

      <ComponentSource src="registry/langgraph/chat-with-youtube/index.ts" title="index.ts" />

      <ComponentSource src="registry/langgraph/chat-with-youtube/instructions.md" title="instructions.md" />

      <ComponentSource src="registry/langgraph/chat-with-youtube/lib/youtube-utils.ts" title="lib/youtube-utils.ts" />

      <ComponentSource src="registry/langgraph/chat-with-youtube/tools/youtube-metadata.ts" title="tools/youtube-metadata.ts" />

      <ComponentSource src="registry/langgraph/chat-with-youtube/tools/youtube-transcript.ts" title="tools/youtube-transcript.ts" />

      <Step>
        Run `dawn check` after copying so route and tool metadata are regenerated.
        `dawn dev`, `dawn build`, and `dawn verify` also run the same discovery path.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Composition [#composition]

```text
├── index.ts
├── instructions.md
├── lib/youtube-utils.ts
├── tools/youtube-metadata.ts
├── tools/youtube-transcript.ts
```

## Customization [#customization]

* Edit `index.ts` to change the model, description, or system prompt.
* Add route-local tools under `tools/`; tool input and output types are inferred from TypeScript.
* Run `dawn verify` before deploying generated LangGraph artifacts.
