migration-guide
Skill4 starsChanged 10 months agoMITView on GitHub
Migrate to Microsoft Agent Framework from Semantic Kernel, AutoGen, or LangChain. Use this skill when converting existing AI agent code to Microsoft Agent Framework, understanding equivalent concepts, or porting multi-agent systems.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- kevinaimonster/skill-hubtheir own version, first seen Mar 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- kevinaimonster/skill-hub★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-native-skills/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- vercel-react-native-skillsSkill
- web-design-guidelinesSkill
- agent-creationSkill
- agent-debuggingSkill
- agent-deploymentSkill
- workflow-orchestrationSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 449
Solution: Use the instructions parameter:
- Distinctive: line 460
Solution: Ensure docstrings are descriptive:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Migration Guide to Microsoft Agent Framework
This skill helps you migrate existing AI agent applications to Microsoft Agent Framework from other frameworks.
When to Use This Skill
- Migrating from Semantic Kernel to Agent Framework
- Migrating from AutoGen to Agent Framework
- Migrating from LangChain to Agent Framework
- Understanding concept mappings between frameworks
- Converting existing agent code
Migration from Semantic Kernel
Concept Mapping
| Semantic Kernel | Agent Framework | Notes |
Kernel | Client | Core orchestration object |
Plugin | Tool | Functions agents can call |
KernelFunction | @tool decorator | Individual callable functions |
ChatCompletionService | Agent | Chat handling |
Planner | Workflow | Multi-step orchestration |
Memory | Built-in context | Conversation history |
Python: Semantic Kernel → Agent Framework
Before (Semantic Kernel)
import asyncio
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
from semantic_kernel.functions import kernel_function
kernel = Kernel()
# Add Azure OpenAI service
kernel.add_service(AzureChatCompletion(
deployment_name="gpt-4o-mini",
endpoint="https://your-resource.openai.azure.com/",
api_key="your-key"
))
# Define a plugin
class MyPlugin:
@kernel_function(description="Get the weather for a location")
def get_weather(self, location: str) -> str:
return f"Weather in {location}: Sunny, 72°F"
kernel.add_plugin(MyPlugin(), "weather")
# Invoke
async def main():
result = await kernel.invoke_prompt(
"What's the weather in Seattle? {{weather.get_weather 'Seattle'}}"
)
print(result)
asyncio.run(main())After (Agent Framework)
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from agent_framework.tools import tool
from azure.identity import AzureCliCredential
# Define tools
@tool
def get_weather(location: str) -> str:
"""Get the weather for a location."""
return f"Weather in {location}: Sunny, 72°F"
async def main():
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="WeatherAgent",
instructions="You are a helpful assistant with weather capabilities.",
tools=[get_weather]
)
result = await agent.run("What's the weather in Seattle?")
print(result)
asyncio.run(main()).NET: Semantic Kernel → Agent Framework
Before (Semantic Kernel)
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.OpenAI;
var kernel = Kernel.CreateBuilder()
.AddAzureOpenAIChatCompletion(
deploymentName: "gpt-4o-mini",
endpoint: "https://your-resource.openai.azure.com/",
apiKey: "your-key")
.Build();
// Add plugin
kernel.ImportPluginFromType<WeatherPlugin>();
class WeatherPlugin
{
[KernelFunction("get_weather")]
[Description("Get the weather for a location")]
public string GetWeather(string location) => $"Weather in {location}: Sunny";
}
// Invoke
var result = await kernel.InvokePromptAsync("What's the weather in Seattle?");After (Agent Framework)
using OpenAI;
using Microsoft.Agents.AI;
using Azure.Identity;
// Define tools
[AIFunction("Get the weather for a location")]
string GetWeather(string location) => $"Weather in {location}: Sunny";
var client = new OpenAIClient(
new BearerTokenPolicy(new AzureCliCredential(), "https://ai.azure.com/.default"),
new OpenAIClientOptions { Endpoint = new Uri("https://your-resource.openai.azure.com/openai/v1") });
var agent = client.GetOpenAIResponseClient("gpt-4o-mini")
.AsAIAgent(
name: "WeatherAgent",
instructions: "You are a helpful assistant.",
tools: [GetWeather]);
var result = await agent.RunAsync("What's the weather in Seattle?");
Console.WriteLine(result);Migration from AutoGen
Concept Mapping
| AutoGen | Agent Framework | Notes |
AssistantAgent | Agent | AI-powered agent |
UserProxyAgent | Human-in-the-loop | User interaction handling |
GroupChat | Workflow | Multi-agent orchestration |
GroupChatManager | Workflow orchestrator | Manages agent interactions |
function_map | tools | Callable functions |
ConversableAgent | Agent with context | Maintains conversation |
Python: AutoGen → Agent Framework
Before (AutoGen)
import autogen
config_list = [
{
"model": "gpt-4o-mini",
"api_key": "your-key",
}
]
# Create assistant
assistant = autogen.AssistantAgent(
name="assistant",
llm_config={"config_list": config_list},
system_message="You are a helpful assistant."
)
# Create user proxy
user_proxy = autogen.UserProxyAgent(
name="user",
human_input_mode="NEVER",
code_execution_config=False
)
# Chat
user_proxy.initiate_chat(assistant, message="Hello!")After (Agent Framework)
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from azure.identity import AzureCliCredential
async def main():
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="assistant",
instructions="You are a helpful assistant."
)
response = await agent.run("Hello!")
print(response)
asyncio.run(main())AutoGen GroupChat → Agent Framework Workflow
Before (AutoGen GroupChat)
import autogen
# Create multiple agents
researcher = autogen.AssistantAgent(
name="researcher",
system_message="You research topics thoroughly."
)
critic = autogen.AssistantAgent(
name="critic",
system_message="You critically review information."
)
writer = autogen.AssistantAgent(
name="writer",
system_message="You write clear summaries."
)
# Group chat
groupchat = autogen.GroupChat(
agents=[researcher, critic, writer],
messages=[],
max_round=3
)
manager = autogen.GroupChatManager(groupchat=groupchat)
user_proxy.initiate_chat(manager, message="Research AI trends")After (Agent Framework Workflow)
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from agent_framework.workflows import Workflow, step
from azure.identity import AzureCliCredential
@step
async def research(topic: str) -> str:
"""Researcher agent."""
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="researcher",
instructions="You research topics thoroughly."
)
return await agent.run(f"Research: {topic}")
@step
async def critique(research: str) -> str:
"""Critic agent."""
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="critic",
instructions="You critically review information."
)
return await agent.run(f"Critique this research:\n{research}")
@step
async def write_summary(critique: str) -> str:
"""Writer agent."""
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="writer",
instructions="You write clear summaries."
)
return await agent.run(f"Write a summary based on:\n{critique}")
async def main():
workflow = Workflow("research-workflow")
workflow.add_edge(research, critique)
workflow.add_edge(critique, write_summary)
result = await workflow.run(topic="AI trends in 2026")
print(result)
asyncio.run(main())Migration from LangChain
Concept Mapping
| LangChain | Agent Framework | Notes |
ChatOpenAI | OpenAIResponsesClient | LLM client |
Tool | @tool | Callable functions |
Agent | Agent | AI agent |
AgentExecutor | Agent.run() | Execution handler |
Chain | Workflow | Multi-step processing |
Memory | Built-in context | Conversation memory |
Python: LangChain → Agent Framework
Before (LangChain)
from langchain_openai import ChatOpenAI
from langchain.agents import create_openai_functions_agent, AgentExecutor
from langchain.tools import tool
from langchain import hub
llm = ChatOpenAI(model="gpt-4o-mini", api_key="your-key")
@tool
def get_weather(location: str) -> str:
"""Get weather for a location."""
return f"Sunny in {location}"
prompt = hub.pull("hwchase17/openai-functions-agent")
agent = create_openai_functions_agent(llm, [get_weather], prompt)
executor = AgentExecutor(agent=agent, tools=[get_weather])
result = executor.invoke({"input": "What's the weather in NYC?"})
print(result["output"])After (Agent Framework)
import asyncio
from agent_framework.azure import AzureOpenAIResponsesClient
from agent_framework.tools import tool
from azure.identity import AzureCliCredential
@tool
def get_weather(location: str) -> str:
"""Get weather for a location."""
return f"Sunny in {location}"
async def main():
agent = AzureOpenAIResponsesClient(
credential=AzureCliCredential()
).as_agent(
name="WeatherAgent",
instructions="You are a helpful assistant.",
tools=[get_weather]
)
result = await agent.run("What's the weather in NYC?")
print(result)
asyncio.run(main())Key Differences to Note
1. Async-First Design
Agent Framework is async by default:
# Agent Framework - always async
response = await agent.run("Hello")
# For sync contexts, use asyncio.run()
import asyncio
response = asyncio.run(agent.run("Hello"))2. Authentication
Agent Framework prefers Azure Identity:
# Recommended: Managed Identity / Azure CLI
from azure.identity import DefaultAzureCredential, AzureCliCredential
credential = AzureCliCredential() # Local dev
credential = DefaultAzureCredential() # Production3. Simplified Tool Definition
from agent_framework.tools import tool
@tool
def my_function(param: str) -> str:
"""Description becomes the tool description."""
return result4. Unified Workflow API
from agent_framework.workflows import Workflow, step
@step
async def my_step(input: str) -> str:
# Step logic
return output
workflow = Workflow("my-workflow")
workflow.add_edge(step1, step2)
result = await workflow.run(input_data)Migration Checklist
- Install agent-framework package
- Update imports to agent_framework
- Convert plugins/tools to
@tooldecorator - Replace kernel/chain with Agent
- Update to async/await pattern
- Replace group chat with Workflow
- Update authentication to Azure Identity
- Convert memory handling to built-in context
- Update configuration to environment variables
- Test all agent interactions
- Update deployment scripts
Common Migration Issues
Issue: Synchronous code won't work
Solution: Wrap in asyncio.run():
import asyncio
result = asyncio.run(agent.run("prompt"))Issue: Custom prompts not applying
Solution: Use the instructions parameter:
agent = client.as_agent(
name="MyAgent",
instructions="Your detailed system prompt here..."
)Issue: Tools not being called
Solution: Ensure docstrings are descriptive:
@tool
def my_tool(param: str) -> str:
"""Clear description of what this tool does and when to use it."""
return resultReferences
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

