Skip to main content

Overview

This workflow combines web crawling, search engines, Wikipedia, and competitor analysis to create detailed supplier profiles. It processes company information through 4 specialized agents running in parallel, then generates a structured markdown report and sends it via email. The workflow uses workflow session state management to cache analysis results. If the same supplier is analyzed again, it returns cached results instead of re-running the expensive analysis pipeline.

Getting Started

Prerequisites

Quick Setup

Install dependencies

Code Structure

This company description workflow consists of three main files:

1. Agents (agents.py)

Specialized agents for gathering information from multiple sources:
agents.py

2. Prompts (prompts.py)

Detailed instructions for each specialized agent:
prompts.py

3. Workflow Implementation (run_workflow.py)

Complete workflow with parallel information gathering and email delivery:
run_workflow.py

Key Features

  • 🔄 Parallel Processing: Four agents gather information simultaneously for maximum efficiency
  • 🌐 Multi-Source Data: Combines web crawling, search engines, Wikipedia, and competitor analysis
  • 📧 Email Integration: Automatically sends formatted reports via email using Resend
  • 📄 Markdown Formatting: Generates structured, readable reports in HTML format
  • 🏗️ Modular Design: Clean separation of agents, prompts, and workflow logic
  • ⚡ Efficient Execution: Uses parallel steps to minimize execution time
  • 🎯 Type Safety: Pydantic models for structured data validation

Usage Example

Expected Output

The workflow will:
  1. Gather Information: Simultaneously crawl the website, search the web, check Wikipedia, and find competitors
  2. Generate Profile: Create a comprehensive supplier profile with detailed sections
  3. Send Email: Deliver the formatted HTML report to the specified email address
The generated supplier profile includes:
  • Company overview and basic information
  • Detailed analysis from multiple data sources
  • Structured markdown formatting for readability
  • Professional email delivery with HTML formatting
Run the workflow with:
More Examples: