Introducing Microsoft Agent Framework (Semantic Kernel + AutoGen)
If Semantic Kernel and AutoGen joined forces …
If Semantic Kernel and AutoGen joined forces …
If you’ve been building agents with Semantic Kernel or AutoGen (both OSS MIT licensed agent frameworks from Microsoft), we have some important updates that you might find interesting!
Over the last two years, both frameworks have been impactful in the agent space. Semantic Kernel brought enterprise-grade features and strong C# support, while AutoGen pioneered multi-agent orchestration and developer experience with tools like AutoGen Studio. Over the past year, both teams collaborated on a shared vision, and that work has culminated in the Agent Framework, announced today in public preview!
I know learning another framework isn’t exactly satisfying. But here’s the thing: if you’ve used recent versions of Semantic Kernel or AutoGen, the Agent Framework will feel remarkably familiar. And hopefully better. The API design intentionally builds on what worked in both frameworks.
Here’s the same agent defined across all three:
# AutoGen
agent = AssistantAgent(name=”assistant”, model_client=client, tools=[my_tool])
# Semantic Kernel
agent = ChatCompletionAgent(
service=AzureChatCompletion(),
name=”assistant”,
instructions=”You are a helpful assistant.”,
plugins=[MenuPlugin()]
)
# Agent Framework
agent = ChatAgent(name=”assistant”, chat_client=client, tools=[my_tool])
Agent Framework is designed to help you build. Naturally, there will be questions - and this post tries to help by covering the following:
A summary of key features.
Async first API
High level abstractions for Agents and low level Workflows API
Middleware Support
Memory / Context provider support
DevUI
A set of FAQs
Video above is sample app (DevUI) shipped with Agent Framework.
Key Features
Depending on the framework you are arriving from, you’d find that agent framework is familiar and covers the critical areas you will need to build. Two important concepts to get ahead of is that Agent Framework provides two high level entities.
Agents - abstractions that can take a model, tools, memory.
Workflows - an abstraction to express arbitrary business or application logic as graphs. Excellent for scenarios where low level control and deterministic steps are needed.
Async First, Streaming Support
Both agents and workflows support async execution and streaming:
# Agent streaming
async for chunk in agent.run_stream(”Hello”):
if chunk.text:
print(chunk.text, end=”“, flush=True)
# Workflow streaming
async for event in workflow.run_stream(”Input”):
if isinstance(event, WorkflowOutputEvent):
print(event.data)
High Level Agent Abstraction
Agent Framework
supports a wide array of top level agents with the ChatAgent as the baseline. Agents backed by Azure AI Foundry Agents, OpenAI ChatAgents, OpenAI Responses API agents, Google A2A Agents, Copilot Studio agents etc.
from agent_framework import ChatAgent, ai_function
@ai_function
def get_weather(location: str) -> str:
“”“Get weather for a location.”“”
return f”Weather in {location}: sunny”
agent = ChatAgent(
name=”assistant”,
chat_client=client,
instructions=”You are a helpful assistant.”,
tools=[get_weather]
)
result = await agent.run(”What’s the weather in Tokyo?”)
Funfact: Tools can be added at runtime:
result = await agent.run(
“What’s the weather?”,
tools=[additional_tool],
tool_choice=”auto”
)
Workflows - Low Level Control with Human in the Loop and Checkpointing
Workflows use a graph-based model where executors (agents, functions, or sub-workflows) are connected by typed edges. Messages route through specific edges rather than broadcasting. This offers you the low level control that has been in wide demand in AutoGen (Graphflow) and also LangGraph.
@executor(id=”step1”)
async def first_step(input: str, ctx: WorkflowContext[str]) -> None:
result = await agent.run(input)
await ctx.send_message(result.text)
@executor(id=”step2”)
async def second_step(data: str, ctx: WorkflowContext[Never, str]) -> None:
await ctx.yield_output(data)
workflow = (WorkflowBuilder()
.add_edge(first_step, second_step)
.set_start_executor(first_step)
.build())
Human-in-the-loop: Workflows in Agent Framework can pause execution and wait for external input.
hitl_executor = RequestInfoExecutor(id=”approval”)
workflow = (WorkflowBuilder()
.add_edge(agent_step, hitl_executor)
.add_edge(hitl_executor, final_step)
.build())
# Handle pause and resume
async for event in workflow.run_stream(”Input”):
if isinstance(event, RequestInfoEvent):
human_input = input(”Your response: “)
async for resumed in workflow.send_responses_streaming(
{event.request_id: human_input}
):
print(resumed)
Checkpointing: Workflows can save state and resume from checkpoints. This is an abstraction that was missing in AutoGen’s Team and Graphflow abstraction does not provide built-in checkpointing.
from agent_framework import FileCheckpointStorage
checkpoint_storage = FileCheckpointStorage(storage_path=”./checkpoints”)
workflow = (WorkflowBuilder()
.add_edge(step1, step2)
.with_checkpointing(checkpoint_storage=checkpoint_storage)
.build())
# Resume from checkpoint later
checkpoints = await checkpoint_storage.list_checkpoints()
async for event in workflow.run_stream_from_checkpoint(
checkpoints[0].checkpoint_id,
checkpoint_storage=checkpoint_storage
):
print(event)
High-level builders are available for common patterns:
from agent_framework import SequentialBuilder, ConcurrentBuilder
# Sequential execution
workflow = SequentialBuilder().participants([agent1, agent2, agent3]).build()
# Parallel execution
workflow = ConcurrentBuilder().participants([agent1, agent2, agent3]).build()
Middleware Support for Security, RAI, Context Engineering Use Cases
Agent Framework provides support for middleware that can be added at agent definition or at run. Middleware be executed before/after the agent, function calls or calls to a model client. This foundation can be used to enable usecases such as security scanning, responsible AI logging, telemetry etc.
async def logging_middleware(context, next):
print(f”Agent {context.agent.name} starting”)
await next(context)
print(f”Agent {context.agent.name} completed”)
async def security_middleware(context, next):
if “password” in str(context.arguments):
print(”Blocking sensitive data”)
return # Don’t call next()
await next(context)
agent = ChatAgent(
name=”secure_agent”,
chat_client=client,
middleware=[logging_middleware, security_middleware]
)
Memory / Context Provider Support
Agent Framework provides the concept of an AgentThread to manage conversation state. Without a thread, each agent invocation is independent.
# Create thread for conversation context
thread = agent.get_new_thread()
result1 = await agent.run(”What’s 2+2?”, thread=thread)
print(result1.text) # “4”
result2 = await agent.run(”What about that number times 10?”, thread=thread)
print(result2.text) # “40” - understands context
Threads can use external storage e.g with redis :
from agent_framework_redis._provider import RedisProvider
provider = RedisProvider(..)
agent = ChatAgent(
name=”secure_agent”,
chat_client=client,
context_providers=provider
)
AgentThread is serializable - meaning you can dump them to persist state and reload them to resume!
DevUI App
Agent Framework DevUI is a sample application for testing and debugging agents and workflows during development. It provides:
Chat interface for interacting with agents
Thread management for conversation state
Event/trace viewer showing tool calls and execution flow
OpenAPI-compatible endpoints
Directory-based discovery of agents and workflows
from agent_framework.devui import serve
# Launch UI programmatically
serve(entities=[agent], auto_open=True)
Or from CLI:
devui ./agents --port 8080
The UI includes an event panel that shows the sequence of operations (function calls, outputs, results) and supports OpenTelemetry tracing for observability. I am really proud of this part as I worked on it!
Multi Language - Python and C#
Even though most of the examples shown so far are python, Agent Framework provides strong support for all of these features across both Python and C# SDKs share the same design patterns.
FAQ
Why create yet another framework?
Agent Framework consolidates learnings from both AutoGen and Semantic Kernel. Think of it as a major revision that brings the best ideas together. Yes, it’s disruptive, but it’s also a signal that the teams are committed to getting the foundation right for the long term.
What happens to my existing code?
Both AutoGen and Semantic Kernel remain open source and will receive critical fixes in the near term. However, new features and development effort will focus on Agent Framework. If you’re starting fresh, use Agent Framework. For existing projects, the migration guide provides clear paths forward.
What about Azure integration?
Agent Framework works seamlessly with Azure OpenAI, Azure AI, and the broader Azure ecosystem. Authentication, deployment, and enterprise features are first-class concerns.
Is this production-ready?
Agent Framework is currently in public preview. The core APIs are stabilizing as the team gathers feedback from early adopters. While you can start building with it now, expect some iteration as it moves toward general availability. The comprehensive migration guide and sample repository indicate the team is committed to a smooth path forward.
Where do I start?
Check out the official repository for samples, documentation, and the migration guide. The samples cover everything from basic agents to complex orchestrated workflows.
Bottom Line / Conclusion
In my opinion - Agent Framework isn’t just another rebrand - it represents a thoughtful evolution of current tools for multi-agent development. It also helps address confusion around choosing between Semantic Kernel and AutoGen. The focus on typed workflows, built-in capabilities like checkpointing and human-in-the-loop, and lessons learned from thousands of developers position it to help you - the developer.
The most important thing is what you build with it. Agent Framework is designed to accelerate your work, whether you’re building simple assistants or complex multi-agent systems.
Over the next week, I’ll be doing doing a - build a demo a day (or a week) to showcase some of these capabilities in Agent framework.
Give it a try. The learning curve is gentler than you might expect, especially if you’re coming from either parent framework.