Analyze agent lifecycle telemetry

APPLIES TO: Business Central 2026 release wave 1, version 28.0, and later

Agent lifecycle telemetry gathers data about the creation and configuration of AI agents in Business Central. This telemetry helps you track agent setup, monitor configuration changes, and understand how agents and their tasks are being used.

Agent created

Occurs when a new agent is created in Business Central.

General dimensions

DimensionDescription or value
messageAgent created: {agentDisplayName}
severityLevel1 (Informational)
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdLC0067
agentUserIdSpecifies the security ID (GUID) of the agent user.
agentUserNameSpecifies the unique user name identifier for the agent.
agentDisplayNameSpecifies the human-readable display name of the agent.
stateSpecifies the agent's state. Values are Enabled or Disabled.
instructionsHashSpecifies the SHA-256 hash of the agent's instructions. Empty if no instructions are set.
modelIdSpecifies the ID of the AI model configured for the agent.
modelNameSpecifies the display name of the AI model.
modelAvailabilitySpecifies the availability status of the model. Values are Preview, Available, Obsolete, or Retired.
modelIsDefaultSpecifies whether this is the platform default model. Values are true or false.
modelRetirementDateSpecifies the retirement date for the model, if set.

Sample KQL code

This KQL code can help you get started analyzing agent creation:

traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'LC0067'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, agentDisplayName = customDimensions.agentDisplayName
, agentUserName = customDimensions.agentUserName
, state = customDimensions.state
, modelId = customDimensions.modelId
, modelName = customDimensions.modelName
, modelAvailability = customDimensions.modelAvailability

Agent configuration changed

Occurs when an agent's configuration is modified in Business Central. This event includes information about which fields changed and their previous values.

The substatePreviousValue dimension has the following availability:

APPLIES TO: Business Central 2026 release wave 2 and later

General dimensions

DimensionDescription or value
messageAgent configuration changed: {agentDisplayName}
severityLevel1 (Informational) when the configured model is available or in preview. The value is 2 (Warning) when the model is obsolete or retired.
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdLC0066
agentUserIdSpecifies the security ID (GUID) of the agent user.
agentUserNameSpecifies the unique user name identifier for the agent.
agentDisplayNameSpecifies the human-readable display name of the agent.
stateSpecifies the agent's current state after the change. Values are Enabled or Disabled.
instructionsHashSpecifies the SHA-256 hash of the agent's current instructions.
modelIdSpecifies the ID of the AI model currently configured for the agent.
modelNameSpecifies the display name of the AI model.
modelAvailabilitySpecifies the availability status of the model. Values are Preview, Available, Obsolete, or Retired.
modelIsDefaultSpecifies whether this is the platform default model. Values are true or false.
modelRetirementDateSpecifies the retirement date for the model, if set.
changedFieldsSpecifies a comma-separated list of fields that changed (for example, "state,modelId"). Empty when no specific fields were flagged.
agentUserNamePreviousValueSpecifies the agent's user name before the change. Empty when the user name did not change.
agentDisplayNamePreviousValueSpecifies the agent's display name before the change. Empty when the display name did not change.
statePreviousValueSpecifies the agent's state before the change. Empty when the state did not change.
substatePreviousValueSpecifies the agent's substate before the change, such as the state before the agent was archived. Empty when the substate did not change.
modelIdPreviousValueSpecifies the configured model ID before the change. Empty when the model did not change.
instructionsHashPreviousValueSpecifies the SHA-256 hash of the agent's instructions before the change. Empty when the instructions did not change.

Sample KQL code

This KQL code can help you get started analyzing agent configuration changes:

traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'LC0066'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, agentDisplayName = customDimensions.agentDisplayName
, changedFields = customDimensions.changedFields
, oldState = customDimensions.statePreviousValue
, newState = customDimensions.state
, oldSubstate = customDimensions.substatePreviousValue
, oldModelId = customDimensions.modelIdPreviousValue
, newModelId = customDimensions.modelId

