Skip to content

feat(agent): Add data analysis multi-agent application.​​#2897

Merged
Aries-ckt merged 8 commits into
eosphoros-ai:mainfrom
Hikomorebi:feat_data_analysis
Oct 31, 2025
Merged

feat(agent): Add data analysis multi-agent application.​​#2897
Aries-ckt merged 8 commits into
eosphoros-ai:mainfrom
Hikomorebi:feat_data_analysis

Conversation

@Hikomorebi
Copy link
Copy Markdown
Contributor

@Hikomorebi Hikomorebi commented Sep 28, 2025

Description

This PR introduces a complete data analysis multi-agent framework for DB-GPT, including anomaly detection, volatility analysis, and automated report generation capabilities. The framework enables users to perform complex data analysis tasks through coordinated intelligent agents.

Key Features Added

  1. Data Analysis Planner Agent: A specialized planner agent designed for data analysis tasks with customized constraints and examples.

  2. Five Specialized Agents:

    • MetricInfoRetriever: Retrieves metric information from knowledge bases
    • AnomalyDetector: Detects anomalies by comparing baseline and current period data
    • VolatilityAnalyzer: Performs attribution analysis to identify root causes of metric anomalies
    • ReportGenerator: Integrates all analysis results into structured Markdown reports
    • DataScientist: Existing agent enhanced to support the new framework
  3. Visualization Components: New visualization tags for anomaly detection, volatility analysis, and report generation.

  4. Comprehensive Documentation: Detailed cookbook guide with step-by-step instructions, including:

    • Project deployment and environment setup
    • Dataset preparation with MySQL database schema
    • Knowledge base configuration
    • Application creation and usage instructions
    • Screenshots for visual guidance

Implementation Details

  • Added new action classes for each specialized agent with proper input validation and error handling
  • Implemented visualization protocols for consistent output formatting
  • Enhanced the base agent to support report generation
  • Created detailed documentation with practical examples using the Superstore dataset

How Has This Been Tested?

The framework has been tested with the Superstore dataset, demonstrating the complete workflow from data preparation to report generation. The multi-agent system successfully:

  1. Retrieves metric information from knowledge bases
  2. Detects anomalies in business metrics
  3. Performs attribution analysis for identified anomalies
  4. Generates comprehensive analysis reports

Manual testing was performed following the documented steps in the cookbook guide.

Snapshots

default.mp4

结果展示

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions Bot added the enhancement New feature or request label Sep 28, 2025
@Aries-ckt
Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

@Hikomorebi Hikomorebi changed the title feat: Add data analysis multi-agent framework with comprehensive documentation feat(Agent): Add data analysis multi-agent framework with comprehensive documentation Sep 30, 2025
@Hikomorebi Hikomorebi changed the title feat(Agent): Add data analysis multi-agent framework with comprehensive documentation feat(agent): Add data analysis multi-agent framework with comprehensive documentation Sep 30, 2025
@github-actions github-actions Bot added the agent Module: agent label Sep 30, 2025
@Hikomorebi Hikomorebi changed the title feat(agent): Add data analysis multi-agent framework with comprehensive documentation feat(agent): Add data analysis multi-agent application.​​ Sep 30, 2025
Comment thread packages/dbgpt-core/src/dbgpt/agent/expand/data_scientist_agent.py Outdated
Copy link
Copy Markdown
Collaborator

@chenliang15405 chenliang15405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@Aries-ckt Aries-ckt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aries-ckt Aries-ckt merged commit 1f3daf8 into eosphoros-ai:main Oct 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Module: agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants