How to Summarize YouTube Videos with Codex

Codex CLI handles code well. But coding work often involves video content — framework tutorials, recorded architecture discussions, conference talks on patterns you’re implementing. Summarizing those videos normally requires leaving the terminal entirely. With AgentPatch connected, Codex can pull the transcript and give you a summary on the spot.

Why This Matters

A lot of technical knowledge lives on YouTube in a format that’s hard to work with: you have to watch it linearly, you can’t search it, and you can’t paste it into your session. But most YouTube videos have transcripts, and once you have the text, an agent can work with it just like any other document.

Connecting AgentPatch gives Codex access to the YouTube Transcript tool. You give it a URL, it returns the full transcript with timestamps, and Codex can summarize it, extract specific claims, or use the content to inform what it’s building.

Setup

The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.

Install (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Example commands your agent will use:

ap search "web search"
ap run google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Add AgentPatch to ~/.codex/config.toml:

[mcp_servers.agentpatch]
url = "https://agentpatch.ai/mcp"
bearer_token_env_var = "AGENTPATCH_API_KEY"

Then set your API key:

export AGENTPATCH_API_KEY=your_api_key

Replace your_api_key with your actual key from the AgentPatch dashboard. Codex discovers all AgentPatch tools automatically on next start.

Example

You want the key points from a 20-minute YouTube video without watching the whole thing. You tell Codex:

“Summarize this video for me: https://www.youtube.com/watch?v=EKBIni-eB1A

Codex fetches the transcript through AgentPatch and returns a summary like this:

“Lazy Potatoes” — Growing Potatoes With No Hilling or Top Dressing

The grower planted potatoes in a 10ft x 4ft raised bed using a “set it and forget it” approach — no hilling, no mid-season fertilizer. He dug 3 rows 16 inches apart, planted seed potatoes 4–5 inches deep, added a light dusting of organic fertilizer at planting, and walked away.

The plants grew aggressively — by day 42 they were so dense they acted as living mulch. But without hilling, plants flopped over and leaves turned pale from lack of additional fertilizer during tuber development.

Final harvest: ~60 lbs from 40 sq ft (1.5 lbs per square foot). He estimates hilling and top dressing could have pushed the yield to ~80 lbs (2 lbs/sq ft) — a 33% increase with relatively little extra effort.

You can follow up with questions about specific parts of the video, and Codex pulls the relevant passage with timestamps so you can verify it directly.

Wrapping Up

Once AgentPatch is connected to Codex, you get the YouTube Transcript tool plus the full marketplace — web search, email, image generation, and more. One configuration, persistent access. Visit agentpatch.ai to see what’s available.