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

airflow.providers.microsoft.azure.operators.ai_agents

Classes

CreateAzureAIAgentOperator

Create an Azure AI Hosted agent version from a container image definition.

UpdateAzureAIAgentOperator

Create a new version of an existing Azure AI Hosted agent.

RunAzureAIAgentOperator

Invoke an Azure AI Hosted agent.

DeleteAzureAIAgentOperator

Delete an Azure AI Hosted agent or one Hosted agent version.

Module Contents

class airflow.providers.microsoft.azure.operators.ai_agents.CreateAzureAIAgentOperator(*, agent_name, definition, metadata=None, description=None, blueprint_reference=None, wait_for_completion=True, poll_interval=30.0, timeout=60 * 60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), azure_ai_agents_conn_id=AzureAIAgentsHook.default_conn_name, endpoint=None, api_version='v1', **kwargs)[source]

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

Create an Azure AI Hosted agent version from a container image definition.

Creating a version also creates the Hosted agent itself on first use.

Parameters:
  • agent_name (str) – Hosted agent name.

  • definition (dict[str, Any]) – Hosted agent definition. Include container_configuration.image with the Azure Container Registry image URI.

  • metadata (dict[str, str] | None) – Optional metadata attached to the Hosted agent. Default is None.

  • description (str | None) – Optional human-readable Hosted agent description. Default is None.

  • blueprint_reference (azure.ai.projects.models.AgentBlueprintReference | None) – Optional managed identity blueprint reference. Default is None.

  • wait_for_completion (bool) – Whether to wait until the created version reaches active. Default is True.

  • poll_interval (float) – Time in seconds between status checks. Default is 30.0.

  • timeout (float) – Time in seconds to wait for the version to become active. Default is 3600.

  • deferrable (bool) – Run in deferrable mode when wait_for_completion is True. Default is configured by operators.default_deferrable.

  • azure_ai_agents_conn_id (str) – Azure AI Agents connection id. Default is azure_ai_agents_default.

  • endpoint (str | None) – Optional Azure AI Foundry project endpoint override. Default is None.

  • api_version (str) – Foundry Agent Service API version. Default is v1.

template_fields: collections.abc.Sequence[str] = ('agent_name', 'definition', 'metadata', 'description', 'blueprint_reference',...[source]
template_fields_renderers[source]
ui_color = '#0678d4'[source]
agent_name[source]
definition[source]
metadata = None[source]
description = None[source]
blueprint_reference = None[source]
wait_for_completion = True[source]
poll_interval = 30.0[source]
timeout = 3600[source]
deferrable[source]
azure_ai_agents_conn_id = 'azure_ai_agents_default'[source]
endpoint = None[source]
api_version = 'v1'[source]
property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]

Create and return an AzureAIAgentsHook.

execute(context)[source]

Create an Azure AI Hosted agent version and optionally wait for it to become active.

execute_complete(context, event)[source]

Resume after the version trigger completes.

class airflow.providers.microsoft.azure.operators.ai_agents.UpdateAzureAIAgentOperator(*, agent_name, definition, metadata=None, description=None, blueprint_reference=None, wait_for_completion=True, poll_interval=30.0, timeout=60 * 60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), azure_ai_agents_conn_id=AzureAIAgentsHook.default_conn_name, endpoint=None, api_version='v1', **kwargs)[source]

Bases: CreateAzureAIAgentOperator

Create a new version of an existing Azure AI Hosted agent.

The Hosted agent API publishes updates as new immutable versions, so this operator accepts the same parameters as CreateAzureAIAgentOperator.

class airflow.providers.microsoft.azure.operators.ai_agents.RunAzureAIAgentOperator(*, agent_name, input_data, protocol='responses', agent_session_id=None, user_isolation_key=None, azure_ai_agents_conn_id=AzureAIAgentsHook.default_conn_name, endpoint=None, api_version='v1', **kwargs)[source]

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

Invoke an Azure AI Hosted agent.

Parameters:
  • agent_name (str) – Hosted agent name.

  • input_data (dict[str, Any]) – Request payload for the selected protocol.

  • protocol (str) – Hosted agent protocol to use. Supported values are responses and invocations. Default is responses.

  • agent_session_id (str | None) – Optional session id used by the invocations protocol. Default is None.

  • user_isolation_key (str | None) – Optional per-user isolation key for endpoint-scoped resources. Default is None.

  • azure_ai_agents_conn_id (str) – Azure AI Agents connection id. Default is azure_ai_agents_default.

  • endpoint (str | None) – Optional Azure AI Foundry project endpoint override. Default is None.

  • api_version (str) – Foundry Agent Service API version. Default is v1.

template_fields: collections.abc.Sequence[str] = ('agent_name', 'input_data', 'protocol', 'agent_session_id', 'user_isolation_key',...[source]
template_fields_renderers[source]
ui_color = '#0678d4'[source]
agent_name[source]
input_data[source]
protocol = 'responses'[source]
agent_session_id = None[source]
user_isolation_key = None[source]
azure_ai_agents_conn_id = 'azure_ai_agents_default'[source]
endpoint = None[source]
api_version = 'v1'[source]
property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]

Create and return an AzureAIAgentsHook.

execute(context)[source]

Invoke an Azure AI Hosted agent and return the response payload.

class airflow.providers.microsoft.azure.operators.ai_agents.DeleteAzureAIAgentOperator(*, agent_name, agent_version=None, force=False, wait_for_completion=True, poll_interval=30.0, timeout=60 * 60, azure_ai_agents_conn_id=AzureAIAgentsHook.default_conn_name, endpoint=None, api_version='v1', **kwargs)[source]

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

Delete an Azure AI Hosted agent or one Hosted agent version.

Parameters:
  • agent_name (str) – Hosted agent name.

  • agent_version (str | None) – Optional Hosted agent version. When omitted, the whole agent is deleted. Default is None.

  • force (bool) – Whether to cascade-delete active sessions when deleting the agent or version. Default is False.

  • wait_for_completion (bool) – Whether to wait until the resource is deleted. Default is True.

  • poll_interval (float) – Time in seconds between status checks. Default is 30.0.

  • timeout (float) – Time in seconds to wait for deletion to complete. Default is 3600.

  • azure_ai_agents_conn_id (str) – Azure AI Agents connection id. Default is azure_ai_agents_default.

  • endpoint (str | None) – Optional Azure AI Foundry project endpoint override. Default is None.

  • api_version (str) – Foundry Agent Service API version. Default is v1.

template_fields: collections.abc.Sequence[str] = ('agent_name', 'agent_version', 'azure_ai_agents_conn_id', 'endpoint', 'api_version')[source]
ui_color = '#0678d4'[source]
agent_name[source]
agent_version = None[source]
force = False[source]
wait_for_completion = True[source]
poll_interval = 30.0[source]
timeout = 3600[source]
azure_ai_agents_conn_id = 'azure_ai_agents_default'[source]
endpoint = None[source]
api_version = 'v1'[source]
property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]

Create and return an AzureAIAgentsHook.

execute(context)[source]

Delete an Azure AI Hosted agent or version and optionally wait for deletion.

Was this entry helpful?