AI News Hub Logo

AI News Hub

Building an AI-Powered Pipeline Auditor with Snowflake's Cortex Code Agent SDK

DEV Community
Dash

TL;DR: I built an app that audits data pipelines using AI agent sessions. It analyzes tasks, dynamic tables, streams, pipes, and more -- then offers interactive fix suggestions. The Snowflake Cortex Code Agent SDK lets you spin up headless AI coding sessions programmatically. Think of it as embedding an AI pair programmer into your app via an API. I used it to build an automated auditor that scans a Snowflake schema and flags pipeline issues. How it works: User selects database, schema, and scope (tasks, dynamic tables, etc.) Frontend POSTs to Express backend, which creates a Cortex Code session with audit instructions Backend returns a job ID immediately Frontend polls GET endpoint every 2s until the agent finishes Agent runs SHOW commands, analyzes configs, and produces a structured report The Suggest Fix flow: Each finding in the report has a Suggest Fix button. Clicking it creates a NEW agent session scoped to that specific issue, with a chat interface for follow-up questions. Multi-turn conversation, not just a one-shot answer. Stack: Cortex Code CLI Cortex Code SDK React + TypeScript + MUI 7 (dark/light themes) Express + Cortex Code Agent SDK Snowflake for storage (audit schedules + results tables) Deployed to Snowpark Container Services (SPCS) Running it locally: git clone https://github.com/iamontheinet/awesome-pipeline-auditor-with-cortex-agents-sdk.git cd awesome-pipeline-auditor-with-cortex-agents-sdk npm install snow sql -c your-connection -f sql/setup.sql SNOW_CONNECTION=your-connection npm run dev Open localhost:5173 and you are all set. Demo video in the repo README. Repo: https://github.com/iamontheinet/awesome-pipeline-auditor-with-cortex-agents-sdk Cheers, Dash