Architecting a data analyst agent for governed data exploration
Business users asked very different questions in plain language. Some needed a SQL query, some needed Python analysis, some needed a chart. A single prompt-to-answer path could not handle all of them consistently or safely.
I architected the Data Analyst agent inside a supervisor-led multi-agent pilot built on LangGraph. Every request runs through the same five stages:
- Classify intentDecide what kind of answer the question needs.
- RouteSend it to a dedicated workflow.
- SQL
- Python
- Chart
- GroundUse approved metrics and dimensions from a governed semantic layer.
- ValidateCheck generated queries before anything runs.
- Execute in isolationRun SQL, Python and charts in containers.
Internal data, prompts and code stay private.



