AI Agents for Beginners - 2. Explore Agentic Frameworks
A comparison of Microsoft Agent Framework and Azure AI Agent Service — modular components, multi-agent collaboration, and when to use each for building production AI agents.
June 8, 2026
AI Agents for Beginners - 2. Explore Agentic Frameworks
This article is a summary based on Lesson 02 of Microsoft's AI Agents for Beginners course.
What are AI Agent Frameworks?
An AI Agent Framework is a software platform designed to simplify the creation, deployment, and management of AI agents.
It provides a standardized approach, pre-built components, and tools to solve common challenges when developers build complex AI systems.
It provides a standardized approach, pre-built components, and tools to solve common challenges when developers build complex AI systems.
While traditional AI frameworks also help integrate AI into applications, AI agent frameworks take it a step further.
Capabilities provided by Traditional AI Frameworks:
| Capability | Description | Example |
|---|---|---|
| Personalization | Analyzes user behavior and preferences → provides tailored recommendations and experiences | Content recommendations based on Netflix viewing history |
| Automation & Efficiency | Automates repetitive tasks, streamlines workflows | Automatically handling common inquiries with CS chatbots |
| Enhanced UX | Enhances user experience through voice recognition, NLP, and predictive text | Siri and Google Assistant voice commands |
Core additional capabilities provided by AI Agent Frameworks:
| Capability | Description |
|---|---|
| Agent Collaboration | Multiple agents collaborate and communicate to solve complex tasks together |
| Task Automation | Automates multi-step workflows, task delegation, and dynamic task management |
| Contextual Adaptation | Understands context and adapts to environments with real-time information to make decisions |
How to Prototype and Iterate Quickly
There are three key strategies to prototype and iterate quickly.
Modular Components
AI SDKs provide pre-built components such as AI connectors, tool definitions, memory modules, and prompt templates.
Instead of building from scratch, you can assemble them to quickly create prototypes.
Instead of building from scratch, you can assemble them to quickly create prototypes.
An example using
AzureAIProjectAgentProvider from the Microsoft Agent Framework:modular_agent.pypython
modular_agent.py FlowMermaidflowchart TD User["User\n'Go to New York on Jan 1, 2025'"] --> Provider["AzureAIProjectAgentProvider\ncreate_agent(tools=[book_flight])"] Provider --> Agent["travel_agent"] Agent --> LLM["LLM\nAnalyze request → decide to call book_flight"] LLM --> Tool["book_flight(date, location)"] Tool --> Agent2["Agent\nReceive result → generate response"] Agent2 --> Response["'Travel was booked to New York on Jan 1'"]
Notice how the pre-built parser extracts key information (origin, destination, date) from user input.
Thanks to this modular approach, you can focus purely on high-level logic.
Thanks to this modular approach, you can focus purely on high-level logic.
Collaborative Tools
You can assign specialized roles to multiple agents and design them to collaborate with each other.
multi_agent.pypython
multi_agent.py FlowMermaidflowchart TD Task["Task: Retrieve sales data for Q4"] --> AgentR["dataretrieval agent\ntool: retrieve_tool"] AgentR --> R1["retrieval_result"] R1 --> AgentA["dataanalysis agent\ntool: analyze_tool"] AgentA --> R2["analysis_result\n(final insights)"]
As each agent performs specialized functions and chains their results, task efficiency and performance improve.
Real-Time Learning
Advanced frameworks enable agents to dynamically adjust their behavior based on what they learn from interactions.
By analyzing user feedback, environmental data, and task outcomes, they can update their knowledge base and establish a feedback loop for continuous improvement.
By analyzing user feedback, environmental data, and task outcomes, they can update their knowledge base and establish a feedback loop for continuous improvement.
Microsoft Agent Framework vs Azure AI Agent Service
Let's compare the two primary approaches covered in this course.
Microsoft Agent Framework (MAF)
A streamlined SDK centered around
It provides tool calling, conversation management, and Azure identity integration powered by Azure OpenAI models, allowing you to build production-ready agents quickly.
AzureAIProjectAgentProvider.It provides tool calling, conversation management, and Azure identity integration powered by Azure OpenAI models, allowing you to build production-ready agents quickly.
Core Components:
Agents — Created with
create_agent(), configuring name, instructions, and tools:maf_agent.pypython
maf_agent.py FlowMermaidflowchart LR Setup["create_agent(name, instructions)"] --> Agent["Agent instance\n(my_agent)"] Agent --> Run["agent.run('Hello, World!')"] Run --> Response["Response text"]
Tools — Define tools as Python functions and register them with agents. The agent automatically invokes them based on context:
maf_tool.pypython
maf_tool.py FlowMermaidflowchart TD Func["Define get_weather(location)"] --> Register["create_agent(tools=[get_weather])"] Register --> Agent["weather_agent"] User["User message"] --> Agent Agent --> LLM["LLM\nDecide whether to call tool"] LLM -->|"Call automatically if needed"| Func2["get_weather(location)"] Func2 --> Agent Agent --> Response["Response"]
Multi-Agent Coordination — Combine multiple agents with distinct roles to divide and conquer complex tasks:
maf_multi_agent.pypython
maf_multi_agent.py FlowMermaidflowchart TD Input["'Plan a trip to Paris'"] --> Planner["planner agent\nBreak down complex tasks into steps"] Planner --> Plan["plan (step-by-step text)"] Plan --> Executor["executor agent\nExecute steps using tools"] Executor --> Result["Final result"]
Azure Identity Integration — Authenticate securely without API keys using
AzureCliCredential or DefaultAzureCredential.Azure AI Agent Service
Announced at Microsoft Ignite 2024, this is a platform service for building and deploying agents within Azure Foundry.
You can directly use open-source LLMs like Llama 3, Mistral, and Cohere, and it provides enterprise-grade security and data storage.
You can directly use open-source LLMs like Llama 3, Mistral, and Cohere, and it provides enterprise-grade security and data storage.
Core Components:
Agent — Created with
project_client.agents.create_agent(), specifying the model and tools.Thread & Messages — A thread represents a conversation between an agent and a user.
Submit tasks to the agent with
Submit tasks to the agent with
create_and_process_run(), and receive responses via messages:azure_ai_agent_service.pypython
azure_ai_agent_service.py FlowMermaidzenuml title azure_ai_agent_service.py Flow Client->AgentService: create_agent(model, name, tools) Client->AgentService: create_thread() Client->AgentService: create_message(thread_id, user_input) Client->AgentService: create_and_process_run(thread_id, agent_id) AgentService->LLM: process request with tools LLM->AgentService: tool calls and response AgentService->Client: list_messages() returns response
Why the Thread/Message structure matters:
- Maintains conversation state (context) across multiple turns
- Responses can take various forms, including text, images, and files
- Operates seamlessly integrated with MAF (
AzureAIProjectAgentProvider)
Which One to Use?
These two approaches are not mutually exclusive. Using them together is recommended.
MAF vs Azure AI Agent ServiceMermaidflowchart TD Start["What do you need?"] --> Q1{Quick start\nwith simple API?} Q1 -->|Yes| MAF["Microsoft Agent Framework\nAzureAIProjectAgentProvider\nRapid prototyping"] Q1 -->|No| Q2{Enterprise deployment\nor Azure integrations?} Q2 -->|Yes| AAAS["Azure AI Agent Service\nAzure Search / Bing / Functions\nEnterprise scale"] Q2 -->|No| Q3{Multi-model support?\nLlama / Mistral / Cohere} Q3 -->|Yes| AAAS Q3 -->|No| MAF MAF -->|"Prototype done"| Both["Deploy via\nAzure AI Agent Service"] AAAS --> Both
Comparison Summary:
| Framework | Focus | Use Cases |
|---|---|---|
| Microsoft Agent Framework | Streamlined agent SDK (tool calling, conversation mgmt) | Rapid prototyping, multi-step workflows, enterprise integration |
| Azure AI Agent Service | Platform service (multi-model, enterprise security, built-in tools) | Secure, scalable agent deployment, Azure ecosystem integration |
Recommended strategy: Quickly develop agent logic with MAF, and deploy to production with Azure AI Agent Service
Summary
Lesson 02 SummaryMermaidflowchart LR Root["Agentic Frameworks"] Root --> Why["Why Frameworks?"] Root --> Prototype["Rapid Prototyping"] Root --> Compare["MAF vs AAAS"] Why --> W1["Agent Collaboration"] Why --> W2["Task Automation"] Why --> W3["Contextual Adaptation"] Prototype --> P1["Modular Components"] Prototype --> P2["Collaborative Tools"] Prototype --> P3["Real-Time Learning"] Compare --> M1["MAF\nSDK / Rapid development"] Compare --> M2["AAAS\nPlatform / Enterprise"] Compare --> M3["Recommended to use together"]
- AI Agent Frameworks go beyond traditional AI to enable autonomous multi-agent systems
- Iterate and improve quickly with Modular Components, Collaborative Tools, and Real-Time Learning
- MAF is optimized for rapid development, while Azure AI Agent Service is optimized for enterprise deployment
- Using both together is the recommended strategy