Cortex Agents + dbt Template
Trustworthy pipelines for AI agents. How to manage the full Cortex Agent lifecycle (semantic views, agent specs, evaluations, and scheduling) as version-controlled, tested, reproducible code with dbt Projects on Snowflake.
Why agents-as-code
An AI agent is only as trustworthy as the data and the process behind it. Yet most agents are assembled by click-ops in a UI: no version history, no peer review, no tests, and no reliable way to promote the same thing from dev to prod. When the agent gives a wrong answer, there is nothing to diff and nothing to roll back.
The problem: click-ops agents
- No version control: changes live only in the UI
- No peer review: nobody signs off before prod
- No tests: accuracy is a vibe, not a metric
- No reproducibility: dev and prod drift apart
- No promotion path: rebuilding by hand per environment
The fix: agents as code
- Git-backed: every change diffed and reviewable
- PR review + CI: builds on dev before merge
- Measured: evaluations gate on ≥95% correctness
- One codebase:
env.ymltargets dev / staging / prod - One command:
EXECUTE DBT PROJECTrebuilds it all
What the template delivers
EXECUTE DBT PROJECT to rebuildThe lifecycle, at a glance
Deep dives
About this template
Built from the cortex-agents-dbt-project-template (see dbt Projects on Snowflake). The walkthrough mirrors the project's WORKING-SESSION.md runbook; the reference pages draw on its README.md best practices.