AI & agents
Deploy Logic Foundry and the Logic Agents
Deploy Logic Foundry and the six Logic Agents into Azure with one template, connect them to an AI model, and hand the addresses to your users.
Applies toDataverse
This template deploys Logic Foundry and the six Logic Agents (Assist, Assurance, Context, Guard, Insights and Sentinel) together, already connected: each agent signs users in and works with Logic Foundry on their behalf. Check the prerequisites first.
What gets deployed
Section titled “What gets deployed”| Resource | Count | Notes |
|---|---|---|
| Container Apps environment | 1 | Shared by everything below. |
| Logic Foundry container app | 1 | The MCP server that AI clients and the agents connect to. |
| Logic Agents container apps | 6 | One web app per agent. |
| Internal cache (Redis) container app | 1 | Keeps the agents’ working state, such as running jobs. Reachable only inside the environment. |
| Storage account | 1 | Keeps the cache’s data across restarts. |
| Managed identities | 7 | One per product. |
| App registrations in Microsoft Entra ID | 8 | Logic Foundry, a client for desktop AI tools, and one per agent. |
| Dataverse application user | 1 | For Logic Foundry’s managed identity, with the Flowon Customizer role. The agents reach Dataverse only through Logic Foundry. |
| Application Insights and Log Analytics | 0 or 1 | Created unless you reuse an existing resource or turn it off. |
Deploy
Section titled “Deploy”-
Get the template from the Logic Fabric deployment templates, which Flowon provides on request (contact Flowon) and open a terminal in its
foundryfolder. -
Create an
azdenvironment. Use a name that says which Dataverse environment it serves, for examplelf-ai-prod:Terminal window azd env new lf-ai-prodazdasks for the Azure subscription and region. -
Set the two required values:
Terminal window azd env set dataverseUrl "https://contoso.crm.dynamics.com/"azd env set setupManagedIdentityId "<resource ID of your setup identity>" -
Connect the agents to an AI model. For the default provider (Claude on Azure AI Foundry):
Terminal window azd env set azureFoundryAnthropicEndpoint "https://<your-resource>.services.ai.azure.com/anthropic"azd env set azureFoundryAnthropicModel "<deployment name>"azd env set azureFoundryAnthropicApiKey "<key>"For other providers, see AI model.
-
Deploy:
Terminal window azd provisionIt creates the resources in order; the first deployment takes longer than later updates.
-
Get the addresses:
Terminal window azd env get-valuesCONTAINER_APP_URLis the Logic Foundry address.AGENT_APPSlists each agent with itscontainerAppUrl.
After deployment
Section titled “After deployment”- Give users the addresses. Designers add the Logic Foundry address to their AI client (see Set up Logic Foundry). Each agent’s address opens its web app.
- Decide who can use the products. Users sign in with their organization account. To limit access to a group, open each app registration’s enterprise application in Microsoft Entra ID, turn on Assignment required, and assign the group.
- Check the agents. Open one agent, sign in and run a small task against a development project.
AI model
Section titled “AI model”The agents need an AI model. Choose one provider with llmProvider and set only that provider’s values.
llmProvider |
Service | Required values | Optional values (defaults) |
|---|---|---|---|
AzureFoundryAnthropic (default) |
Claude models on Azure AI Foundry | azureFoundryAnthropicEndpoint, azureFoundryAnthropicApiKey, azureFoundryAnthropicModel |
azureFoundryAnthropicVersion (2023-06-01) |
AzureFoundry |
Other models on Azure AI Foundry | azureFoundryEndpoint, azureFoundryApiKey, azureFoundryModel |
— |
AzureOpenAI |
Azure OpenAI Service | azureFoundryOpenAIEndpoint, azureFoundryOpenAIApiKey, azureFoundryOpenAIModel |
— |
OpenAI |
OpenAI | openAIApiKey, openAIModel |
— |
Anthropic |
Anthropic | anthropicApiKey, anthropicModel |
anthropicVersion (2023-06-01) |
Set them with azd env set, for example azd env set llmProvider AzureOpenAI. Keys are stored as secrets of the container apps, not in the template. The same model serves all agents and all projects.
Request time-outs and output limits (…TimeoutMinutes, default 10; …MaxOutputTokens, default 16384) and the number of simultaneous model requests per agent (llmMaxConcurrency, default 4) are set in infra/main.parameters.json (add llmMaxConcurrency there if you want to change it).
Settings
Section titled “Settings”Set these with azd env set <name> <value> before azd provision. Settings marked file only take effect in infra/main.parameters.json: change their value there, or add them if they aren’t listed yet, for example:
"agentLogLevel": { "value": "Information"}| Setting | Default | What it does |
|---|---|---|
dataverseUrl |
— (required) | The Dataverse environment Logic Foundry works with. |
setupManagedIdentityId |
— (required) | Resource ID of your setup identity. |
dataverseSecurityRoleName (file) |
Flowon Customizer |
Security role given to Logic Foundry’s application user. Must exist in the environment. |
acaNamePrefix |
flowon-logic-fabric |
Prefix for all resource names, for example flowon-logic-fabric-guard-agent. |
appInsightsConnectionString |
(empty: create new) | Reuse an existing Application Insights resource, or DISABLED to turn monitoring off. |
agentLogLevel (file) |
Critical |
How much the agents log. Use Information or Warning while troubleshooting. |
entraAppServerDisplayName |
Flowon Logic Fabric Foundry MCP Server |
Name of Logic Foundry’s app registration. |
entraAppClientDisplayName |
Flowon Logic Fabric Foundry MCP Client |
Name of the desktop-client app registration. |
entraAppClientId |
(empty: create new) | Reuse an existing desktop-client app registration. |
agentEntraAppIds (file) |
{} |
Reuse existing agent app registrations, for example { "guard": "<app id>" }. |
serviceManagementReference (file) |
(empty) | Links the app registrations to a service in your tenant’s app catalog. |
foundryCustomDomain |
(empty) | Custom domain for Logic Foundry. See below. |
agentCustomDomains (file) |
{} |
Custom domain per agent, for example { "guard": "guard.contoso.com" }. |
Custom domains
Section titled “Custom domains”By default each product gets an …azurecontainerapps.io address. To use your own domain, for example foundry.contoso.com, Azure issues a free certificate once DNS points at the app:
- Deploy once without the custom domain, and note the app’s default address (
azd env get-values). - In your DNS, add a CNAME record for the domain that points at that default address.
- Add a TXT record named
asuid.<your domain>with the value ofCUSTOM_DOMAIN_VERIFICATION_IDfromazd env get-values. The same value works for every domain in this deployment. - Set the domain (
azd env set foundryCustomDomain foundry.contoso.com, or add the agent toagentCustomDomainsininfra/main.parameters.json) and runazd provisionagain.
If DNS hasn’t updated yet, certificate creation fails; run azd provision again later. An agent’s custom domain is also added to its sign-in settings, so both addresses keep working.
Update
Section titled “Update”The template always deploys the latest published release of each product. To move to a newer release:
- Get the latest template and run
azd provisionfrom the sameazdenvironment. Your settings, app registrations and cache password are kept. - Restart each container app so it starts on the new release: in the Azure portal, open the container app, go to Revisions and replicas, and select Restart on the active revision.
Remove
Section titled “Remove”azd down --purgeThis deletes the resource group and everything in it. It does not delete the app registrations in Microsoft Entra ID. To remove them too, delete them afterwards (their IDs are in azd env get-values: ENTRA_APP_SERVER_CLIENT_ID, ENTRA_APP_CLIENT_CLIENT_ID and each agent’s entraAppClientId):
az ad app delete --id <app id>If you plan to deploy again, you can keep them and reuse them with entraAppClientId and agentEntraAppIds.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to do |
|---|---|
| Tool calls fail with AADSTS65001 (consent required) | Admin consent for Dynamics 365 access is missing. Run azd provision with an account that has Global Administrator or Privileged Role Administrator, or grant it yourself: Microsoft Entra ID > App registrations > Logic Foundry’s app > API permissions > Grant admin consent. |
azd provision fails while creating the Dataverse application user |
The setup identity doesn’t have System Administrator in this environment, or dataverseSecurityRoleName doesn’t match a role there. Fix it and run azd provision again. If the error says a resource “already exists or is in a conflicting state”, delete the failed dataverse-application-user-setup resource from the resource group first. |
The first azd provision fails with “property ‘appId’ doesn’t exist” |
Run azd provision again (see the note above). |
| Certificate or domain validation errors | DNS for the custom domain hasn’t updated yet. Wait and run azd provision again. |
| An agent’s sign-in fails after adding a custom domain | Run azd provision again; it registers the new address for sign-in. |
| Agents answer with model errors | Check llmProvider and that provider’s endpoint, model and key, then run azd provision. |
Related
Section titled “Related”- Deploy the AI products: prerequisites and the setup identity
- Deploy Logic Conductor
- Set up Logic Foundry
- Logic Agents