What happens when you connect an AI agent directly to a dbt project? I built one using Google's Agent Development Kit (ADK) and the new dbt MCP server to find out. This isn't a production-ready solution, but a practical experiment in system design. The goal was to see how far current tooling could push autonomous analytics engineering.
The architecture hinges on three components: Google's Gemini model for reasoning, the ADK framework for orchestration, and dbt's MCP server as a safe interface to project metadata and commands. The dbt Fusion engine is the critical piece, enabling real-time SQL validation. This allows the agent to compile and check its work instantly, turning potential mistakes into immediate feedback loops instead of production risks.
I started by deploying the dbt MCP server locally, exposing tools for querying models, lineage, and run history. Then, using ADK's Python framework, I built an agent that registers these MCP tools. The ADK provides a local web interface for rapid testing, which significantly speeds up iteration compared to CLI-only workflows.
The experiment extended into multi-tool orchestration. One sub-agent handled local dbt compilation via Fusion, parsing JSON logs to validate syntax and dependencies before any warehouse execution. Another leveraged the MCP toolset for cloud platform operations. This separation of concerns—local validation versus metadata inspection—proved a necessary design pattern for managing complexity.
The result demonstrates a shift from AI as a code suggestion tool to a participant in the development lifecycle. With the guardrails of Fusion and the structured tool access of MCP, the agent could propose, validate, and iteratively correct data logic. For engineers, this points toward a new kind of interactive development environment where AI handles the initial scaffolding and systematic validation, allowing practitioners to focus on higher-order logic and design.
Source: dbt Labs Blog