Skip to main content

dbt_cortex_agent

dbt_cortex_agent 0.0.6 is a Snowflake-only dbt package and Python companion for defining, versioning, and evaluating Cortex Agents from dbt models. A materialized='cortex_agent' model body is the native Agent YAML specification. dbt owns the complete Agent lifecycle; Python is limited to local skill files, runtime smoke, and evaluation coordination.

Install one immutable version on two surfaces

Install the Python companion from PyPI:

pipx install 'dbt-cortex-agent[runtime]==0.0.6'

For a managed Python environment, use:

python -m pip install 'dbt-cortex-agent[runtime]==0.0.6'

dbt does not install packages from PyPI. Pin the dbt package separately to the public HTTPS v0.0.6 Git tag in packages.yml:

packages:
  - git: "https://github.com/Jeremy-Demlow/dbt-cortex-agent.git"
    revision: v0.0.6

PyPI version 0.0.6 and Git tag v0.0.6 identify the same immutable release across the CLI and dbt surfaces. Run dbt deps, then dbt-cortex-agent doctor --project-dir . --json; doctor verifies that the CLI, declared dbt dependency, and installed consumer dbt package versions align. A full immutable Git SHA is accepted only when actual installed package metadata under dbt_packages/dbt_cortex_agent reports the matching version; a source checkout's root dbt_project.yml is not installation evidence. The supported runtime is Python >=3.10,<4, dbt >=1.10,<2.0, and dbt-snowflake; see compatibility and installation.

The CLI also requires the Snowflake CLI (snow) on PATH; doctor checks both the dbt and snow executables. By default, dbt-cortex-agent init configures an existing dbt project by appending missing dependency and safety-variable entries. It does not create a dbt project. Use agent scaffold to preview and create a generic Agent model; a Semantic View and evaluation are optional.

For the fixed synthetic tutorial, preview the package-owned Orders starter in an existing dbt project:

dbt-cortex-agent init --project-dir . --starter orders \
  --package-source https://github.com/Jeremy-Demlow/dbt-cortex-agent.git --json

The preview reports the exact seed, semantic-view, Agent, optional eval, dependency, and .dbtignore actions without writing. After review, add --apply. The command validates every destination before writing, keeps identical files unchanged, and fails closed if any generated file already has different content. It has no force mode and is not a generic project or Agent wizard.

Five-minute non-mutating quickstart

From a consumer dbt project, preview a generic Agent before local writes:

dbt-cortex-agent agent scaffold --project-dir . --agent orders_assistant --json
dbt-cortex-agent doctor --project-dir . --target sandbox --json
dbt-cortex-agent manifest validate --project-dir . --target sandbox --json
dbt compile --select orders_assistant

These commands do not mutate Snowflake. dbt compile renders and validates the full Agent body without invoking its materialization. Follow the quickstart to create the metadata and bootstrap explicit allowlists.

For Cortex Code-guided adoption, use the project-local dbt-cortex-agent-project skill. It discovers an existing dbt project, establishes objective/levers/data/proof, and guides an existing semantic view, the fixed Orders starter, or an existing Agent into dbt-owned metadata. It is script-free, shows manual 0.0.6 command parity, and stops separately before local writes, Snowflake mutation/runtime, paid evaluation, and baseline movement. The checked-in skill is not a claim of catalog publication or live Snowflake verification.

Controlled deploy

Deploy selected Agents and their declared skills through one package workflow:

dbt-cortex-agent agent deploy --project-dir . --target sandbox \
  --agent orders_assistant --connection sandbox --database ANALYTICS_DEV \
  --allow-target sandbox --allow-database ANALYTICS_DEV --apply

The model relation determines the physical Agent FQN. The model body is passed directly to the materialization, which validates explicit orchestration, checks staged skills, updates LIVE, commits immutable VERSION$N, and reconciles the configured alias. The package preflights and uploads selected skills before it invokes the dbt dependency closure. dbt remains the sole Agent DDL authority. No Makefile or copied adopter Python script is required.

A target-resolved manifest may contain Agents in multiple approved databases. The package carries each selected Agent's complete database.schema.object identity through skill and runtime operations and validates every Agent, stage, eval table, evaluation stage, and result database against repeatable allowlists.

