All migration samples are available in the semantic-kernel-migration samples directory.
Key Differences at a Glance
API Mapping Reference
Agent Creation
Tools and Functions
Session and Thread Management
AF agents are stateless by default. Always create and pass a session when you need conversation history to persist across
run() calls.Streaming Responses
Orchestration Patterns
Sequential Orchestration
Run agents one after another, passing output to the next agent.Group Chat Orchestration
Multiple agents collaborate with an LLM-backed manager deciding who speaks next.- Semantic Kernel
- Agent Framework
Process Framework (Fan-out/Fan-in)
Semantic Kernel Process → Agent Framework Workflow
Semantic Kernel Process → Agent Framework Workflow
Semantic Kernel’s Process Framework uses
KernelProcess with steps and edges. Agent Framework uses WorkflowBuilder with custom executors.AF workflows support checkpoints and resume capabilities that SK Process Framework does not. Use the workflow samples as a blueprint when modernizing complex agent graphs.
Provider-Specific Migrations
Azure AI Agent Service
OpenAI Assistants API
Copilot Studio
Copilot Studio Agent Migration
Copilot Studio Agent Migration
Breaking Changes and Deprecations
- Session Management: AF requires explicit session creation. SK’s implicit thread state won’t migrate automatically.
-
Plugin System: SK’s
@kernel_functionplugins must be converted to AF’s@tooldecorators. -
Response Types: SK returns
ChatMessageContentobjects; AF returnsAgentResponsewith.text,.messages, and.dataproperties. -
Orchestration Runtime: SK’s
InProcessRuntimeis not needed in AF. Workflows run directly without runtime management. -
Streaming Format: SK streams
ChatMessageContentchunks; AF streamsAgentResponseUpdateobjects.
Migration Checklist
1
Update agent construction
Replace
ChatCompletionAgent(service=...) with client.as_agent(...)2
Convert plugins to tools
Transform
@kernel_function class methods to standalone @tool functions3
Add explicit sessions
Create sessions with
agent.create_session() for stateful conversations4
Update orchestrations
Replace SK orchestrations with AF builders (
SequentialBuilder, GroupChatBuilder, WorkflowBuilder)5
Migrate streaming code
Update streaming logic to handle
AgentResponseUpdate instead of ChatMessageContent chunks6
Test with sample workflows
Run side-by-side comparisons using the migration samples to verify behavior parity
Additional Resources
Migration Samples
Runnable side-by-side code comparisons for all patterns
Agent Framework Docs
Complete documentation for the Agent Framework
Semantic Kernel Docs
Official Semantic Kernel documentation
Community Support
Get help from the community on Discord
Migration Tips
- Start with single-agent patterns before tackling orchestrations
- Test streaming behavior early — AF’s streaming API is simpler but has different event types
- Use
agent.create_session()liberally during development; you can optimize session management later - For complex multi-agent graphs, use AF’s workflow checkpointing to enable pause/resume capabilities
- Tools map cleanly from SK plugins to AF
@toolcallables; introduce hosted tools (MCP, web search) after achieving parity