🔙
SQL Data Analysis with AI Agents
Summary:
This project demonstrates an advanced ETL and data analysis pipeline built within n8n, leveraging multiple AI agents (powered by Claude Sonnet 3.5 and Claude Haiku 3.5) to transform natural language queries into actionable SQL data analysis and visual insights. The system intelligently orchestrates data retrieval, analysis, chart generation, and response delivery, showcasing a powerful application of AI in automating complex data workflows.
Â
How it Works:
The system appears to be structured into two main interconnected workflows:
Data Analysis Orchestrator:
- A "Chat Trigger" receives a user's natural language query.
- The main "Orchestration Agent" (Claude Sonnet 3.5) interprets the request, uses "Window Buffer Memory" for context, and delegates tasks like "Retrieve Data" (implying AI-driven SQL generation) and "Generate chart" to a specialized tool/sub-workflow.
Data Retriever and Visualization Agent as Tool (Sub-Workflow):
- Triggered by the orchestrator, a "Switch" node routes tasks.
- A Data Retrieval component translates requests to SQL, queries a database (e.g., NocoDB), and fetches data.
- The Visualization Agent (Claude Haiku 3.5) then processes this data, generates charts (e.g., via QuickChart), and uses a "Structured Output Parser" to format results before sending back insights.
Key Features & Capabilities Demonstrated:
- AI-Driven Analysis: Leverages Natural Language Processing (NLP) for user queries and implies AI-powered SQL generation for database interaction.
- Multi-Agent System: Employs an orchestrator agent that intelligently delegates tasks to specialized agents for data retrieval and visualization.
- Dynamic Data Visualization: Automatically generates charts and visual insights from the analyzed data.
- End-to-End Automation: Provides a seamless, automated pipeline from natural language query to visual data-driven response.
- Contextual & Structured: Maintains conversation context using memory and ensures usable outputs with structured parsing.
Technologies Used:
- Core Automation: n8n
- AI Models: Claude Sonnet 3.5, Claude Haiku 3.5 (via Vertex AI or similar)
- Data Stack: SQL Database (e.g., NocoDB), Charting Service (e.g., QuickChart)
- User Interface: Chat Platform (e.g., Telegram)