MSBA-312 · Lesson 9 of 12 · 19 min

Monitoring and incident response

▶ Video coming soon A video version of this lesson is on the way.

At 9:40 on the morning of Wednesday, November 4, 2026, Precious Mahlangu messaged Yusra from the contact centre floor: "Appetite questions are all coming back with 'I couldn't find appetite information for that class of business.' Every one. Started maybe twenty minutes ago." Within an hour the problem was understood, contained and fixed, and within a week the fix had been made permanent. That outcome was not luck. It came from monitoring that showed where the failure was, a runbook that said what to do, and roles that meant nobody had to ask who was in charge. This lesson covers the AB-100 skills "recommend the process and tools required for monitoring agents" and "monitor agent performance and metrics", together with the incident response practices that turn monitoring into action.

What to monitor

Monitoring AI solutions means watching four kinds of signal, because each fails in different ways. Availability and errors: is the agent reachable, are tools and connectors succeeding, are flows completing? Performance: how long do responses take, where is time spent, are models or APIs throttling? Quality: are answers still good, as measured by resolution, escalation, satisfaction, online evaluation scores and human review? Cost and consumption: how many credits or tokens are used, by which agent, and is consumption tracking the plan? A fifth signal, security, covers manipulation attempts, unusual tool use and policy violations, and it usually flows to the security team's tools as well as the operations dashboard.

SignalExample metricsMain sourcesWatched by
Availability and errorsTool failure rate, flow failures, HTTP errors from BrokerDeskApplication Insights, flow run history, connector telemetryYusra and Pascal's team
PerformanceResponse time, tool latency, model throttlingApplication Insights, Foundry tracingYusra, Ngozika
QualityResolution and escalation rates, satisfaction, online evaluation scoresCopilot Studio analytics, Foundry continuous evaluationBusiness owners and team leads
Cost and consumptionCredits per day and per agent, tokens per runPower Platform admin center capacity reports, Azure Cost Management, Agent 365Hamish
SecurityInjection attempts, blocked prompts, unusual tool callsMicrosoft Defender, Microsoft Purview, Agent 365IT security lead

The monitoring toolset

Microsoft's tools for these signals are spread across products, and part of the architect's job is recommending which to use and how to connect them.

Copilot Studio analytics report sessions, engagement, resolution, escalation and abandonment, satisfaction, themes, and for autonomous agents, runs. As MSBA-242 described, aggregate data is kept for up to 360 days, session details and transcripts for 28 days, and data can take up to an hour to appear. Analytics are good for trends and quality; they are not real-time alerting.

Application Insights, part of Azure Monitor, receives detailed telemetry. Copilot Studio agents can be connected to an Application Insights resource so that conversation activities and events are logged and can be queried with Kusto Query Language (KQL) and used for alerts. Foundry agents send traces using OpenTelemetry conventions for generative AI, showing each step of a run: model calls with token counts, tool calls with inputs and outputs, and latency. At Ignite on November 17, 2026, Microsoft announced further agent observability in Azure Monitor, including generally available observability and evaluation for agents built with other frameworks or hosted elsewhere, and previews of cross-agent debugging that connects telemetry across agent runtimes and of protected tables that separate access to prompt and response data. Copilot Studio was listed among the Microsoft runtimes exposing standardized agent telemetry.

Foundry observability brings tracing, evaluation results and monitoring together for Foundry agents, including continuous evaluation (Lesson 4). Microsoft Agent 365, generally available and described in MSBA-205, gives a tenant-wide registry of agents with owners, usage and risk, an agent map, security signals from Defender, Entra and Purview, the ability to block an agent quickly, and cost views by user, group, agent and service. Flow run history in Power Automate shows each agent flow run with the step that failed. And the Power Platform admin center shows Copilot Studio capacity consumption by environment and agent.

A diagram with agents at the bottom: Copilot Studio agents, agent flows and Foundry agents. Arrows carry telemetry upward to three stores: Copilot Studio analytics, Application Insights in Azure Monitor, and Agent 365. Above them sit dashboards and alert rules, which feed an on-call rota and the incident channel in Teams.
Telemetry from each runtime flows to analytics, Application Insights and Agent 365, and alert rules turn it into action.

Designing the monitoring

