# Agents Are Code Too: What I Learned Shipping a Cortex Agent Through Azure DevOps

DevFeed: [Agents Are Code Too: What I Learned Shipping a Cortex Agent Through Azure DevOps](<https://devfeed.tech/articles/agents-are-code-too-what-i-learned-shipping-a-cortex-agent-through-azure-devops-129094.md>)

Original publisher: [Read original article](<https://medium.com/snowflake/agents-are-code-too-what-i-learned-shipping-a-cortex-agent-through-azure-devops-fab3adae29e8?source=rss----34b6daafc07---4>)

Author: Sanket Prabhu

Published: 2026-11-11T15:01:07Z

Content type: article

Language: en

Sources: [Snowflake Builders](<https://devfeed.tech/sources/snowflake-builders.md>)

Topics: [Azure DevOps](<https://devfeed.tech/topics/azure-devops.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [CI/CD Pipeline](<https://devfeed.tech/topics/ci-cd-pipeline.md>), [DevOps](<https://devfeed.tech/topics/devops.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [analyst](<https://devfeed.tech/tags/analyst.md>), [azure-devops](<https://devfeed.tech/tags/azure-devops.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [ci-cd-pipeline](<https://devfeed.tech/tags/ci-cd-pipeline.md>), [code](<https://devfeed.tech/tags/code.md>), [config](<https://devfeed.tech/tags/config.md>), [cortex](<https://devfeed.tech/tags/cortex.md>), [cortex-agent](<https://devfeed.tech/tags/cortex-agent.md>), [data](<https://devfeed.tech/tags/data.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [data-platforms](<https://devfeed.tech/tags/data-platforms.md>), [dev](<https://devfeed.tech/tags/dev.md>), [domain](<https://devfeed.tech/tags/domain.md>), [environment](<https://devfeed.tech/tags/environment.md>), [finance](<https://devfeed.tech/tags/finance.md>), [git](<https://devfeed.tech/tags/git.md>), [instructions](<https://devfeed.tech/tags/instructions.md>), [orchestration](<https://devfeed.tech/tags/orchestration.md>), [orchestrator](<https://devfeed.tech/tags/orchestrator.md>), [platform](<https://devfeed.tech/tags/platform.md>), [snowflake-cortex](<https://devfeed.tech/tags/snowflake-cortex.md>)

## AI overview

The main production challenge was safely promoting a finance Cortex Agent across sbx, dev, uat and prod; the author treats the agent as code managed through the existing Azure DevOps path. Store its YAML specification, semantic view, Cortex Search service, grants and evaluation questions in one repo. Use CREATE AGENT ... FROM SPECIFICATION with one environment variable for the target database; COPY GRANTS with OR REPLACE to preserve grants. Deploy the semantic view first, then search, agent and grants in the same release, with least-privilege deployment credentials and approval gates for uat and prod. A successful CREATE AGENT does not ensure runtime behavior: run fixed domain questions after each deployment, checking expected answers and whether questions route to Analyst or Search. The article also describes a Snowflake developer guide that evaluates semantic-view SQL against verified queries and agent answer correctness and tool-selection accuracy; check account release status before relying on agent evaluations and versioning. Grants must cover the agent, search service and objects behind the semantic view.

## Source excerpt

Building the agent took a week. Getting it safely from sandbox to production took longer, and taught me more. Most Cortex Agent content I read ends at the same place: a working demo in Snowsight, a clever question, a correct answer. That is where my real work started. In my recent project, I built a Cortex Agent for the finance domain. The agent itself came together quickly. What took real thought was the part nobody demos: moving it through sbx, dev, uat and prod with the same discipline we already applied to every other Snowflake object on the platform. After roughly a decade of building data platforms, I've learned to be suspicious of anything that only exists in one environment. So here is what I learned treating an agent like code, and what I'd do the same way again. An agent you can't rebuild from Git is a prototype, no matter how good its answers are.1. The myth: "An agent is just a config in the UI" It's easy to see a Cortex Agent as a few settings in a form: pick a semantic view, add a search service, write some instructions, done. But look at what actually decides whether the agent gives a good answer: Tool descriptions that tell the orchestrator when to use which tool Orchestration and response instructions The semantic view behind Cortex Analyst, including its verified queries The Cortex Search service and the columns it exposes Grants that decide who can call the agent and what it can reach Every one of these is a behavior change. If someone edits a tool description in prod by hand, the agent can start routing questions differently, and you have no diff, no review and no way back. On our platform, warehouses, roles, schemas and grants were already managed through Terraform and Azure DevOps. It didn't make sense for the agent to be the one thing people clicked together. So where does an agent actually live, if not in the UI? 2. Everything the agent needs goes in the repo The good news is that Snowflake gives you a clean way to express an agent as code. C