Microsoft has unveiled the Microsoft Agent Framework in Public Preview, introducing a unified, open-source SDK and runtime that brings together the strengths of AutoGen and Semantic Kernel. This powerful combination enables developers to build intelligent, multi-agent systems with robust orchestration capabilities tailored for enterprise scenarios. Whether you’re exploring autonomous agents or scaling AI-driven workflows, this framework lays the foundation for building smarter, more collaborative solutions.
Overview:
Microsoft just launched the 𝐌𝐢𝐜𝐫𝐨𝐬𝐨𝐟𝐭 𝐀𝐠𝐞𝐧𝐭 𝐅𝐫𝐚𝐦𝐞𝐰𝐨𝐫𝐤 in 𝐏𝐮𝐛𝐥𝐢𝐜 𝐏𝐫𝐞𝐯𝐢𝐞𝐰 — an open-source SDK + runtime that unifies AutoGen and Semantic Kernel to help developers build intelligent, multi-agent systems with enterprise-grade orchestration.
As a Cloud Solution Architect, I see this as a major step forward in bridging the gap between prototype and production — empowering developers and giving leaders the confidence to scale responsibly.
Memory, collaboration, and orchestration — all in one modular SDK.
Getting Started with Microsoft Agent Framework
This post reflects my personal experience and perspective as a Cloud Solution Architect working with AI agents. For deeper context, refer to my previous blogs on Semantic Kernel, AutoGen, and multi-agent systems at singhrajeev.com
AI Agents Overview
AI agents are evolving rapidly — no longer limited to chatbots or copilots. They now act as autonomous components capable of reasoning, invoking tools and APIs, collaborating with other agents, and adapting dynamically.
In my previous blogs on Semantic Kernel and AutoGen, I’ve explored how agents can be designed to retrieve information, enforce compliance, and even brainstorm together. These agents are becoming the next layer of application logic.
📌 If you’re new to these concepts or want to explore more about how I’ve used Semantic Kernel and AutoGen in real-world scenarios, check out my earlier blog posts at singhrajeev.com
Why Another AI Agent Framework?
Having worked extensively with both Semantic Kernel and AutoGen, I’ve seen their strengths and limitations firsthand. Semantic Kernel provided a stable, enterprise-ready SDK with connectors and observability. AutoGen, on the other hand, unlocked powerful multi-agent orchestration patterns — enabling agents to debate, reflect, and collaborate.
But each had trade-offs: SK was robust but rigid, AutoGen was flexible but fragile. This is something I’ve written about in detail on my blog — how SK’s structure sometimes limited experimentation, while AutoGen’s flexibility required extra effort to make production-ready.
The Microsoft Agent Framework is a thoughtful evolution. It doesn’t replace SK or AutoGen — it builds on them. It merges the enterprise-grade stability of SK with the orchestration power of AutoGen, giving developers a unified foundation to build, deploy, and scale agentic applications.
Why This Matters
This framework simplifies the journey from prototype to production. It offers:
- A consistent abstraction for agents, tools, memory, and workflows.
- Built-in observability, approvals, and CI/CD integration.
- Declarative agent definitions using YAML/JSON.
- Pluggable memory and open standards like MCP, A2A, and OpenAPI.

