Skip to main content

Overview

This example demonstrates the orchestrator-workers pattern, where a central AI agent dynamically breaks down complex tasks and delegates them to specialized worker agents. This pattern is particularly effective when tasks require multiple perspectives or parallel processing streams, with the orchestrator synthesizing the results into a cohesive output. Orchestrator

Example task

Our example task uses multiple LLM calls to extract claims from a news article and analyze them in parallel, combining source verification and historical context to assess their credibility. This task:
  • Uses generateText from Vercel’s AI SDK to interact with OpenAI models
  • Uses experimental_telemetry to provide LLM logs
  • Uses batch.triggerByTaskAndWait to orchestrate parallel processing of claims
  • Extracts factual claims from news articles using the o1-mini model
  • Evaluates claims against recent sources and analyzes historical context in parallel
  • Combines results into a structured analysis report

Run a test

On the Test page in the dashboard, select the news-fact-checker task and include a payload like the following:
This example payload verifies the claims in the news article and provides a report on the results.