Azure RunAgent

Azure RunAgent

Certified

Create and run an Azure AI Foundry agent, returning the conversation result

Creates a thread, posts the prompt as a user message, starts a run against the specified agent, polls until the run reaches a terminal state, then returns the last assistant message. Uses Entra ID authentication (DefaultAzureCredential).

yaml
type: io.kestra.plugin.azure.aifoundry.RunAgent

Run an Azure AI Foundry agent and retrieve the reply

yaml
    id: azure_ai_run_agent
    namespace: company.team
    tasks:
      - id: run_agent
        type: io.kestra.plugin.azure.aifoundry.RunAgent
        endpoint: "{{ secret('AZURE_AI_FOUNDRY_ENDPOINT') }}"
        tenantId: "{{ secret('AZURE_TENANT_ID') }}"
        clientId: "{{ secret('AZURE_CLIENT_ID') }}"
        clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
        agentId: asst_abc123
        prompt: "Summarize last week's sales data."
        pollInterval: PT5S
        timeout: PT5M
Properties

The agent (assistant) ID to run

Azure AI Foundry endpoint

The Azure AI Foundry project or model endpoint URL.

The prompt or message to send to the agent

Azure AI Foundry API key

API key for API-key authentication. When omitted, DefaultAzureCredential (Entra ID) is used instead.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Azure client ID

Client ID of the Azure app registration used with tenantId and clientSecret.

Azure client secret

Client secret of the Azure app registration used with tenantId and clientId.

DefaultPT5S

How often to poll the run status

ISO 8601 duration, e.g. PT5S. Defaults to 5 seconds.

Azure tenant ID

Azure Entra tenant ID used with clientId and clientSecret for service principal authentication.

DefaultPT5M

Maximum time to wait for the run to complete

ISO 8601 duration, e.g. PT5M. Defaults to 5 minutes.

The last assistant message from the agent

The run ID

The thread ID created for this run