To know about the details, refer this blog: Introducing Microsoft Agent Framework: The Open-Source Engine for Agentic AI Apps | Azure AI Foundry Blog
When to Use an AI Agent?
AI agents shine when tasks are dynamic, underspecified, and require adaptive reasoning. If your application involves autonomous decision-making, ad hoc planning, or conversation-driven interactions, this is where Microsoft Agent Framework becomes your best friend.
Use Microsoft Agent Framework when you need:
- Multi-agent orchestration with enterprise-grade reliability.
- Deep integration with Microsoft 365, Azure AI Foundry, or other enterprise systems.
- A unified SDK that bridges experimentation and production.
Why AI Agents?
Unlike traditional automation, AI agents thrive in scenarios where the path to success isn’t predefined. They explore, learn, and collaborate with users in real time. Think of them as intelligent teammates rather than rigid scripts.
Here are some real-world scenarios where AI agents excel:
- Customer Support: Handle multimodal queries (text, voice, images), fetch data from tools, and respond naturally.
- Education & Tutoring: Deliver personalized learning by tapping into external knowledge bases.
- Code Generation & Debugging: Assist developers with implementation, reviews, and troubleshooting.
- Research Assistance: Aggregate insights from multiple sources, summarize documents, and accelerate analysis.
When NOT to use an AI agent?
If your task is highly structured, predictable, and rule-based, an AI agent may add unnecessary complexity and cost. For example:
If you can write a simple function, do that instead.
Tasks requiring 20+ tools or rigid workflows? Consider workflow orchestration instead of a single agent.
Deep Dive on Microsoft Agent Framework:
Introduction to Microsoft Agent Framework | Microsoft Learn
The Microsoft Agent Framework is more than just another SDK—it’s the unified foundation for building AI agents and multi-agent workflows in .NET and Python. Think of it as the next evolution of Semantic Kernel and AutoGen, combining their strengths while adding enterprise-grade capabilities for scale, security, and flexibility.
Modern AI applications need more than a single agent answering questions. They require collaboration, tool integration, and structured workflows for complex tasks. This framework delivers exactly that.
Core Capabilities
The Agent Framework offers two primary categories of capabilities:
- AI Agents
Individual agents powered by LLMs that:- Process user inputs.
- Make decisions.
- Call tools and MCP servers for actions.
- Generate responses using providers like Azure OpenAI, OpenAI, and Azure AI.
- Workflows
Graph-based orchestration that:- Connects multiple agents and functions.
- Handles multi-step tasks with type-based routing, nesting, and checkpointing.
- Supports human-in-the-loop scenarios for reliability.
Building Blocks
The framework includes:
- Model Clients for chat completions and responses.
- Agent Thread for state management.
- Context Providers for memory.
- Middleware for intercepting actions.
- MCP Clients for tool integration.
Together, these components give developers the flexibility to build interactive, robust, and safe AI applications.
AI Agents
What is an AI agent?
An AI agent uses an LLM to process user inputs, make decisions, call tools and MCP servers to perform actions, and generate responses.
An AI agent is your intelligent operator—it uses an LLM to:
- Understand user input.
- Decide what actions to take.
- Invoke tools and external services.
- Respond naturally.
Agents can be enhanced with threads, context providers, and middleware for advanced capabilities like memory and observability.
The following diagram illustrates the core components and their interactions in an AI agent:

An AI agent can also be augmented with additional components such as a thread, a context provider, and middleware to enhance its capabilities.
What is a Workflow?
A workflow is the backbone of structured orchestration in the Microsoft Agent Framework. Unlike a single AI agent that operates dynamically, a workflow defines a predefined sequence of operations—bringing consistency and reliability to complex processes.
Workflows are ideal for:
- Long-running tasks that involve multiple steps.
- Multi-agent collaboration where different agents handle specialized roles.
- Human-in-the-loop scenarios for approvals or interventions.
- Integration with external systems for enterprise-grade automation.
Why Workflows Matter
They give developers control over execution paths, enabling:
- Explicit sequencing for predictable outcomes.
- Conditional routing for dynamic decisions.
- Nesting and checkpointing for resilience.
- Concurrent execution for efficiency.
Think of workflows as blueprints for orchestration—you can embed AI agents as components while maintaining strict governance over the process.
The following diagram illustrates an example of a workflow that connects two AI agents and a function:

