Building a multi-agent pipeline for NL-to-SQL analytics
Original URL: https://techblog.lycorp.co.jp/en/building-a-multi-agent-pipeline-for-nl-to-sql-analytics
Article Written: January 5, 2026
Added: January 21, 2026
Type: project
Summary
This article discusses the development of a multi-agent architecture for a natural language to SQL (NL-to-SQL) analytics system. It highlights the limitations of a monolithic MCP-based system and presents a new A2A (agent-to-agent) pipeline that improves stability, scalability, and error isolation. The article details the roles of specialized agents in the pipeline and how they collaborate to convert user queries into accurate SQL. Additionally, it emphasizes the importance of a structured data mart for efficient analytics execution.
💠Your Thoughts
Good sharing, learned some tips! thanks! One thing, i think "Dialogue agent " is quiet important, there is another case to handle "follow up analytic questions", in this case, we need send all the previous query result to LLM plus users comment or questions, then let LLM decide new query or explain.