Bram's recommendation for Quillfield had five parts. First, every production agent connects to Application Insights, one workspace per stage, so that tool failures and latency can be queried and alerted on in one place. Second, alerts are few and actionable: an alert fires only when someone should do something, and each alert links to a runbook entry. Third, dashboards serve audiences: an operations dashboard for Yusra and Pascal with errors and latency, a quality dashboard for business owners with resolution, escalation and satisfaction, and a monthly portfolio report for the AI council. Fourth, baselines come first: each agent's normal ranges are recorded during its first month so that alerts compare against reality, not guesses. Fifth, privacy is designed in: telemetry that includes conversation content is restricted to named roles, and logging options that capture sensitive properties are enabled only where needed.

customEvents
| where timestamp > ago(15m)
| where name == "ToolCallCompleted"
| extend tool = tostring(customDimensions["toolName"]),
         ok = tostring(customDimensions["succeeded"])
| summarize calls = count(), failures = countif(ok == "false") by tool
| where calls >= 10 and failures * 1.0 / calls > 0.5

Incident response

An incident is an unplanned event that degrades a service or creates risk, and incident response is the process of detecting, containing, resolving and learning from it. For AI solutions, incidents include the familiar (an API is down) and the new: an agent giving wrong answers confidently, an agent taking unexpected actions, a successful prompt injection, a cost spike from a loop, or harmful content reaching a user. Quillfield's process, adapted from its existing IT incident process, has five stages.

Detect: from an alert, a user report or a review. Triage: assign a severity and an incident lead. Contain: stop the harm from growing, even before the cause is known. Resolve: find and fix the cause. Learn: hold a blameless review and turn findings into actions. Severity drives everything else.

SeverityDefinitionExamplesResponse
1Harm to clients or data, or an agent acting wrongly on recordsWrong data changed at scale, data shown to the wrong person, successful injection with actionContain within 15 minutes; AI council chair and Wendell informed at once
2A core capability unavailable or seriously wrong for many usersPolicy lookups failing, appetite answers all wrongContain within one hour; business owner informed
3Degraded or partial failure with a workaroundSlow responses, one tool intermittently failingFix within one working day
4Minor issueWording problem, cosmetic renderingBacklog

Containment options

Containment is where AI incidents differ most from ordinary ones, because the options are different and should be decided in advance. For a misbehaving agent, the options from least to most drastic are: disable a single tool or topic (for example by switching a feature flag or removing a tool in an emergency patch); switch to a fallback message that tells users the capability is unavailable and how to get help; roll back to the previous version; unshare the agent or remove it from a channel; block the agent tenant-wide through Agent 365 or the Microsoft 365 admin center; and for Copilot Studio agents with runaway consumption, rely on the per-agent monthly credit limit with its optional hard stop, remembering that enforcement is not instantaneous. For Foundry agents, containment can also mean pointing callers to a safe version, revoking the agent application's permissions, or stopping the agent.

Every production agent at Quillfield has its containment options written in its runbook, with who can use each. The runbook for the Policy Service Assistant names the Northmark appetite tool as separately disableable through an environment variable, which is exactly what happened on November 4.

The November 4 incident

When Precious's message arrived, Yusra opened the operations dashboard. Tool failures for the Northmark appetite tools had jumped from near zero to every call at 9:18. BrokerDesk tools were healthy. She declared a severity 2 incident in the AI incidents channel in Teams, named herself incident lead and asked Pascal to join. The containment step in the runbook was to switch the appetite flag off, which made the agent tell users that carrier appetite information was temporarily unavailable and to check Northmark's broker portal directly. That took two minutes.

The trace for a failed call showed that Northmark's server was responding, but with a changed result structure: a field the tool description relied on had been renamed in a release Northmark made that morning. The agent was correctly reporting that it could not find what it expected. Pascal contacted Northmark's integration team, who confirmed the change and agreed to restore the old field name alongside the new one until brokers had adapted. At 10:35 the old field reappeared; Yusra ran the appetite evaluation cases in test against the live Northmark server, switched the flag back on in production and watched the dashboard for thirty minutes before closing the incident.

Learning from incidents

Every severity 1 or 2 incident gets a blameless review within five working days. Blameless means the review asks what in the system allowed the problem, not who made a mistake, so that people report problems early and honestly. The review produces a short write-up: timeline, impact, what went well, what went badly, root cause and actions with owners.

The November 4 review found that detection had come from a user, twenty minutes after failures began, because no alert existed for the Northmark tools. It produced four actions: an alert on tool failure rate for every external tool; a request to Northmark for advance notice of schema changes, added to the next contract review; an evaluation case that would detect the missing field in the monthly run; and a change to the tool description so the agent reported "the carrier's service returned an unexpected response" rather than "no appetite found", which users had misread as a real answer. All four were done by November 13.

Worked problem

Running a severity 1 containment

