Deep Dive · XiaoHu Explains

How Microsoft Ships AI Agents at Enterprise Scale: Breaking a Production Agent into 5 Layers

Retrieval becomes a sub-agent that plans and retries; evaluation upgrades from "does it run" to "did it do it right"
60-Second Overview
  • Microsoft Core AI VP of Product Marco Casalaina detailed how the Microsoft Foundry platform supports over 80,000 enterprises building and running AI agents.
  • He breaks a production-grade agent system into 5 layers: the reasoning layer (swappable models), the agent runtime (orchestration loop), the observability and governance layer, the identity layer, and the context layer.
  • Retrieval has been redesigned as a planning, retrying "sub-agent" (agentic retrieval) — no longer the one-shot classic RAG that's done after a single lookup.
  • Evaluation upgrades from generic metrics (does it run) to rubric-based scoring targeting specific behaviors, paired with Agent Optimizer, which automatically rewrites prompts and swaps models to fix problems.
  • The piece offers two principles that don't depend on Foundry and any team can copy directly: retrieval should be built as a retryable loop, and any agent that takes action must have an auditable identity.
1From Prototype to Production

The demo that ran fine falls apart the moment it ships

On the Microsoft Foundry platform, more than 80,000 enterprises are already building and running AI agents; Microsoft's own Microsoft 365 Copilot runs on the same platform, serving over 20 million users.

To find out what it actually takes to get an agent "production-ready and able to withstand real traffic," ByteByteGo interviewed Microsoft Core AI VP of Product Marco Casalaina. His core conclusion boils down to one line: what holds up a production-grade agent is the entire "harness" wrapped around the model — and it matters just as much as the model itself.
Production agents are far more than the model
A production agent is far more than the model: there's a whole machine wrapped around it. Source: ByteByteGo × Microsoft
🎯
Why it's worth reading: 80,000 enterprises build agents on Foundry, Microsoft 365 Copilot serves over 20 million users, monthly active usage of in-house agents is up 6x this year, and the platform can call over 11,000 models. This is one of the rare cases where the production engineering details of a massive-scale agent deployment are laid out in public.
80K+
enterprises building AI agents on Microsoft Foundry
20M+
users served by Microsoft 365 Copilot
6x
growth in M365 Copilot's in-house agent MAU this year
11K+
models callable on Foundry (OpenAI/Anthropic/xAI/DeepSeek/MAI)

Marco starts with what's changed over the past two years: "We're moving past the Q&A phase of AI. In 2026, more and more customers are using voice as the front end, so we're also moving past the chatbot era." The old form and the new form are very different.

Old form · Chatbot
You type, it replies — it can only answer questions. When it gets something wrong, that's a bad experience.
New form · Agent
It actually gets things done for you: books meeting rooms, runs analysis, sends emails, opens tickets. The front end can even be voice — you don't type a single word. When it takes the wrong action, that's a business incident.
From chatbot to agent
From chatbot to agent: from just answering questions to actually getting things done. Source: ByteByteGo × Microsoft

This shift is exactly what makes the engineering problem completely different. A demo can be thrown together in a single evening — the model's smart enough, the test prompts all run fine, the demo looks impressive, and the pilot ships in a week. Where things actually crack is in production, which exposes problems the demo never could.

Unexpected questions
Things real users ask that you never imagined in the demo.
Stale documents
The material the agent depends on quietly goes out of date, and the answers go wrong with it.
The model quietly changes
A vendor ships an update, the agent's behavior shifts, and no one notices until customers complain.
No identity, no audit trail
The agent runs on a shared system account, so when something goes wrong, there's no way to trace who did it.
No guardrails, says anything
It confidently says something it shouldn't.
No observability
You have no idea whether quality is getting better or worse.
Failures that only surface in production
Failures that only surface in production and are never visible in a prototype. Source: ByteByteGo × Microsoft

Asked what the biggest lesson has been from running these systems, Marco's answer was: the harness matters as much as the model. The harness means the entire set of things wrapped around the model — the runtime, tools, context retrieval, identity layer, guardrails, evaluators, and deployment pipeline.

Models change every few weeks, and you can't treat that like a database version upgrade. Bump a Postgres version, and you can generally expect it to just work; models aren't like that — every model has its own quirks, and the harness has to be retuned to match. After Anthropic shipped Claude Opus 4.8, Microsoft's GitHub Copilot CLI team had to retune the harness and rerun the evaluation suite before they could ship it.

Every new model release means retuning the harness
The moment a new model ships, the harness has to be retuned and re-evaluated before switching over. Source: ByteByteGo × Microsoft
2Unpacking the Harness

5 layers of foundation: the model is just the base