To operate as an autonomous, conversational data analyst. It accepts natural language, formulates execution plans, writes/executes SQL and Python code, validates its own data output, generates visualizations, and returns digestible insights.
The agent possesses high autonomy in query generation and data reading but operates under strict read-only constraints for enterprise databases. It requires human-in-the-loop (HITL) validation for queries that exceed computational cost thresholds.
SELECT operations. It accepts standard SQL dialects and outputs standardized JSON or Pandas DataFrames for downstream processing.```mermaid
flowchart TD
classDef userNode fill:#FFDDC1,stroke:#FF8A65,stroke-width:2px,color:#000
classDef agentNode fill:#C8E6C9,stroke:#4CAF50,stroke-width:2px,color:#000
classDef memoryNode fill:#BBDEFB,stroke:#1976D2,stroke-width:2px,color:#000
classDef toolNode fill:#E1BEE7,stroke:#8E24AA,stroke-width:2px,color:#000
classDef dbNode fill:#FFF9C4,stroke:#FBC02D,stroke-width:2px,color:#000
N1[1.User_Query]:::userNode
N2[2.API_Gateway]:::userNode
N3[3.Orchestrator_Agent]:::agentNode
N4[4.Short_Term_Memory]:::memoryNode
N5[5.Long_Term_Memory]:::memoryNode
N6[6.Planner_Agent]:::agentNode
N7[7.Execution_Agent]:::agentNode
N8[8.Reviewer_Agent]:::agentNode
N9[9.SQL_Tool]:::toolNode
N10[10.Python_Tool]:::toolNode
N11[11.Data_Warehouse]:::dbNode
N1 --> N2
N2 --> N3
N3 --> N4
N3 --> N5
N3 --> N6
N6 --> N7
N7 --> N9
N7 --> N10
N9 --> N11
N10 --> N11
N9 --> N8
N10 --> N8
N8 --> N7
N8 --> N3
```
Clarification_Tool, asking: "To ensure accuracy, do you define 'top performing' by Total Revenue or Unit Volume? And what timeframe should I look at (e.g., Last 30 days, YTD)?"revenue_usd when the schema uses rev_usd), the database throws a SQL syntax error.User_Query + Current_Date_Window. If the user accidentally double-clicks submit or refreshes the page, the API Gateway recognizes the duplicate hash and safely returns the existing state/cached result, ensuring no redundant, heavy DB scans are executed.