Skip to content

Commit 0520d36

Browse files
authored
Merge pull request #49798 from MicrosoftDocs/NEW-sk-ai-agent
New Module: Develop an AI Agent with Semantic Kernel
2 parents 3d84684 + 3a361dd commit 0520d36

16 files changed

+350
-0
lines changed

learn-pr/paths/develop-ai-agents-on-azure/index.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ modules:
2828
- learn.wwl.ai-agent-fundamentals
2929
- learn.wwl.develop-ai-agent-azure
3030
- learn.wwl.build-agent-with-custom-tools
31+
- learn.wwl.develop-ai-agent-with-semantic-kernel
3132
- learn.wwl.orchestrate-sk-multi-agent-solution
3233
trophy:
3334
uid: learn.wwl.develop-ai-agent-on-azure.trophy
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: Learn how to create Azure AI Agent Service agents with Semantic Kernel.
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/1-introduction.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.understand-semantic-kernel-agents
3+
title: Understand Semantic Kernel AI agents
4+
metadata:
5+
title: Understand Semantic Kernel AI agents
6+
description: This unit explains the Semantic Kernel SDK and Agent Framework.
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 6
12+
content: |
13+
[!include[](includes/2-understand-semantic-kernel-agents.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.create-azure-ai-agent
3+
title: Create an Azure AI agent with Semantic Kernel
4+
metadata:
5+
title: Create an Azure AI agent with Semantic Kernel
6+
description: Learn how to use the Semantic Kernel Agent Framework to create an Azure AI agent
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 7
12+
content: |
13+
[!include[](includes/3-create-azure-ai-agent.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.add-plugins-to-agent
3+
title: Add plugins to Azure AI agent
4+
metadata:
5+
title: Add plugins to Azure AI agent
6+
description: Learn how to add plugins to your Azure AI agent
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 5
12+
content: |
13+
[!include[](includes/4-add-plugins-to-agent.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.exercise
3+
title: Exercise - Develop an Azure AI agent with the Semantic Kernel SDK
4+
metadata:
5+
title: Exercise - Develop an Azure AI agent with the Semantic Kernel SDK
6+
description: Learn how to build an agent using the Semantic Kernel SDK. This unit provides an exercise to build an agent using the Semantic Kernel SDK.
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 30
12+
content: |
13+
[!include[](includes/5-exercise.md)]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.knowledge-check
3+
title: Knowledge check
4+
metadata:
5+
title: Knowledge check
6+
description: This unit contains a knowledge check which can help learners reinforce their understanding of the material.
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 3
12+
content: |
13+
quiz:
14+
questions:
15+
- content: "What is the main purpose of the AzureAIAgent class in Semantic Kernel?"
16+
choices:
17+
- content: "To provide a low-level interface for directly managing AI models"
18+
isCorrect: false
19+
explanation: "Incorrect. The AzureAIAgent class is built on top of Azure AI Agent Service and streamlines its features rather than providing a low-level interface."
20+
- content: "To simplify the use of Azure AI Agent Service by abstracting complex operations"
21+
isCorrect: true
22+
explanation: "Correct. The AzureAIAgent class is designed to streamline the usage of Azure AI Agent Service, reducing the complexity of setting up and managing AI agents."
23+
- content: "To replace the need for prompt templates in AI workflows"
24+
isCorrect: false
25+
explanation: "Incorrect. AzureAIAgent enhances agent interactions but doesn't replace prompt templates, which are useful for defining structured AI behavior."
26+
- content: "Which component in the Agent Framework manages conversation state and stores messages?"
27+
choices:
28+
- content: "Agent threads"
29+
isCorrect: true
30+
explanation: "Correct. Agent threads store conversations and maintain conversation state across multiple interactions."
31+
- content: "Agent chat"
32+
isCorrect: false
33+
explanation: "Incorrect. Agent chat provides the structure for multi-agent interactions but doesn't store messages."
34+
- content: "AI service connectors"
35+
isCorrect: false
36+
explanation: "Incorrect. AI service connectors allow AI models to interact with external services but don't handle conversation state."
37+
- content: "Which step is necessary to enable an AzureAIAgent to use a plugin?"
38+
choices:
39+
- content: "Modify the AI model's architecture to integrate the plugin"
40+
isCorrect: false
41+
explanation: "Incorrect. Plugins work through function calling and don't require modifications to the AI model itself."
42+
- content: "Configure the plugin in Azure portal before using it in Semantic Kernel"
43+
isCorrect: false
44+
explanation: "Incorrect. Plugins are defined and added programmatically in the codebase, not configured in the Azure portal."
45+
- content: "Define a class with methods annotated using the `kernel_function` decorator"
46+
isCorrect: true
47+
explanation: "Correct. The first step in using a plugin is defining a class and annotating its methods with the `kernel_function` decorator so the AI knows how to use them."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.develop-ai-agent-with-semantic-kernel.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: This unit summarizes the key concepts covered in the module, including key features and how to use Azure AI Agent Service.
7+
author: buzahid
8+
ms.author: buzahid
9+
ms.date: 03/25/2025
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/7-summary.md)]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
AI agents are transforming how applications interact with users and automate tasks. Unlike traditional programs, AI agents use generative AI to interpret data, make decisions, and complete tasks with minimal human intervention. These agents use large language models to streamline complex workflows, making them ideal for automating business processes.
2+
3+
Developers can build AI agents using different tools, including the Semantic Kernel SDK. This open-source SDK simplifies the integration of AI models into applications. The Semantic Kernel Agent Framework supports different types of agents, including `ChatCompletionAgent`, `OpenAIAssistantAgent`, and `AzureAIAgent`. This module focuses on the `AzureAIAgent`, a type of agent that streamlines the features and functionalities of Azure AI Agent Service.
4+
5+
Azure AI Agent Service is a fully managed service that enables developers to securely build, deploy, and scale high-quality extensible AI agents. Using the Azure AI Agent Service, developers don't need to manage the underlying compute or storage resources. Using the Semantic Kernel Agent Framework allows developers to quickly build agents on the Azure AI Agent Service, with support for natural language processing and access to built-in tools in just a few lines of code.
6+
7+
While Azure AI Agent Service provides a powerful foundation for building AI agents, Semantic Kernel offers additional flexibility and scalability. If you've already started developing agents with Semantic Kernel, you can seamlessly integrate Azure AI Agent capabilities, such as built-in tools and project deployment, without rewriting your code. Also, if your solution requires multiple types of agents, using Semantic Kernel ensures consistency across your implementation. Finally, if you're planning to develop multi-agent solutions, Semantic Kernel's GroupChat feature allows you to orchestrate collaborative agents efficiently—a topic covered in more detail in a later module.
8+
9+
Suppose you need to develop an AI agent that automatically formats and emails expense reports for employees. Your AI agent can extract data from submitted expense reports, format them correctly, and send them to the appropriate recipients. To do this, you can use the Semantic Kernel Agent Framework. The plugins and functions feature allows your AI agent to interact with APIs, retrieve necessary data, and complete tasks.
10+
11+
In this module, you learn about the core features of the Semantic Kernel SDK and the Agent Framework. You also learn how to create your own AI agents and extend their capabilities with plugin functions.
12+
13+
After completing this module, you're now able to:
14+
15+
- Use Semantic Kernel to connect to an Azure AI Foundry project.
16+
- Create Azure AI Agent Service agents using the Semantic Kernel SDK.
17+
- Integrate plugin functions with your AI agent.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
An AI agent is a program that uses generative AI to interpret data, make decisions, and perform tasks on behalf of users or other applications. AI agents rely on large language models to perform their tasks. Unlike conventional programs, AI agents can function autonomously, handling complex workflows and automating processes without requiring continuous human oversight.
2+
3+
AI Agents can be developed using many different tools and platforms, including the Semantic Kernel SDK. Semantic Kernel is an open-source SDK that enables developers to easily integrate the latest AI models into their applications. Part of that SDK includes the *Semantic Kernel Agent Framework*, which allows developers to quickly create functional agents that can use natural language processing to complete tasks.
4+
5+
## Semantic Kernel core components
6+
7+
The Semantic Kernel offers different components that can be used individually or combined.
8+
9+
- **AI service connectors** - connect the code to AI services from different providers under a common interface. Supported services include Chat Completion, Text Generation, and more.
10+
11+
- **Memory connectors** - expose vector stores from other providers under a common interface.
12+
13+
- **Functions and plugins** - containers for functions that are registered with the kernel. Once registered, functions can be invoked by the AI or through prompt templates.
14+
15+
- **Prompt templates** - combine instructions, user input, and function outputs into a reusable format. Prompt templates allow AI models to execute predefined steps dynamically.
16+
17+
- **Filters** - allow custom actions to be performed before and after a function or prompt is invoked. When registered, function filters act as outer layers and prompt filters as inner layers.
18+
19+
## Agent framework components
20+
21+
The Agent Framework within Semantic Kernel helps streamline the creation of agents and enables multi-agent collaboration in conversations while integrating human input. The framework supports different types of agents, including `ChatCompletionAgent`, `OpenAIAssistantAgent`, and `AzureAIAgent`.
22+
23+
### What is an Azure AI Agent?
24+
25+
The `AzureAIAgent` class provides a seamless way to build and interact with AI agents using the Azure AI Agent Service. It abstracts the complexity of managing AI agents by offering a more structured and intuitive interface within the Semantic Kernel Agent Framework. Key benefits include:
26+
27+
- Simplified agent creation – The AzureAIAgent class allows developers to define AI agents with minimal configuration, leveraging the power of Azure AI Agent Service without managing the underlying infrastructure.
28+
29+
- Automatic tool invocation – The agent can automatically call and execute tools, integrating seamlessly with Azure AI Search, Bing, Azure Functions, and more.
30+
31+
- Thread and conversation management – Provides built-in mechanisms for managing conversation states, ensuring smooth multi-agent interactions.
32+
33+
- Secure enterprise integration – Enables secure and compliant AI agent development with keyless authentication and customizable storage options.
34+
35+
By using the `AzureAIAgent` class, developers can take full advantage of Azure AI Agent Service while taking advantage of the features offered by the Semantic Kernel SDK. This allows for robust AI-driven workflows that scale efficiently across enterprise applications.
36+
37+
### Agent framework core concepts
38+
39+
- **Agent** - abstraction for AI agents, with specialized subclasses like AzureAIAgent, allowing for task completion and human interaction in conversations.
40+
41+
- **Agent threads** - manage conversation state and stores conversations.
42+
43+
- **Agent chat** - the foundation for multi-agent interactions, allows for structured conversations and collaboration.
44+
45+
- **Agent channel** - used for custom agent development, allows different types of agents to participate in AgentChat.
46+
47+
- **Agent messages** - a unified structure for agent communication, provides seamless communication and integration with existing AI workflows.
48+
49+
- **Templating** - like Semantic Kernel prompt templates, templates use dynamic prompt configurations to shape agent behavior.
50+
51+
- **Functions and plugins** - like Semantic Kernel plugins, agent plugin functions allow developers to extend agent capabilities by incorporating custom functions.
52+
53+
This framework supports autonomous, multi-agent AI behaviors while maintaining consistency with Semantic Kernel's design, allowing developers to build intelligent, adaptable AI systems.

0 commit comments

Comments
 (0)