Azure AI Foundry
Connect an agent on Azure AI Foundry to AI GO! as a native model, using the typed azure_foundry connection. The integration authenticates with an Azure service principal, creates a conversation on the first turn, and round-trips the conversation_id automatically, so multi-turn evaluations preserve state.
Prerequisites
- An agent deployed on Azure AI Foundry, its project endpoint URL, and the agent name.
- An Azure service principal (tenant ID, client ID, client secret) with access to the project.
Configuration
Define the model with connection_type: azure_foundry and reference the service-principal credentials as secrets:
key: "azure-foundry-agent"
display_name: "Azure AI Foundry Agent"
description: "Agent on Azure AI Foundry, via the typed `azure_foundry` connection config."
task: "chat_completion"
rate_limit: 15
config:
connection_type: "azure_foundry"
project_endpoint: $AZURE_AI_PROJECT_ENDPOINT
agent_name: $AZURE_FOUNDRY_AGENT_NAME
tenant_id: "<< secrets.AZURE_TENANT_ID >>"
client_id: "<< secrets.AZURE_CLIENT_ID >>"
client_secret: "<< secrets.AZURE_CLIENT_SECRET >>"
secrets:
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_CLIENT_ID: $AZURE_CLIENT_ID
AZURE_CLIENT_SECRET: $AZURE_CLIENT_SECRETConfig fields
| Field | Required | Secret | Description |
|---|---|---|---|
connection_type |
yes | no | Must be azure_foundry. |
project_endpoint |
yes | no | Endpoint URL of the Azure AI Foundry project. |
agent_name |
yes | no | Name of the agent to invoke. |
tenant_id |
yes | yes | Service-principal tenant ID. |
client_id |
yes | yes | Service-principal client ID. |
client_secret |
yes | yes | Service-principal client secret. |
Credentials
The secrets block uploads values (from your .env or environment) to server-side secret storage, and << secrets.NAME >> references them from the config so no secret is stored in plaintext. Provide the values in your .env:
AZURE_AI_PROJECT_ENDPOINT=https://my-project.services.ai.azure.com/api/projects/my-project
AZURE_FOUNDRY_AGENT_NAME=my-agent
AZURE_TENANT_ID=...
AZURE_CLIENT_ID=...
AZURE_CLIENT_SECRET=...Add and test
lf add model -f azure_foundry.yaml
lf test model azure-foundry-agentUse in an evaluation
Reference the model key from a task specification in your run config:
evaluation:
task_specifications:
- task_key: my-task
model_key: "azure-foundry-agent"Conversation state
On the first turn the integration creates a conversation; the conversation_id is attached to the assistant message and reused on each subsequent turn, so the agent remembers earlier turns.