Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

airflow.providers.snowflake.operators.snowflake_cortex_agent

Classes

SnowflakeCortexAgentOperator

Execute a Snowflake Cortex Agent.

Module Contents

class airflow.providers.snowflake.operators.snowflake_cortex_agent.SnowflakeCortexAgentOperator(*, database, schema, agent_name, messages, thread_id=None, parent_message_id=None, tool_choice=None, models=None, instructions=None, orchestration=None, tools=None, tool_resources=None, timeout=600, snowflake_conn_id='snowflake_default', **kwargs)[source]

Bases: airflow.providers.common.compat.sdk.BaseOperator

Execute a Snowflake Cortex Agent.

Parameters:
  • database (str) – Database containing the Cortex Agent.

  • schema (str) – Schema containing the Cortex Agent.

  • agent_name (str) – Name of the Cortex Agent.

  • messages (list[dict[str, Any]]) – Conversation messages to send to the agent.

  • thread_id (int | None) – Existing conversation thread identifier. Optional. Defaults to None.

  • parent_message_id (int | None) – Parent message identifier within the specified thread. Required when thread_id is provided. Defaults to None.

  • tool_choice (dict[str, Any] | None) – Tool selection configuration. Optional. Defaults to None.

  • models (dict[str, Any] | None) – Model configuration. Optional. Defaults to None.

  • instructions (dict[str, Any] | None) – Agent instruction overrides. Optional. Defaults to None.

  • orchestration (dict[str, Any] | None) – Orchestration configuration. Optional. Defaults to None.

  • tools (list[dict[str, Any]] | None) – Additional tools available to the agent. Optional. Defaults to None.

  • tool_resources (dict[str, Any] | None) – Configuration for tools specified in tools. Optional. Defaults to None.

  • timeout (int | None) – Maximum time in seconds to wait for the request to complete. Defaults to 600.

  • snowflake_conn_id (str) – Snowflake connection ID. Defaults to snowflake_default.

template_fields: collections.abc.Sequence[str] = ('database', 'schema', 'agent_name', 'messages')[source]
template_fields_renderers[source]
ui_color = '#29B5E8'[source]
database[source]
schema[source]
agent_name[source]
messages[source]
thread_id = None[source]
parent_message_id = None[source]
tool_choice = None[source]
models = None[source]
instructions = None[source]
orchestration = None[source]
tools = None[source]
tool_resources = None[source]
timeout = 600[source]
snowflake_conn_id = 'snowflake_default'[source]
property hook: airflow.providers.snowflake.hooks.snowflake_cortex_agent.SnowflakeCortexAgentHook[source]

Return the Snowflake Cortex Agent hook.

execute(context)[source]

Execute the Snowflake Cortex Agent.

Was this entry helpful?