one dbt target manifest
  +-- FINANCE.AGENTS.FINANCE_ANALYST
  +-- MARKETING.AGENTS.CAMPAIGN_ANALYST
  +-- AI_FOCUS.AGENTS.ENTERPRISE_ASSISTANT

selected resource FQN -> allowlist validation -> bounded operation

One package invocation consumes one dbt target and its fresh manifest. Parsing and coordinating several dbt targets belongs to adopter CI, where each target has a separately reviewed role, warehouse, and approval boundary. Read lifecycle and Snowflake setup before crossing this boundary.

CLI or dbt macros

Need Shipped CLI Public dbt macro
Diagnose a project doctor
Scaffold an Agent agent scaffold
Validate resolved metadata manifest validate
Render the full Agent spec dbt compile --select <agent_model>
Deploy/version an Agent agent deploy dbt build --select <agent_model>
Preview/invoke any Agent agent smoke
Inspect/promote/rollback versions agent versions, agent promote, agent rollback lifecycle macros
Retire an Agent agent drop cortex_agent__drop
Plan/upload/smoke skills skill plan/upload/smoke deploy validates staged skills
Render/run optional evaluation eval run, eval verify cortex_eval__execution_plan, cortex_eval__run
Compare/gate/accept artifacts eval compare/gate/accept-baseline threshold macros only

Use dbt for Agent render and deployment. Use Python when local file upload, stable process exits/JSON, connector clients, or durable evaluation artifacts are required. Python owns no Agent lifecycle operation and provisions no stage.

Lifecycle and evaluation

The materialization validates and hashes the rendered spec plus staged skills, skips unchanged managed versions independently of serving DEFAULT, commits an immutable version only when content changes, and applies the requested alias. Promotion, rollback, guarded retirement, grants, MCP attachment, and skill smoke remain explicit operations.

Evaluation is optional and targets the same Agent selected by the model relation. eval run is a client for that already deployed Agent, a materialized eval table, and an evaluation stage; --apply incurs Cortex spend. It never deploys or changes an Agent. It writes candidate JSON with plan identity, ordered ground-truth refs, policy, and pre/post DEFAULT provenance for threshold and accepted-baseline gates. See evaluations.

For a complete evaluation workflow, eval verify materializes and tests the selected eval model, executes native evaluation, consumes the exact candidate, and applies intrinsic thresholds or an established baseline. Preview is free; --apply is paid. Baseline acceptance remains a separate explicit command.

Documentation

Limitations and policies

  • Snowflake and dbt Core with dbt-snowflake are the release authority; DuckDB is unsupported and Fusion is advisory.
  • dbt build --select <agent_model> deploys model Agents; dbt compile is the non-mutating preview.
  • Property YAML may use target, var, and env_var, but cannot call package macros.
  • Skills and MCP connectors are excluded from built-in native Agent Evaluation and require separate smoke/integration proof.
  • Live mutation, runtime smoke, and evaluation spend are never default operations.
  • This independent, maintainer-led package is not sponsored, endorsed, supported, or maintained by Snowflake Inc.

Apache License 2.0. See LICENSE, contributing, security, support, and Code of Conduct.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_cortex_agent-0.0.6.tar.gz (129.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_cortex_agent-0.0.6-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

Details for the file dbt_cortex_agent-0.0.6.tar.gz.

File metadata

  • Download URL: dbt_cortex_agent-0.0.6.tar.gz
  • Upload date:
  • Size: 129.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dbt_cortex_agent-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e716f3185ac06f3d03d7432cdcec12bfa2f49f778b891adbadf1753f1993e70b
MD5 e7a3e210e8481a7a56d45b5e8fb888dd
BLAKE2b-256 b6011bac8227845d46a9a0f32bc596f64351a5e96e09ceb980fe009bee008733

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_cortex_agent-0.0.6.tar.gz:

Publisher: release.yml on Jeremy-Demlow/dbt-cortex-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbt_cortex_agent-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_cortex_agent-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c66e902ffeaaaa855cb55e45a909c179d72a4f0ebbf325d178dea631344801c9
MD5 eab9f4f41754c6cdb67fecaa5dbcdbc8
BLAKE2b-256 598b32636c63d01a2f9195bb177059dde8c32704baa27c1c740062f8fb1f50cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_cortex_agent-0.0.6-py3-none-any.whl:

Publisher: release.yml on Jeremy-Demlow/dbt-cortex-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.8

2 files

0.0.7

2 files

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page