Skip to main content

Fixed: Microsoft Agent Framework Agent Turns a Remembered Preference into a Promise

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

My Microsoft Agent Framework agent remembered that an employee would rather hear about their tickets on Microsoft Teams. It added that to a new ticket, which was right, and then told the employee Updates: Microsoft Teams, as preferred, which wasn't: nothing in the service desk sends Teams messages. The memory said what the employee would like, and the agent reported it as what would happen.

What I Was Doing​

I was giving an IT service desk agent a memory in Part 16 of the IT Service Desk series. The agent saves lasting facts an employee shares, and a context provider adds them to the instructions of every run. Its instructions also said to put what it remembers into tickets:

ServiceDeskInstructions.cs (what you remember)
What you remember:
- You remember things about the employee from earlier conversations, and each request tells you what they are.
Use them when they help, so the employee doesn't have to repeat themselves. When you raise a ticket, include
what you remember that helps the IT team, such as where the employee works or how they like to be contacted.

In one conversation, the employee said they work from the Pune office on Tuesdays and Thursdays, and that they'd rather hear about their tickets on Microsoft Teams than by email. The agent saved both. In a new conversation, they asked: The Wi-Fi at the office keeps dropping on my laptop. I already reconnected to Dewiride-Corp, forgot the network and restarted the laptop. Please raise a ticket.

What I Expected​

A new ticket with both memories in its description, and an answer that says the ticket was raised and what it includes.

What I Got​

The ticket was right: its description ended with the office days and the Teams preference. The answer wasn't:

The agent's answer
Your Wi-Fi issue has been logged as ticket INC1003.

Status: New
Assigned to: Service desk
Updates: Microsoft Teams, as preferred

The ticket includes your Surface Laptop 7 details and the troubleshooting steps you already tried.

macOS-style window with two panes. Above, the instructions about memories, which say to include what you remember in tickets, such as how the employee likes to be contacted. Below, the agent's answer: Your Wi-Fi issue has been logged as ticket INC1003. Status: New. Assigned to: Service desk. Updates: Microsoft Teams, as preferred.

What I Checked​

What the service desk can do. The agent's tools look up devices and tickets, search the knowledge base, raise tickets and reset passwords. None of them sends a message on Microsoft Teams. The preference goes into the ticket, where the IT team reads it and decides how to reply. Updates: Microsoft Teams is a promise nobody can keep.

Whether it happens again. In an earlier run, with a ticket that already existed, the agent said Updates will be sent through Microsoft Teams. The wording changed; the promise didn't.

What the instructions said about preferences. They told the model to include how they like to be contacted in tickets, and nothing about what a preference means. The general rule Never invent Dewiride policies, ticket numbers or contact details was in the instructions too, and didn't prevent it.

Why It Happens​

The memory is written from the employee's side: Prefers to hear ticket updates on Microsoft Teams rather than email. The instructions told the model to put it in the ticket, but nothing told it what a preference means, and it reported the preference as an outcome. Once the instructions said what a preference is, the promise stopped.

The Fix​

Say what a preference is, right where the instructions talk about memories:

ServiceDeskInstructions.cs (what you remember)
- A preference you remember says what the employee would like, not what Dewiride will do. When you add one to
a ticket, say that you added it, and don't promise how or when the IT team will contact them.

After the Fix​

I emptied the memories, restarted the API and ran the same conversations again:

The agent's answer
Your ticket has been raised:

INC1003 — Office Wi-Fi keeps dropping on laptop

It’s currently New and assigned to the Service Desk. I added your Pune office schedule and preference for updates through Microsoft Teams.

macOS-style window with two panes. Above, the instructions with a second bullet: A preference you remember says what the employee would like, not what Dewiride will do. When you add one to a ticket, say that you added it, and don't promise how or when the IT team will contact them. Below, the answer: INC1003 raised, New and assigned to the Service Desk, and I added your Pune office schedule and preference for updates through Microsoft Teams.

The ticket still has the preference, and the answer says so without promising anything. I repeated it twice more, each time from an empty start: both answers said what the ticket included, such as I included the troubleshooting steps you already tried, your laptop details, Pune office days, and preference for updates via Microsoft Teams., and neither promised how updates would come.

Common Mistakes​

MistakeWhat happensDo this instead
Telling the agent to use preferences without saying what they areIt reports them as commitmentsSay a preference is what the employee would like, not what will happen
Removing preferences from tickets to stop the promiseThe IT team loses information it needsKeep them in the ticket, and change only how the agent talks about them
Testing the answer onceA model's wording changes from run to runRepeat the run a few times before calling it fixed

Troubleshooting​

SymptomLikely causeFix
The agent tells the employee how or when someone will contact themA remembered preference is reported as an outcomeAdd the preference rule to the instructions
The agent stops mentioning the preference at allThe rule is worded as don't mention preferencesAsk it to say that it added the preference to the ticket

FAQ​

Why not add a tool that sends Teams messages?​

That's a feature, not a fix: the promise came from the wording, and an agent that can't send Teams messages shouldn't say it will. If a later version sends updates on Teams, the instructions can say so then.

Is one line in the instructions enough?​

In my runs, yes: two of two answers promised Teams updates before the line, and none of three after it. Models don't follow instructions with certainty, so keep checking the answers when you change the instructions or the model.

Conclusion​

Updates: Microsoft Teams, as preferred came from a remembered preference that the agent reported as a promise. One line in the instructions, saying that a preference is what the employee would like and not what Dewiride will do, and that the agent should say it added the preference instead of promising anything, stopped it in every run since.

Additional Resources​