Sample KQL code for tracking state changes

This KQL code can help you track when agents are enabled or disabled:

traces
| where timestamp > ago(30d) // adjust as needed
| where customDimensions.eventId == 'LC0066'
| where customDimensions.changedFields contains 'state'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, agentDisplayName = customDimensions.agentDisplayName
, oldState = customDimensions.statePreviousValue
, newState = customDimensions.state
| summarize StateChanges = count() by tostring(agentDisplayName), tostring(oldState), tostring(newState)
| order by StateChanges desc

Agent task created

Occurs when a new agent task is created in Business Central. Agent tasks represent individual work items assigned to agents.

General dimensions

DimensionDescription or value
messageAgent task created: {taskId}
severityLevel1 (Informational) when the selected model is available or in preview. The value is 2 (Warning) when the model is obsolete or retired.
user_IdThe user telemetry ID for the user. From the user card, you can use user_Id to identify the user who triggered this telemetry event. Learn more in Assign a telemetry ID to users.

Custom dimensions

DimensionDescription or value
aadTenantIdSpecifies the Microsoft Entra tenant ID used for Microsoft Entra authentication. For on-premises, if you aren't using Microsoft Entra authentication, this value is common.
environmentNameSpecifies the name of the tenant environment. Learn more in Managing Environments.
environmentTypeSpecifies the environment type for the tenant, such as Production or Sandbox. Learn more in Environment Types.
eventIdLC0068
taskIdSpecifies the unique identifier for the agent task.
agentUserIdSpecifies the security ID (GUID) of the agent user that owns the task.
agentDisplayNameSpecifies the human-readable display name of the agent that owns the task.
modelSourceSpecifies where the model configuration came from. Values are Task, Agent, or Default. This indicates the level at which the model was defined.
modelIdSpecifies the ID of the AI model used by the task.
modelNameSpecifies the display name of the AI model.
modelAvailabilitySpecifies the availability status of the model. Values are Preview, Available, Obsolete, or Retired.
modelIsDefaultSpecifies whether this is the platform default model. Values are true or false.
modelRetirementDateSpecifies the retirement date for the model, if set.

Sample KQL code

This KQL code can help you get started analyzing agent task creation:

traces
| where timestamp > ago(60d) // adjust as needed
| where customDimensions.eventId == 'LC0068'
| project timestamp
, aadTenantId = customDimensions.aadTenantId
, environmentName = customDimensions.environmentName
, environmentType = customDimensions.environmentType
, taskId = customDimensions.taskId
, agentDisplayName = customDimensions.agentDisplayName
, modelSource = customDimensions.modelSource
, modelId = customDimensions.modelId
, modelName = customDimensions.modelName
, modelAvailability = customDimensions.modelAvailability

Sample KQL code for task creation by agent

This KQL code can help you understand which agents are creating the most tasks:

traces
| where timestamp > ago(30d) // adjust as needed
| where customDimensions.eventId == 'LC0068'
| summarize
    TaskCount = count()
  , UniqueModels = dcount(tostring(customDimensions.modelId))
  by
    AgentDisplayName = tostring(customDimensions.agentDisplayName)
  , EnvironmentName = tostring(customDimensions.environmentName)
| order by TaskCount desc

Sample KQL code for model usage in tasks

This KQL code can help you understand which models are being used and how they were configured:

traces
| where timestamp > ago(30d) // adjust as needed
| where customDimensions.eventId == 'LC0068'
| summarize
    TaskCount = count()
  by
    ModelName = tostring(customDimensions.modelName)
  , ModelSource = tostring(customDimensions.modelSource)
  , ModelAvailability = tostring(customDimensions.modelAvailability)
| order by TaskCount desc

To learn more about how to set up alerting on Business Central telemetry, see Alert on Telemetry.

Monitoring and Analyzing Telemetry
Enable Sending Telemetry to Application Insights
Alert on Telemetry