Skip to content

Instantly share code, notes, and snippets.

@CodeWithOz
Last active August 26, 2025 22:34
Show Gist options
  • Select an option

  • Save CodeWithOz/0b01d558adac703673aceca48471dca7 to your computer and use it in GitHub Desktop.

Select an option

Save CodeWithOz/0b01d558adac703673aceca48471dca7 to your computer and use it in GitHub Desktop.
Agent for cleaning up named entities in YouTube video transcripts.
...
class DemoEnrichmentAgent:
...
async def start(self, transcript_text: str):
print("Invoking agent")
resp = await self.graph.ainvoke({ "transcript_text": transcript_text })
print(f"Agent response: {resp}")
if __name__ == "__main__":
import asyncio
from dotenv import load_dotenv
load_dotenv()
enrichment_agent = DemoEnrichmentAgent()
vid_transcript = "Hollywood director Kristoffer Nolen has announced his next big project, rumored to be another complex sci-fi thriller. Fans of Nolen’s earlier work are eager to see if this film will rival the success of ‘Inceptshun’ or ‘Dunkrik.’"
asyncio.run(enrichment_agent.start(vid_transcript))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment