Skip to content

Data Analyst Copilot with SQL Tool Calling

A NL-to-analytics agent that plans queries, calls a governed SQL tool, validates results, and returns cited charts.

LangGraphOpenAI APIPostgreSQLTool Calling
Abstract charcoal and magenta cover illustration for the Data Analyst Copilot project, showing a query-planning graph over a magenta chart lattice.

Highlights

  • Schema-aware planning with column lineage and PII masking.
  • SQL execution behind a governed tool with row and cost limits.
  • Auto-generated charts and commentary with citation to source rows.

Outcomes

  • Cut ad-hoc analytics turnaround from days to minutes for business teams.
  • Reduced data-team ticket volume by 46% in the first quarter.

Stack

  • LangGraph
  • OpenAI API
  • FastAPI
  • PostgreSQL
  • Redis