Building a Video Research Tool with Codex
Codex CLI is useful for coding tasks, but technical research often leads to video content — a library walkthrough, a recorded architecture talk, an API tutorial on YouTube. Pulling useful information out of those videos usually means watching them. With AgentPatch connected, Codex can fetch transcripts and work with that content directly in your terminal session.
Why This Matters
Video is a poor format for information retrieval. You can’t ctrl-F a YouTube video. You can’t ask a question and jump to the answer. But most YouTube videos have transcripts, and once you have the transcript as text, an agent can do a lot with it.
When Codex has access to the AgentPatch YouTube Transcript tool, it can fetch a video’s full transcript — with timestamps — and use that content to answer questions, extract quotes, write summaries, or inform the code it’s working on. The research happens inside your session, not in a separate browser tab.
Setup
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’re implementing a feature and there’s a well-known conference talk that covers exactly the pattern you’re trying to use. You ask Codex:
“Fetch the transcript from this talk and find where they explain the event-sourcing pattern: https://youtube.com/watch?v=example123”
Codex calls the YouTube Transcript tool through AgentPatch, retrieves the transcript, and locates the relevant explanation. You get the quote and the timestamp without leaving your session.
For broader research, you can hand Codex multiple videos:
“Here are three videos on this API design approach. Fetch all three transcripts and give me a breakdown of the key points from each.”
Codex handles the fetching and the synthesis. You get structured output you can work from, not a list of videos to watch later.
This also works well when you’re writing technical documentation that references existing content:
“Summarize this video tutorial into a short ‘see also’ blurb for our docs page.”
Wrapping Up
Connecting AgentPatch to Codex gives you the YouTube Transcript tool plus the rest of the marketplace — web search, email, image generation, and more — through one configuration. Visit agentpatch.ai to see everything available.