
Azure RunAgent
CertifiedCreate and run an Azure AI Foundry agent, returning the conversation result
Azure RunAgent
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).
type: io.kestra.plugin.azure.aifoundry.RunAgentExamples
Run an Azure AI Foundry agent and retrieve the reply
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
agentId *Requiredstring
The agent (assistant) ID to run
endpoint *Requiredstring
Azure AI Foundry endpoint
The Azure AI Foundry project or model endpoint URL.
prompt *Requiredstring
The prompt or message to send to the agent
apiKey string
Azure AI Foundry API key
API key for API-key authentication. When omitted, DefaultAzureCredential (Entra ID) is used instead.
clientId string
Azure client ID
Client ID of the Azure app registration used with tenantId and clientSecret.
clientSecret string
Azure client secret
Client secret of the Azure app registration used with tenantId and clientId.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
pollInterval string
PT5SHow often to poll the run status
ISO 8601 duration, e.g. PT5S. Defaults to 5 seconds.
tenantId string
Azure tenant ID
Azure Entra tenant ID used with clientId and clientSecret for service principal authentication.
timeout string
PT5MMaximum time to wait for the run to complete
ISO 8601 duration, e.g. PT5M. Defaults to 5 minutes.
Outputs
result string
The last assistant message from the agent
runId string
The run ID
threadId string
The thread ID created for this run