Data Summarization and Insights Agent

Agent Description:

The Data Summarization and Insights Agent automatically connects to SQL databases to consolidate sales, pricing, and supply chain data. It cleans, merges, and analyzes the unified dataset to calculate key performance indicators (KPIs). The agent identifies top and bottom-performing products, competitor price gaps, and potential supply chain risks. Finally, it generates a concise report with actionable insights and summaries to support informed business decisions.

Purpose and Components
  • Purpose: To automate the consolidation of data from disparate business tables (sales, pricing, supply chain) and generate a single, high-level report with actionable insights on performance, market position, and operational risks.
  • Components:
    • SQL Data Integrator: An agent to connect, query, join, and clean data from multiple SQL tables.

    • KPI Analyst: An agent to perform calculations, identify trends, and generate insights from the cleaned data.

    • SQL Database Toolkit: A tool to interact with the (SQLite) database.

Supported Capabilities
  • Connecting to an SQL database and reading multiple tables (SalesData, CompetitorPricing, SupplyChainConditions).

  • Performing INNER JOINs on ProductID to create a unified dataset.

  • Cleaning and normalizing data (handling NULL values, converting date formats, standardizing categories).

  • Computing category-wise total revenue and average price.

  • Identifying the top 3 and bottom 3 performing products.

  • Calculating the price gap versus competitors (e.g., (Price - CompetitorPrice) / CompetitorPrice * 100).

  • Evaluating logistics performance, including average lead time per category and counting products with 'High' or 'Critical' delay risk.

  • Computing logistics reliability by analyzing the mean LogisticsScore.

  • Generating clear, narrative insights (e.g., "Smartphones contribute 48% of total revenue.").

  • Summarizing all findings into a final KPI summary table and a narrative text block.

LLM Used
  • GPT_4O_MINI

    Note: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.

Sub-Agents

1. SQL Data Reader

  • Role: Data Integrator

  • Scope: Connects securely to SQL database. Reads data from all three relational tables.

  • Description: This agent initiates the workflow by connecting to the SQL database. It reads and performs an INNER JOIN on the SalesData, CompetitorPricing, and SupplyChainConditions tables using ProductID. It then cleans and standardizes the merged data (handling NULLs, formatting dates) and passes the complete, unified dataset to the Insight Generator.

  • LLM Used: Default (Inherits from parent agent).

  • Tools Used: SQL - Toolkit

2. Insight Generator

  • Role: KPI Analyst

  • Scope: Analyzes merged SQL data from Subagent 1. Calculates KPIs (total revenue, average lead time, logistics reliability).

  • Description: This agent receives the merged dataset and performs all the core analysis. It computes KPIs, identifies top/bottom products, calculates competitor price gaps, and evaluates supply chain risks. It then synthesizes these findings into a final report, including a KPI summary table and a human-readable narrative.

  • LLM Used: Default (Inherits from parent agent).

  • Tools Used: None

Tools Used:
  • SQL - Toolkit (SQLite): Executes queries to read, join, and integrate data from the SalesData, CompetitorPricing, and SupplyChainConditions tables.

Note: For details on modifying the Tools, refer Tools Library section.
Agent Workflow Behavior Summary
  1. The SQL Data Reader (start node) uses the SQL - Toolkit to connect to the database.

  2. It queries and joins the three required tables (SalesData, CompetitorPricing, SupplyChainConditions) on ProductID.

  3. After cleaning and standardizing, it passes the single, merged dataset to the Insight Generator.

  4. The Insight Generator (end node) analyzes this data, calculates all specified KPIs (revenue, price gaps, logistics risk), and generates the final, human-readable summary report with key insights.

Sample Questions:
  • What are the top 3 best-selling products by revenue?

  • Show the price difference between our price and competitors’ for each product.