At 2:10 p.m. a broker reports that a certificates-mailbox draft named a different client's insured in the additional insured wording. Brokers review drafts, but this one was nearly approved. What should the incident lead do first?

Show solution
  1. Declare severity 1: client data appeared in another client's draft, which is a possible privacy breach.
  2. Contain: pause the agent's trigger so no new drafts are created, and notify brokers to hold existing drafts.
  3. Inform Wendell and the AI council chair at once, as the severity table requires, so privacy obligations can be assessed.
  4. Preserve evidence: export the affected draft, the trace and the source email before anything is changed.
  5. Investigate with the trace, fix, test the fix with a new zero-tolerance evaluation case, and resume only with business owner approval.

Answer: Contain first by stopping new drafts, involve compliance immediately, preserve evidence, then investigate and fix; resuming needs explicit approval and a new test case. (This scenario is a tabletop exercise Quillfield ran in November, not a real event.)

On-call and runbooks

AI solutions that support business hours need business-hours coverage at minimum. Quillfield's rota names a primary and a backup for each week, drawn from Yusra, Pascal's team and Ngozika's team, with Bram as escalation. Each agent's runbook is a single page: what the agent does, its dependencies, its dashboards and alerts, its containment options and who may use them, its rollback steps, and its contacts, including external ones such as Northmark's integration desk. Runbooks are tested twice a year with tabletop exercises like the one above.

Cost as an operational signal

Consumption is usually reviewed monthly as a finance matter, but sudden changes in consumption are often the first sign of a technical problem. An agent stuck in a loop, a flow that retries a failing call hundreds of times, or a Foundry agent that suddenly retrieves far more content per question all show up as spikes in credits or tokens before users complain. Hamish therefore asked for a daily consumption check on the operations dashboard: credits per agent per day in Copilot Studio, from the capacity reports in the Power Platform admin center, and tokens per run in Foundry from tracing.

The alert rule compares each day with the same weekday over the previous four weeks, because Monday traffic is always higher than Friday traffic. A day more than half again above its baseline creates a severity 3 ticket for Yusra, who checks whether the rise reflects more users, longer conversations or a fault. Per-agent credit limits remain the backstop, set with notifications at agreed thresholds so that a fault is caught long before a hard stop would affect users.

Common mistakes

  • MistakeRelying on users to report AI failures.

    InsteadAlert on tool failures, latency and quality drops, with baselines recorded in each agent's first month.

  • MistakeDeciding containment options during the incident.

    InsteadWrite containment options and who may use them into each agent's runbook in advance.

  • MistakeFixing the cause before containing the harm.

    InsteadContain first, even before the cause is known, then investigate.

  • MistakeTreating wrong answers as a quality issue rather than an incident.

    InsteadClassify confidently wrong answers and wrong actions by their impact, which can be severity 1 or 2.

  • MistakeHolding reviews that look for someone to blame.

    InsteadRun blameless reviews that ask what in the system allowed the failure and assign actions.

Summary and key terms

  • AI monitoring covers availability and errors, performance, quality, cost and consumption, and security.
  • Copilot Studio analytics, Application Insights, Foundry observability, Agent 365, flow run history and admin center capacity reports each cover part of the picture.
  • Good monitoring design connects every agent to Application Insights, uses few actionable alerts, builds dashboards per audience, records baselines and protects content in telemetry.
  • Incident response runs detect, triage, contain, resolve and learn, with severity driving speed and escalation.
  • Containment options range from disabling a tool to blocking an agent tenant-wide, and are written in advance in runbooks.
  • Blameless reviews turn incidents into concrete actions, such as new alerts and evaluation cases.
Telemetry
Data emitted by a running system about its activity, performance and errors.
Application Insights
The Azure Monitor feature that collects and queries application telemetry, including agent traces.
Baseline
The normal range of a metric, recorded so that alerts compare against real behaviour.
Incident
An unplanned event that degrades a service or creates risk.
Containment
Actions that stop an incident's harm from growing before the cause is fixed.
Runbook
A short operational guide for a solution covering dependencies, alerts, containment, rollback and contacts.
Blameless review
A post-incident review that examines system causes rather than individual fault.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Why did the November 4 incident take twenty minutes to detect?

    Show answer

    There was no alert on the Northmark tools' failure rate, so detection depended on a user report.

  2. List three containment options for a Copilot Studio agent.

    Show answer

    Disable a tool or topic with a flag, switch to a fallback message, roll back, unshare, or block the agent tenant-wide.

  3. What makes a review blameless?

    Show answer

    It asks what in the system allowed the failure, not who made a mistake.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz