PracticeVideosBlogFlashcards

3.1 Agentic Solutions: Foundry Agent Service and the Microsoft Agent Framework

Key Takeaways

  • Domain 3 (Implement an agentic solution) is an explicit 5-10% AI-102 domain added in the April 30, 2025 outline; it kept its name and 5-10% weight in the final December 23, 2025 outline, which renamed its agent tooling. Older notes omit it.

  • Foundry Agent Service is the MANAGED, hosted single-agent runtime; the Microsoft Agent Framework is the open-source SDK (AutoGen + Semantic Kernel converged) for code-first multi-agent orchestration.

  • Every agent = model + instructions + tools (function, code_interpreter, file_search, bing_grounding, OpenAPI) + stateful conversations (threads in the classic API).

  • Multi-agent orchestration patterns to know: sequential, concurrent, group chat, handoff, and Magentic (dynamic manager-led planning).

  • A function_call output item (requires_action in the classic thread/run API, retiring March 31, 2027) means the agent is waiting for your code to run a tool and return its output - it is not an error or completion; secure every tool with managed identity and least privilege.

Last updated: October 2026

Quick Answer: Domain 3 (Implement an agentic solution, 5-10%) tests building autonomous, tool-using agents. The two pillars are the Microsoft Foundry Agent Service (the managed, hosted runtime for single agents) and the Microsoft Agent Framework (the open-source SDK — the convergence of AutoGen and Semantic Kernel — for code-first single- and multi-agent orchestration). Know the agent anatomy (model + instructions + tools + conversations), the function-call tool loop (requires_action in the classic API), and the multi-agent orchestration patterns (sequential, concurrent, group chat, handoff, and Magentic).

Where This Sits on AI-102

Agentic solutions are a small but explicit domain — 5-10%, the lowest-weighted of the six skill areas — on a 100-minute exam, passing at 700/1000 for about US$165. It became a named domain in the April 30, 2025 outline and kept its name and 5-10% weight in the final December 23, 2025 revision, which renamed its agent tooling (Azure AI Agent Service, Semantic Kernel and AutoGen became Microsoft Foundry Agent Service and Microsoft Agent Framework), so older study notes omit it. Microsoft retired the AI-102 exam on June 30, 2026; AI-103 replaced it.

Agent Anatomy

An agent is an LLM wrapped with instructions, tools, and persistent memory so it can plan and act over multiple steps rather than answer once. Every agent is assembled from four parts:

PartRoleExample
ModelThe reasoning engine (a deployment)gpt-4o, o3-mini
InstructionsSystem persona and rules"You are a refunds assistant; never exceed $500."
ToolsCapabilities the agent may invokefunction, code_interpreter, file_search, bing_grounding, OpenAPI tools
Conversations (threads in the classic API)Stateful conversation memoryRecalls earlier user constraints across responses

Built-in tools matter on the exam: code_interpreter runs sandboxed Python (data analysis, charts); file_search is managed RAG over uploaded files with automatic chunking and citations; function tools call your own APIs; bing_grounding and OpenAPI tools reach external web and REST services. Prefer a built-in tool over hand-rolled code when one fits the requirement.

Foundry Agent Service vs. Microsoft Agent Framework

This comparison is the highest-value distinction in Domain 3:

DimensionFoundry Agent ServiceMicrosoft Agent Framework
What it isManaged, hosted agent runtime in Microsoft FoundryOpen-source SDK + runtime (Python and .NET)
HostingMicrosoft hosts agent versions, conversations, and stateYou host and deploy (local, container, anywhere)
Best forSingle enterprise agents with governance, identity, and tracing built inCode-first, complex multi-agent orchestration and custom workflows
LineageSuccessor to the retired Assistants APIConverges AutoGen (multi-agent research) + Semantic Kernel (enterprise plugins/memory)
OrchestrationConnected/sub-agentsSequential, concurrent, group-chat, handoff, Magentic patterns

On the Exam: "Managed, governed, single agent fast" → Foundry Agent Service. "Code-first, several specialized agents collaborating, custom control flow" → Microsoft Agent Framework. If a scenario names AutoGen or Semantic Kernel, the modern answer is to migrate to the Microsoft Agent Framework, which unifies both — do not pick the legacy SDKs as a new build target.

Multi-Agent Orchestration Patterns

A single agent struggles with broad, multi-skill tasks; multi-agent systems decompose work across specialists. Memorize the named patterns:

PatternFlowWhen to use
SequentialAgent A's output feeds Agent B, then CPipelines: research → draft → edit
ConcurrentSeveral agents run in parallel on the same inputGather independent perspectives, then merge
Group chatAgents converse in a shared thread, a manager picks who speaksBrainstorming, debate, review boards
HandoffOne agent transfers control to a more specialized agentTriage routing (billing → technical)
MagenticA manager agent plans, delegates, and re-plans dynamicallyOpen-ended tasks with no fixed steps

The Tool-Call Loop

In Foundry Agent Service the heartbeat is: create an agent version → create a conversation → create a response. When the agent decides to call one of your functions, the response returns a function_call item and waits: your code executes the tool and sends a function_call_output item with the same call_id, looping as many times as the task needs. The classic threads-and-runs API (deprecated, retiring March 31, 2027) showed this pause as a run in requires_action until you called submit_tool_outputs.

while any(item.type == "function_call" for item in response.output):
    outputs = [{"type": "function_call_output", "call_id": item.call_id,
                "output": json.dumps(run_tool(item.name, json.loads(item.arguments)))}
               for item in response.output if item.type == "function_call"]
    response = openai.responses.create(conversation=conversation.id, input=outputs)

Common Trap: In the classic API, requires_action is not an error and not completion — it means "the agent is waiting for your tool output." A question showing a run stuck at requires_action is testing whether you know to submit tool outputs, not to retry or fail.

Securing and Testing Agents

Autonomy multiplies risk: every tool an agent can call is an attack surface. Authenticate agents and their downstream tools with managed identity (never embedded keys), scope each tool to least privilege, and wrap inputs/outputs with Content Safety (prompt shields for injection arriving through tool data, harm filters on responses). Use Foundry's tracing and evaluation to test runs: inspect each step's tool calls and intermediate reasoning, score task completion, and watch token cost — agents loop, so an unbounded tool loop or a runaway multi-agent group chat can be far more expensive than a single chat completion.

Always choose the simplest design that meets the requirement: a single function call beats an agent, and one agent beats a multi-agent system, unless the task genuinely needs dynamic multi-step tool use.

Test Your Knowledge

A team needs a single, governed customer-support agent with built-in identity, tracing, and managed hosting, and minimal infrastructure work. Which option fits best?

A

Microsoft Foundry Agent Service

B

The legacy LUIS orchestration workflow

C

A hand-built polling loop over raw chat completions

D

Deploying AutoGen directly to a self-managed VM

Test Your Knowledge

You must orchestrate several specialized agents in code with custom control flow, and you want the modern unified SDK rather than the legacy research and enterprise toolkits. What should you use?

A

Azure OpenAI On Your Data

B

Microsoft Agent Framework

C

Azure AI Search semantic ranker

D

Custom Vision compact-domain export

Test Your Knowledge

In which multi-agent orchestration pattern does a manager agent dynamically plan, delegate to specialists, and re-plan as results come back, rather than following a fixed sequence?

A

Sequential

B

Concurrent

C

Magentic

D

Handoff

Test Your Knowledge

In the classic Foundry Agent Service threads-and-runs API (deprecated, retiring March 31, 2027), an agent run is stuck at status requires_action. What is the correct interpretation and response?

A

The run failed; restart it from the beginning

B

The run completed; read the final message

C

The model hit its content filter; lower strictness

D

The agent is waiting for your code to execute the requested tool and submit the outputs

Sections you finish are checked off in the contents.