Best Practices for AI Agent Development and Deployment

microsoft · Tech · 2023 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Production AI agent design

Microsoft's agent-development guidance addresses teams that want to deploy production agents but risk giving them too much agency, too broad an environment, or tool choices before defining goals and constraints.

Constraints:

Architecture

The guidance recommends designing agents from first principles: define the agent's environment, goal, intended behavior, capabilities, and toolset on paper before coding. Start in a constrained state space, use off-the-shelf/no-code/function-calling tools before custom orchestration, keep humans in the loop for MVP actions, make the agent explain or simulate next steps before acting, and mix LLM steps with smaller models, traditional ML, regex, or synchronous/asynchronous workflow steps when those are more reliable or efficient.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  agent-goal[Agent goal] --> environment-definition[Environment definition]
  agent-goal --> tool-set[Tool set]
  environment-definition --> constrained-mvp[Constrained MVP]
  tool-set --> constrained-mvp
  constrained-mvp --> human-approval-gate[Human approval gate]
  human-approval-gate --> production-workflow[Production workflow]
  production-workflow --> monitoring[Monitoring]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Agent goal Written target outcome and intended behavior. Environment definition, Tool set
Environment definition Bounded state/action universe the agent can perceive and affect. Agent goal, Constrained MVP
Tool set Capabilities exposed to the agent through functions, APIs, or products. Agent goal, Constrained MVP
Constrained MVP Small landing space for early agent tests before broader action. Environment definition, Human approval gate
Human approval gate Stopgap where the agent explains or simulates actions before execution. Constrained MVP, Production workflow
Production workflow Orchestrated path mixing LLM calls, non-LLM steps, and monitoring. Human approval gate, Monitoring
Monitoring Production feedback for speed, reliability, and behavior. Production workflow

Data flow

A team first writes the agent's goal, environment, intended behavior, and available capabilities. It then gives the agent a small constrained task space, curated tools, and human approval gates. The workflow can include LLM calls, smaller language models, traditional ML, regex, synchronous or asynchronous orchestration steps, and production monitoring as reliability and latency are evaluated.

3 supporting quotes
“know what is your actual end goal um and and what is the intended behavior that you want the agent to undergo you've”transcript, stated
“needs a map right and and these are tools this is how an agent accomplishes its goal it's a tool uh a tool set right”transcript, stated
“each step on the orchestration whether synchronous or asynchronous it doesn't need to be every time there's a step”transcript, stated

Why this architecture

The guidance treats an agent as an autonomous actor, so production design starts with action boundaries and purpose rather than framework choice. Human gates and constrained environments reduce the damage radius while teams learn whether the agent is reliable, and mixed orchestration avoids forcing every step through an LLM.

3 supporting quotes
“some kind of an entity software or otherwise it's some kind of an entity that takes actions autonomously that has decision-making power and capabilities”transcript, stated
“agent raw web access out of the box just don't do it it's a bad idea it doesn't matter what safeguards you put”transcript, stated
“call or just language model call it can be a regular Rex it can be whatever you want it to be right and so whatever you”transcript, stated

Models used: Azure OpenAI · small language models · traditional machine learning

Scale

Alternatives considered (roads not taken)

Give the agent raw web access immediately

Rejected because: The speaker explicitly calls that a bad starting point regardless of safeguards.

“agent raw web access out of the box just don't do it it's a bad idea it doesn't matter what safeguards you put”transcript, stated

Skip directly from pen-and-paper MVP to custom orchestration code

Rejected because: The recommendation is to use off-the-shelf/function/no-code tools first and learn why they fail.

“an MVP if your MVP is pen and paper then the Step Beyond MVP is not like I'm going to code the SE chain please don't”transcript, stated

Use an LLM call for every workflow step

Rejected because: Some steps can be regular regex, traditional ML, or other optimized components.

“it doesn't need to be every time there's a step on the orchestration or a gentic workflow it has to be a llm call”transcript, stated

Patterns

human-in-the-loop-gate (governance)

The guidance recommends keeping humans in the loop for MVP agent actions and asking agents to explain next steps before acting.

“with generative AI always at the first duration for the MVP keep the human in the loop”transcript, stated

tool-use-orchestration (agent-design)

Agents are defined by the tools/capabilities they can use to accomplish goals.

“that is the capability of an agent right you're describing the things that they can do”transcript, stated

guardrails-io-filtering (safety)

The agent starts in a constrained environment rather than a broad state/action space.

“constrain the state space constrain the environment right see how successful you are with a small Landing space”transcript, stated

latency-optimization (production)

The guidance calls out the speed/reliability tradeoff in production agent workflows.

“we can get it fast but we can't get it reliable yeah once you start trying to shave off time then you start seeing the accuracy go down”transcript, stated

Tradeoffs

Start with human-gated MVPs

Chose agent explains/simulates before action over unreviewed autonomous action.

Rationale: Autonomous action is the risk, not the agent producing text.

“ask it to explain the next steps that it is in fact going to go do”transcript, stated

Use mixed orchestration

Chose LLMs plus SLMs, traditional ML, regex, synchronous/asynchronous steps over LLM-only workflows.

Rationale: Each step should use the most reliable and optimized mechanism.

“using a combination of small language models plus just traditional machine learning”transcript, stated

Constrain before broadening

Chose small landing space over broad state/action space from day one.

Rationale: Testing in a bounded environment reveals behavior before high-risk expansion.

“see how successful you are with a small Landing space before you go out and do a broader thing”transcript, stated

Gotchas (what bit them)

Too much agency at MVP time is dangerous.

Root cause: Agents act autonomously and can take real actions on behalf of users.

Resolution: Start with constrained environments and human approval gates.

“agents are designed to act autonomously that does not mean that they have to action that”transcript, stated

Broad support-agent context can create failure.

Root cause: Giving an agent the entire support corpus and live tickets before testing behavior creates too much state space.

Resolution: Cherry-pick lower-priority, clearly defined cases with bounded documentation first.

“you're not going to give it the whole compendium of your support documentation and start firing it at support tickets”transcript, stated
“cherry pick some of the lower priority support cases that are more clearly defined”transcript, stated

Framework/tool novelty can distract from solving the problem.

Root cause: Teams jump to custom chains before understanding how to action success fastest.

Resolution: Try simpler available tools and learn why they do or do not solve the problem.

“understand how to action success fastest so getting stuff off the shelf to do that”transcript, stated

Evaluation

The guidance evaluates agents through constrained MVP behavior, human review of proposed next actions, simulation/debug streams, support-case closure quality, production monitoring, and explicit speed/reliability tradeoff observation.

Metrics: human-reviewed next-step explanations · NPS or ticket-closure quality for bounded support cases · speed vs reliability/accuracy tradeoff · success in small constrained environments before expansion

3 supporting quotes
“whether you have a relatively High NPS on ticket closure or not”transcript, stated
“you could ask it to simulate its own activities”transcript, stated
“one of the very difficult parts of again walking that tight RPP of the tradeoffs is yeah we can get it fast but we can't get it reliable”transcript, stated

Outcomes

Guidance case: one concrete scale reference is prior Microsoft DRL platform work; most evidence is process-oriented rather than deployment-volume metrics.

3 supporting quotes
“what you're doing by practice of writing things down with agents is you're draw creating an MVP for an agent”transcript, stated
“thinking and architecting an agentic”transcript, stated
“go into production”transcript, stated