Workflows can also express dynamic sequences using conditional routing, model-based decision making, and concurrent execution. This is how our multi-agent orchestration patterns are implemented. The orchestration patterns provide mechanisms to coordinate multiple agents to work on complex tasks that require multiple steps and decision points, addressing the limitations of single agents.
More details on workflow, another day.
Let us know have a Quickstart on Agent Framework.
Quick Start
Let us set up a basic agent using the Agent Framework and Azure OpenAI.
Before we get started with Demo details, let us understand the various Agent Types:
| Agent Types | Description |
| Azure AI Agent [AI Foundry Agent] | An agent that uses the Azure AI Agents Service as its backend. |
| Azure OpenAI Chat Completion | An agent that uses the Azure OpenAI Chat Completion service. |
| Azure OpenAI Responses | An agent that uses the Azure OpenAI Responses service. |
| OpenAI Chat Completion | An agent that uses the OpenAI Chat Completion service. |
| OpenAI Responses | An agent that uses the OpenAI Responses service. |
| OpenAI Assistants | An agent that uses the OpenAI Assistants service. |
| Any other ChatClient | You can also use any other chat client implementation to create an agent. |
We will be covering the creation of Azure AI Foundry agents here.
Prerequisites
- Visual Studio Code
- Python 3.10+
- Azure AI Foundry Project
- Azure OpenAI
- Install the Agent Framework SDK
Create a virtual environment, activate it and then run below command.
pip install agent-frameworkWhat’s Installed in Your Agent Framework?
-m pip list
Complete Agent Framework installation with 168 packages:
Core AI/Agent Packages:
- azure-ai-agents (1.2.0b5) – Azure AI Agents SDK
- openai (1.109.1) – OpenAI API client
- langchain-core (0.3.78) – LangChain core functionality
- langchain-openai (0.3.34) – OpenAI integration for LangChain
- langgraph (0.6.8) – Agent workflow orchestration
Web Framework & UI:
- fastapi (0.118.0) – Modern web API framework
- gradio (5.49.0) – UI for ML applications (now compatible!)
- pydantic (2.11.10) – Data validation and serialization
Key Dependencies:
- Compatible versions of aiofiles (24.1.0) and websockets (15.0.1)
- All Azure SDK packages for AI services
- Database connectors (Redis, Qdrant)
- Monitoring and telemetry tools
Demo1: Create a simple agent (Azure AI Agent/Azure AI Foundry Agent)
This sample demonstrates how to create and use a simple AI agent with Azure AI as the backend. It will create a basic agent using ChatAgent with AzureAIAgentClient and custom instructions.
The simplest way to create an agent using ChatAgent with AzureAIAgentClient. It automatically handles all configuration using environment variables.
Creating Environment Variables:
Set the following environment variables:
- AZURE_AI_PROJECT_ENDPOINT: Your Azure AI project endpoint
- AZURE_AI_MODEL_DEPLOYMENT_NAME: The name of your model deployment
Note: We will be using Azure AI Project approach to connect with Azure OpenAI services, it is recommended approach when you are working with Agents, complex agent workflows, multiple AI services integrations etc.
Refer to the ReadMe.md file for more details for setting up Azure AI Foundry Projects and Model Deployment.
Demo Code
import asyncio
import os
from dotenv import load_dotenv
from agent_framework import ChatAgent
from agent_framework.azure import AzureAIAgentClient
from azure.identity.aio import AzureCliCredential
# Load environment variables from .env file
load_dotenv()
async def main():
async with (
AzureCliCredential() as credential,
ChatAgent(
chat_client=AzureAIAgentClient(async_credential=credential),
instructions="You are good at telling jokes."
) as agent,
):
result = await agent.run("Tell me a joke about a pirate.")
print(result.text)
if __name__ == "__main__":
asyncio.run(main())
Here’s a breakdown of our demo code using the new Microsoft Agent Framework.
- AzureCliCredential: Authenticates using your Azure CLI session. This avoids hardcoding secrets and supports secure access to Azure services.
- AzureAIAgentClient: Connects to Azure OpenAI using the credential. It wraps the LLM backend and handles communication.
- ChatAgent: Represents the agent itself. It’s initialized with instructions and the chat client. It manages the conversation flow.
- agent.run(…): Sends a prompt to the agent. The agent uses the LLM to generate a response based on its instructions and the input.
- result.text: Extracts the final response from the agent and prints it.
This structure supports streaming, observability, and orchestration out of the box.
Output:

View your agent in AI Foundry!

More Examples:
More examples can be found here:
- Getting Started with Agents: basic agent creation and tool usage
- Chat Client Examples: direct chat client usage patterns
- Getting Started with Workflows: basic workflow creation and integration with agents
This folder contains examples demonstrating how to create and use agents with different chat clients from the Agent Framework. Each sub-folder focuses on a specific provider and client type, showing various capabilities like function tools, code interpreter, thread management, structured outputs, image processing, web search, Model Context Protocol (MCP) integration, and more.
You can also get started with folder azure_ai/ that has an Azure AI Foundry example.
agent-framework/python/samples/getting_started/agents/azure_ai at main · microsoft/agent-framework
The simplest way to create an agent using ChatAgent with AzureAIAgentClient. It automatically handles all configuration using environment variables.
Demo2: Multi Agent using Agent-Framework
It’s time now to recap our previous example of FoodAgent and MealSuggestion and build agent using Agent-Framework.
Refer my blog for a quick recap:
Multi Agent without any orchestration Layer:
Multi Agent with Semantic Kernal:
Demo Code
1. Agent Creation – The Foundation
# Simple agent creation with specialized instructions
self.food_agent = ChatAgent(
chat_client=self.food_agent_client,
name="FoodExpertAgent",
instructions="You are a Food & Nutrition Expert..."
)
self.meal_agent = ChatAgent(
chat_client=self.meal_agent_client,
name="MealPlanningAgent",
instructions="You are a Meal Planning Specialist..."
)Agent Framework makes creating specialized agents incredibly simple – just define the role and expertise in natural language.
2. Intelligent Query Routing – The Brain
async def process_query(self, user_input):
intent = self.detect_intent(user_input)
if intent == "food_expert":
result = await self.food_agent.run(user_input)
return {"agent": "Food Expert", "response": result.text}
else:
result = await self.meal_agent.run(user_input)
return {"agent": "Meal Planner", "response": result.text}Smart routing ensures queries reach the most qualified agent automatically.
3. Agent Execution – The Magic
async def process_query(self, user_input):
intent = self.detect_intent(user_input)
if intent == "food_expert":
result = await self.food_agent.run(user_input)
return {"agent": "Food Expert", "response": result.text}
else:
result = await self.meal_agent.run(user_input)
return {"agent": "Meal Planner", "response": result.text}One simple .run() call executes the agent with full Azure AI power behind it.
4. Multi-Agent Coordination – The Power
async def multi_agent_query(self, user_input):
# Both agents work on the same problem simultaneously
food_task = self.food_agent.run(f"Analyze nutrition: {user_input}")
meal_task = self.meal_agent.run(f"Suggest meals for: {user_input}")
# Concurrent execution for comprehensive analysis
food_result, meal_result = await asyncio.gather(food_task, meal_task)Multiple agents can collaborate on complex problems, each contributing their expertise.
5. Agent Persistence – The Efficiency
def register_agent(self, agent_name, agent_type):
registry = self.load_registry()
registry[agent_name] = {
"type": agent_type,
"created_at": time.time(),
"status": "active"
}
self.save_registry(registry)Agents persist across sessions – create once, use many times.
Refer to my Repo for the detailed code and set up instructions: Repo Link
Output:
It’s time now to run the code:
You can view your agents in AI Foundry under section: Create and debug your agents

Prompt:
How many calories are in a banana?

Test in Agent Playground:

Prompt:
Suggest a healthy vegetarian lunch

Tracing:


Conclusion
Microsoft Agent Framework is the natural evolution of Semantic Kernel and AutoGen. It brings together innovation and stability, enabling developers to build intelligent, scalable, and enterprise-ready agents. Whether you’re prototyping locally or deploying at scale, this framework provides the tools and structure needed to succeed.
Agent Framework transforms AI development from infrastructure wrestling to pure creativity. We’ve seen how 3 lines create specialists, how routing becomes invisible, and how collaboration happens naturally.
The real breakthrough isn’t the technology – it’s the mindset shift. When creating AI agents is as simple as describing their job, we stop asking “How?” and start asking “What if?”
What’s next?
🚀 Agent Framework Blog Series – Feature Exploration Plan
What These Features Are:
Agent Framework includes revolutionary capabilities that are currently in preview/roadmap – features that will transform enterprise AI development from experimental to production-ready at scale.
Upcoming Coverage Plan:
1. 🔄 “SK + AutoGen = One Framework”
Feature: Unified SDK combining Semantic Kernel’s planning with AutoGen’s multi-agent capabilities
Coverage: Migration guides, compatibility layers, and unified development patterns
2. 📊 “Built-in Observability & Monitoring”
Feature: Native OpenTelemetry integration and human oversight workflows
Coverage: Real-time agent monitoring, decision tracing, and approval mechanisms
3. 🔗 “Open Standards: OpenAPI, MCP & A2A”
Feature: Universal protocol support for maximum interoperability
Coverage: API integrations, context sharing protocols, and agent-to-agent communication
4. 🏢 “Local to Azure: Enterprise Deployment”
Feature: Seamless development-to-production pipeline with governance
Coverage: Deployment strategies, security controls, and compliance frameworks
5. ⚙️ “Advanced Multi-Agent Orchestration”
Feature: Sophisticated workflow engine with deterministic and dynamic patterns
Coverage: Complex routing logic, conditional workflows, and task delegation systems
6. 🔌 “Universal Connectors & Legacy Integration”
Feature: Extensible plugin architecture for any system integration
Coverage: Custom connectors, legacy system bridges, and third-party APIs
7. 🧠 “Persistent Memory & Learning Agents”
Feature: Adaptive memory systems with cross-session learning capabilities
Coverage: Memory strategies, learning algorithms, and privacy-compliant storage
8. 🏆 “Enterprise-Grade Production Deployment”
Feature: Complete enterprise readiness with CI/CD and fault tolerance
Coverage: Production patterns, monitoring dashboards, and reliability engineering
🎯 What You’ll Learn:
Technical Depth: Hands-on implementation of each advanced feature
Production Focus: Real enterprise deployment patterns and best practices
Code Examples: Working demonstrations with GitHub repositories
Future-Ready: Prepare for Agent Framework’s evolution and new capabilities
Goal: Transform from basic multi-agent demos to production-ready enterprise AI systems using Agent Framework’s cutting-edge features.
References:
🔗 Learn more:
- 🎬 Watch: Microsoft Agent Framework: The Open-Source Engine for Intelligent AI Agents
- 📖 Blog: Introducing Microsoft Agent Framework: The Open-Source Engine for Agentic AI Apps | Azure AI Foundry Blog
- 📚 Docs: Quick Start | Microsoft Learn
- 💻 Microsoft Official Repo: https://github.com/microsoft/agent-framework
- 💻 My Repo: Agent Framework Journey
Call to Action:
Connect with me on LinkedIn Rajeev Singh | LinkedIn and be sure to like, comment, and share this post to help spread the knowledge!

[…] laying the foundation for building intelligent AI systems. If you missed it, check it out here. Now, we take the next step: getting started with workflows. Workflows are the glue that binds […]