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.
...
from langgraph.types import Send
...
class DemoEnrichmentAgent:
...
async def spawn_workers(self, state: AgentState):
extracted_entities = state["extracted_entities"]
# spawn a worker to verify each extracted entity
return [
Send("get_verified_entity_worker", {"named_entity": ne})
for ne in extracted_entities.named_entities
]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment