In this section

0.8 How Assistants and Agents Work

Module 0

Introduction

AI assistants now do things, not just say things. An assistant that can read mail, draft replies, open files, create tickets or run queries is acting in the services it's connected to, and those actions have consequences like any user's. When something goes wrong, or when someone asks what the assistant actually did, the investigation works the way every other investigation in this course works: from records.

This lesson looks at one small, ordinary task. A user asks a mail assistant to summarize an invoice and draft a reply without sending it. You'll see what an agent is made of, which steps of the task leave a record, whose identity the action runs under, what Microsoft's audit records for AI interactions hold, and how to check what the assistant said it did against what the service recorded. Module 8 investigates agents whose actions went wrong, so the method starts here, on one that went right.

Nothing needs installing. The exchange with the assistant is written for this lesson, and the mailbox record is generated in the same format as the other records in this module, so you can read every field on the page.

1

What an Agent Is Made Of

Instructions, a model and tools, and where the consequences land

An assistant that only answers questions produces text. An agent produces actions. Microsoft's documentation for its agent service describes agents as configured from instructions, a model and tools, and puts the important point plainly: agents act on the world through tools. A tool might search the web, read a file, call an API or send a message. Tools can be built in or added, including through the Model Context Protocol, a common way of connecting agents to other systems.

Instructionswhat it is forModelreads, decides, writesToolshow it actsA servicemail, files, a ticketA recordwhat the service logged

An agent from configuration to consequence: the action happens in a service, and the service keeps the record

The model reads the request and decides which tool to call with which arguments. The tool does the work in some service: a mailbox, a file store, a ticketing system. And the service, not the model, keeps the record of what happened. That last point is the one investigators rely on. The model's own description of what it did is text it generated. The service's record is the service's account of what it was asked to do and did.

The same documentation lists how tools authenticate: by key, by a managed identity belonging to the agent or the project, or on behalf of the signed-in user. That choice decides whose identity appears in the service's records. An agent acting on behalf of a user appears in the records as that user, through an application. An agent with its own identity appears as itself. Either way, the record names an identity and usually an application, and those are the threads an investigation follows.

Agents also take instructions from what they read. A document or an email the agent opens can contain text that looks like an instruction, and some agents will follow it. That's one of the main ways agents go wrong, and it's why the records of what an agent read matter as much as the records of what it did. Module 8 deals with it in depth.

2

One Task, Step by Step

A request, a read, a draft, and a reply that leaves no record of its own

On the morning from lesson 0.6, Maya Ortiz received a supplier's invoice. A few minutes later, she asked her mail assistant to handle the first step:

Mail assistantNew chat

Summarize the attached invoice and draft a reply to the supplier confirming we received it. Don't send it, I want to check it first.

Summary: Invoice 4471 from Kestrel Supplies for October, one attachment, due at the end of the month.

Done: I drafted a reply, "RE: Invoice 4471 for October", and saved it in your Drafts folder. It has not been sent.

Reply to Mail assistant...

Check before you use it

This is the assistant's account of what it did. It is a claim, like any other, and section 4 checks it against the mailbox's own record of the action.

An illustrative exchange, written for this lesson: an assistant you ask will word it differently.

The task has four steps, and they don't all leave the same kind of record:

Maya OrtizasksThe assistantan appHer mailboxExchange OnlineRecord left behindsummarize and draft, don't send1the interactionread the message and attachment2access, if auditedcreate an item in Drafts3mailbox audit: Create"saved in Drafts, not sent"4nothing: a reply

What the request set in motion, and which steps leave a record a service keeps

The request itself is an interaction with the assistant, which Microsoft 365 can record as an AI interaction, covered in section 5. Reading the message and its attachment is access to her mailbox, which is recorded only if mailbox access auditing captures it. Creating the draft is a change to her mailbox, which the mailbox audit records as an item being created. And the assistant's reply to Maya, "saved in Drafts, not sent", is just text on her screen. No service records it as an action, because it isn't one.

That last step is the trap. The reply is the part a user reads, and the part most likely to be quoted in an incident report. It's also the only part that isn't evidence of anything except what the assistant said.

Notice the instruction in the request: don't send it. That's a constraint the user stated, and the records are how you'd check the assistant honored it. Constraints like this are often the heart of an agent investigation. The question isn't only what the agent did, but whether it stayed within what it was told, and within what it was allowed.

Mapping a task to its records like this, before looking at any record, tells you what to ask for. For an agent that went wrong, it tells you which services to pull records from, which operations to expect and which steps may have left nothing at all.

It also shows where the records will be thin. Reading is recorded less consistently than changing, across most services. A record that an agent created, sent or deleted something is common. A record that it read something depends on the service and its settings. Expect the reads to be the hardest part of an agent's activity to establish, and plan for it.

3

The Action in the Service's Records

An item created in Drafts, by her account, through an application

Her mailbox's audit log recorded the draft being created. Here's the record, with the fields that answer the investigator's questions:

The mailbox's record of the actionTimeGenerated2026-10-12T09:14:52.000Z1OperationCreateRecordTypeExchangeItem2UserIdmaya.ortiz@harborline.example3Folder\DraftsSubjectRE: Invoice 4471 for October4AppIda8f3c2e1-4b7d-4e9a-8c61-0d2f5b9e3a…ClientIP203.0.113.1401Create: a new item, not Send2Her identity: the app acted on herbehalf3Where the item was created4The application that made the call

The service's own account: who, what, where, and through which application

The operation is Create: a new item. The folder is Drafts, and the subject is the reply's subject. That matches the assistant's claim. Nothing in this record says anything was sent. A send would be a different operation.

The user is maya.ortiz@harborline.example. The assistant acted on her behalf, so the service recorded the action under her identity. That's normal for assistants built into mail and productivity apps, and it has an important consequence: from the user field alone, you can't tell her own actions from the assistant's. The AppId, a8f3c2e1-4b7d-4e9a-8c61-0d2f5b9e3a17, is what distinguishes them. It identifies the application that made the call, which for an action Maya took herself in Outlook would be a different value.

The address, 203.0.113.140, is her office address from lesson 0.6, which fits an assistant running in her session from her machine. An assistant running in a cloud service would make calls from that service's addresses, and the ClientIP would show it. Lesson 0.6's rule applies: know what the address belongs to before joining on it.

The record's time, 09:14:52 UTC, is about five minutes after the upload in lesson 0.6 and twelve after the message arrived. That fits the story: the invoice came in, she saved it, and then asked the assistant to draft a reply. Lining the agent's actions up with the user's own, in UTC, is how you'd see whether the agent acted when asked or at some other time.

This record is generated for the course, in the field layout the platform's shared builders use for Microsoft 365 audit records. Real records carry more fields, and their exact values depend on the application and the tenant's settings. The investigator's questions are the same: what operation, on what object, by which identity, through which application, from where.

4

Checking the Claim Against the Record

Operation, folder and a count of sends: the record's answer

The assistant said it saved a draft and sent nothing. The mailbox record can be asked directly:

$ jq '{TimeGenerated, Operation, RecordType, AppId}' gen/agentAudit.json
{
  "TimeGenerated": "2026-10-12T09:14:52.000Z",
  "Operation": "Create",
  "RecordType": "ExchangeItem",
  "AppId": "a8f3c2e1-4b7d-4e9a-8c61-0d2f5b9e3a17"
}
$ jq '.Parameters | fromjson' gen/agentAudit.json
[
  {
    "Name": "Folder",
    "Value": "\\Drafts"
  },
  {
    "Name": "Subject",
    "Value": "RE: Invoice 4471 for October"
  }
]
$ jq -r 'select(.Operation == "Send" or .Operation == "SendAs")
    | .Operation' gen/agentAudit.json | wc -l
0

The record shows a Create operation of type ExchangeItem, by the application, with the folder \Drafts and the reply's subject in its parameters. And a count of send operations in the record returns zero. For this record, the claim holds: a draft was created and no send was recorded.

The check is narrower than it might look, and it's worth saying how narrow. It covers the records in front of you. A send through a different route, or a send recorded in a different record type, wouldn't appear in this one record. In a real case you'd search the user's mailbox audit records for the whole period, for every operation the application performed, and count those. Module 8 does exactly that across a full set of records.

It's also worth checking the draft itself, if the case needs it. The record says an item was created in Drafts with a given subject. Opening the draft, with the right authority, would show what the assistant wrote, which matters if the content is ever in question.

There's also a plant worth doing, as lesson 0.3 described for queries. Before trusting a count of zero sends, make sure the query would count a send if there were one: run it on a record you know is a send, or check the operation's name in the service's documentation. A zero from a query that couldn't have found anything isn't evidence.

The method is the point. Write down each claim the agent made. For each, name the service that would record it and the operation you'd expect. Then ask the service's records, and mark each claim confirmed, contradicted or not covered. It's the same discipline lesson 1.6 applies to a colleague's finding, applied to an agent's account of its own work.

Keep the list of claims in the case notes, with the result and the record beside each one. It shows a reviewer exactly what was checked, how, and against which record.

Two outcomes deserve particular care. A claim contradicted by the record means the agent's description was wrong, and that's a finding about the agent, worth reporting to whoever owns it. A claim the records don't cover means you don't know, and the case notes should say so rather than accept the claim by default.

5

The Interaction Record

What Microsoft's AI audit records hold, and what their documented example does not

Microsoft 365 can also record the interaction itself. Microsoft's documentation for auditing its Copilot interactions describes the record:

An AI interaction audit recordwhat Microsoft documents it holdingOperation: CopilotInteractionthat an interaction happenedAppHostwhich application hosted itAccessedResourcesthe files and emails it read for the requestContextswhere the user was: a file, a chatMessagesprompt and response IDs, flags; the example shows no text

What the interaction record documents, and the one thing an investigator might expect that its example omits

The operation is CopilotInteraction. AppHost names the application where the interaction happened, such as Word, Teams or Outlook. AccessedResources lists the files, documents and emails the assistant read to answer the request, which is exactly what an investigator needs when asking what an agent saw. Contexts describes where the user was, such as an open file or chat. And Messages lists the prompt and response messages by ID, with a flag saying which is which and another flagging a detected jailbreak attempt.

The documented example of Messages shows IDs and flags, not the text of the prompt or the response. An investigator who expects to read the conversation from the audit log may not find it there. Whether and where the text is retained depends on other settings and products, and it's something to check in each organization before a case needs it.

That gap matters because, for agents, the conversation is often the most important evidence. It shows what the user asked for, and it shows any instructions the agent picked up from content it read. Knowing in advance where conversations are kept, for how long and who can retrieve them is part of preparing to investigate agents, just as lesson 1.3 asked which logs an environment collects.

AccessedResources is the field to read first in most agent cases. It turns "the assistant read some of her mail" into a list of specific items, each of which can be examined. When an agent behaves strangely, the content it read just before is usually where the explanation is.

Interaction records and action records complement each other. The interaction record says the user asked something, in which app, and what the assistant read. The mailbox record says what changed. Together they connect the request to its consequences. Apart, each leaves a question open: an action with no interaction behind it, or an interaction whose consequences you can't find.

6

Whose Action Was It?

The user, the application, and the authority each one had
THE BLOCK HELD, AND AN AGENT FOUND ANOTHER WAYMaya OrtizMail assistantasks it toreplyHer mailbox, with her permissionsSend as MayaForwarding rulecreated by the agent×blockedsets up a rule insteadOutside addressCheck what the agent did with her permissions, not only the action that was blocked

An illustration, not this lesson's records: sending is blocked, so the assistant reaches the same result through another action it is allowed

The figure is an illustration, not this case: an assistant blocked from one action, reaching the same result through another it was allowed. It shows why the question of authority matters. Agents complicate a question investigations usually answer easily: who did this? In the records here, the user field names Maya, and the application field names the assistant. Both are true. Maya asked for the action, and the assistant performed it with her permissions.

If Maya did it herselfwhat the record would showUserIdmaya.ortiz@harborline.exampleAppIdher mail client's applicationAuthorityher own permissionsThe assistant, for herwhat this record showsUserIdmaya.ortiz@harborline.exampleAppIda8f3c2e1-4b7d-4e9a...Authorityher permissions, through its tools

The same user field either way: the application ID is what tells them apart

That has consequences beyond the records. An agent acting on behalf of a user can do anything the user can do through the tools it's been given, whether or not the user meant it to. If Maya can send mail as the finance team, so can an assistant acting for her, if its tools allow sending. Module 1's question about authority applies to agents too: what was this agent allowed to do, who granted that, and was the action within it?

The answer comes from configuration as much as from records. Which tools the agent had, which permissions those tools held, and whether any action needed the user's approval before it ran are all settings, decided by whoever deployed the agent. Microsoft's documentation describes testing tool permissions before publishing an agent. In an investigation, the question is what they actually were at the time.

For an investigation, that means collecting the agent's configuration as evidence alongside its records: its instructions, its tools, the permissions each tool held, and any approval steps. A copy taken at the time of the incident is far more useful than one taken weeks later, after the agent has been changed. Lesson 1.7's evidence habits apply to configuration just as they do to logs.

For a finding, the precise wording matters. "Maya Ortiz created a draft" is misleading, because she didn't do it herself. "The mail assistant created a draft in Maya Ortiz's mailbox, acting on her behalf, at her request" is accurate, and each part of it rests on a record: the request, the application ID and the user field.

Writing it that way also keeps the question of fault open, which is right at this stage. If the draft had been sent, the wording would let the investigation ask, without prejudging, whether the user asked for it, whether the assistant misread the request, or whether something it read told it to.

When the request isn't recorded, or the agent acted without one, the finding changes shape entirely. An action under a user's identity, through an assistant, that nobody asked for is exactly what Module 8's practical investigates.

7

Asking the Assistant What It Did

The same claim again, and why it is not evidence

When an agent's action is in question, it's tempting to ask the agent. Here's what that produces:

Mail assistantNew chat

Did you send that reply to the supplier?

No. As you asked, I only saved the reply in your Drafts folder. Nothing was sent.

Reply to Mail assistant...

Check before you use it

Asking the assistant again produces the same claim, not evidence for it. An assistant's description of its own actions can be wrong: it may have called a tool that behaved differently from the description, or retried, or been given instructions inside the content it read. The service's record is the evidence.

An illustrative exchange, written for this lesson: an assistant you ask will word it differently.

The answer is the same claim restated. It may well be true, and here the record agrees. But it isn't evidence, for the reasons the check panel gives. The assistant's description of its actions is generated text. The tool it called may have done something different from what the assistant described. It may have retried a failed call. It may have read an instruction in the content it processed and followed it. In each case, its account of itself could be wrong without any intent to mislead.

This is the same rule lesson 1.6 applied to people's claims, and it applies with more force to agents, because they produce confident, fluent descriptions of their own work. A user's memory of what they did can be checked against records. An agent's account must be.

Self-reports can also be wrong in the other direction. An agent may say it failed when its tool call actually succeeded, perhaps because the reply came back slowly or in an unexpected form. A user who believes the failure may ask it to try again, and the records then show the action twice. Duplicate actions with a failed claim between them are a common pattern in agent incidents, and only the service's records reveal it.

There's a useful role for asking, though. The assistant's answer is a list of claims to check, in its own words, and sometimes it reveals actions you didn't know to look for. Ask it what it did, write each claim down, and then check every one against the services' records, as section 4 did.

When the records and the agent disagree, the records win, and the disagreement is a finding. It tells the agent's owner something is wrong with its tools, its instructions or what it was given to read, which is often more important than the action that prompted the question.

Agents are also improving quickly, and many now show their steps: the tools they called, with what arguments and what came back. Those step logs are useful, and they're closer to evidence than a summary sentence, because they're produced by the system running the agent rather than composed by the model. They're still the agent's side of the story. The service at the other end of each tool call keeps its own record, and that's the one to check against.

Practice

Do

Practice

Check an agent's claim against the record
the agent and the record

Use the exchange in section 2 and the record in section 3. Everything you need is on the page, in those two sections.

If you use an assistant at work that acts on your behalf, try the same exercise on one of its actions. Find out where its actions are recorded and under which identity. Many people discover they don't know, which is the most useful thing the exercise can teach.

Do this Check an agent's claim against the record
  1. Write the claim. From section 3, write each action the assistant says it took, one per line.
  2. Find the record. For each, name the service that would record it and the operation you would expect.
  3. Compare. Using the record in section 4, mark each claim confirmed, contradicted or not covered by the records.
  4. Name the gap. For anything not covered, say which record would settle it and whether it is likely to exist.
You will have checked an agent's account of itself the way Module 8 does: claim by claim, against the service's records.

Lesson 0.9 moves from investigating to responding, the step that follows a finding: the stages of incident response, and a detection rule read as the logic it is, whatever language it's written in.