airflow.providers.microsoft.azure.operators.ai_agents¶
Classes¶
Create an Azure AI Hosted agent version from a container image definition. |
|
Create a new version of an existing Azure AI Hosted agent. |
|
Invoke an Azure AI Hosted agent. |
|
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.BaseOperatorCreate 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.imagewith 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 isTrue.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_completionisTrue. Default is configured byoperators.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]¶
- property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]¶
Create and return an AzureAIAgentsHook.
- 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:
CreateAzureAIAgentOperatorCreate 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.BaseOperatorInvoke 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
responsesandinvocations. Default isresponses.agent_session_id (str | None) – Optional session id used by the
invocationsprotocol. Default isNone.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]¶
- property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]¶
Create and return an AzureAIAgentsHook.
- 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.BaseOperatorDelete 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]¶
- property hook: airflow.providers.microsoft.azure.hooks.ai_agents.AzureAIAgentsHook[source]¶
Create and return an AzureAIAgentsHook.