Sales Forecasting Agent
Agent Description:
The Sales Forecasting Agent is an AI-powered system responsible for extracting, analyzing, and interpreting sales data to generate accurate forecasts and actionable business insights. It works with structured data from sales reports, marketing campaigns, and external trends to uncover patterns, highlight key insights, and support strategic planning. By combining historical performance and contextual drivers, the agent enables businesses to make data-backed decisions.
- Purpose: To forecast future sales and generate actionable business insights by analyzing historical sales data and associated drivers.
- Components:
- Extraction and structuring of sales and marketing data from PDF reports.
- Computation of key sales metrics and performance indicators.
- Natural-language-driven insights generation and question answering.
- Parsing sales PDFs into structured datasets.
- Analyzing monthly and quarterly sales aggregates.
- Identifying trends such as peak seasons, high-performing or underperforming products.
- Highlighting the impact of marketing events or external factors on sales.
- Responding to business queries like best-sellers, revenue dips, or growth trends.
- Google VertexNote: To learn more about the LLM and to modify its behavior, refer to the Configuring LLM settings section.
Sub-Agents
1. Sales Data Extractor
- Role:Data Extractor.
- Scope:Processes the sales_forecasting.pdf file, extracts tables, cleans the data, and structures it into three core tables: Sales Data, Marketing Events, and External Trends.
- Description: This sub-agent performs the initial data extraction and
preparation tasks:
-
Converts embedded tables from PDF to a structured format.
-
Computes aggregates like total revenue and units sold per product/category (monthly/quarterly).
-
Detects trends, seasonal peaks, outliers, and anomalies.
-
Passes structured data and basic analytics to the next sub-agent.
-
- LLM Used: Google Vertex (inherits from parent).
- Tool Used: MCP Client Tool
2. Sales Insights Responder
- Role:Insights Responder.
- Scope:Uses the cleaned and analyzed dataset to handle natural language queries and generate business insights.
- Description: This sub-agent acts as a conversational insights
generator. It:
-
Accepts the structured output from the Sales Data Extractor.
-
Responds to questions like:
-
Which product had the highest sales in Q3 2021?
-
When did revenue peak for the iPhone 13?
-
List products with declining sales trends.
-
-
Generates insights, comparisons, summary metrics, and chart-style outputs.
-
Highlights the influence of campaigns or economic events where applicable.
-
- LLM Used: Google Vertex (inherits from parent).
- MCP Client Tool : Used by the Sales Data Extractor to process and extract structured data from PDF files.
- The Sales Data Extractor opens the uploaded sales_forecasting.pdf, converts embedded tables into structured formats, and organizes them into three tables: Sales Data, Marketing Events, and External Trends.
- It computes relevant metrics such as monthly and quarterly revenue, units sold per product, and highlights any data anomalies or patterns.
- The structured data and basic analytics are passed to the Sales Insights Responder.
- The Sales Insights Responder receives this data and handles user queries in natural language.
- It generates clear, insightful responses that may include top performers, sales peaks, trends, campaign impact summaries, and comparisons like YoY growth. Visual summaries (if supported) are included where applicable.
- Generate the sales forecast for the next fiscal quarter.