Skip to content

Commit e33d2c2

Browse files
Merge pull request #53533 from buzahid/ai-agents
Updated agent framework modules
2 parents 6b57a9b + 5e1db12 commit e33d2c2

6 files changed

Lines changed: 19 additions & 65 deletions

File tree

learn-pr/wwl-data-ai/build-agent-workflows-microsoft-foundry/includes/9-exercise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ If you have an Azure subscription, you can complete this exercise in the Microso
55
66
Launch the exercise and follow the instructions.
77

8-
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2346444&azure-portal=true)
8+
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2353408&azure-portal=true)
99

learn-pr/wwl-data-ai/develop-ai-agent-with-semantic-kernel/includes/2-understand-semantic-kernel-agents.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ AI Agents can be developed using many different tools and platforms, including t
66

77
The Microsoft Agent Framework offers different components that can be used individually or combined.
88

9-
- **Chat clients** - provide abstractions for connecting to AI services from different providers under a common interface. Supported providers include Azure OpenAI, OpenAI, Anthropic, and more through the `BaseChatClient` abstraction.
9+
- **Agents** - provides a consistent interface and enables different features like multi-agent orchestration. Out of the box, agents support function calling, multi-turn conversations with chat history, service-provided tools, structured outputs, and streaming responses.
10+
11+
- **Chat providers** - provide abstractions for connecting to AI services from different providers under a common interface. Supported providers include Azure OpenAI, OpenAI, Anthropic, Copilot, and more through the `BaseAgent` abstraction.
1012

1113
- **Function tools** - containers for custom functions that extend agent capabilities. Agents can automatically invoke functions to integrate with external APIs and services.
1214

1315
- **Built-in tools** - prebuilt capabilities including Code Interpreter for Python execution, File Search for document analysis, and Web Search for internet access.
1416

15-
- **Conversation management** - structured message system with roles (USER, ASSISTANT, SYSTEM, TOOL) and `AgentThread` for persistent conversation context across interactions.
17+
- **Conversation management** - structured message system with roles (USER, ASSISTANT, SYSTEM, TOOL) and `AgentSession` for persistent conversation context across interactions.
1618

1719
- **Workflow orchestration** - supports sequential workflows, concurrent execution, group chat, and handoff patterns for complex multi-agent collaboration.
1820

@@ -36,7 +38,7 @@ When you use Microsoft Foundry Agents, you get the full power of enterprise Azur
3638

3739
- **BaseAgent** - the foundation for all agents with consistent methods, providing a unified interface across all agent types.
3840

39-
- **Agent threads** - manage persistent conversation context and store conversation history across sessions using the `AgentThread` class.
41+
- **Agent session** - manage persistent conversation context and store conversation history across sessions using the `AgentSession` class.
4042

4143
- **Chat messages** - organized structure for agent communication using role-based messaging (USER, ASSISTANT, SYSTEM, TOOL) that enables smooth communication and integration.
4244

learn-pr/wwl-data-ai/develop-ai-agent-with-semantic-kernel/includes/3-create-azure-ai-agent.md

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,27 @@
11
**Microsoft Foundry Agent** is a specialized agent within the Microsoft Agent Framework, designed to provide enterprise-level conversational capabilities with seamless tool integration. It automatically handles tool calling, so you don't need to manually parse and invoke functions. The agent also securely manages conversation history using threads, which reduces the work of maintaining state. The Microsoft Foundry Agent supports many built-in tools, including code interpreter, file search, and web search. It also provides integration capabilities for Azure AI Search, Azure Functions, and other Azure services.
22

3-
## Creating a Microsoft Foundry Agent
3+
## Creating an Azure AI Agent
44

55
A Microsoft Foundry Agent includes all the core capabilities you typically need for enterprise AI applications, like function execution, planning, and memory access. This agent acts as a self-contained runtime with enterprise-level features.
66

77
To use a Microsoft Foundry Agent:
88
1. Create a Microsoft Foundry project.
99
1. Add the project connection string to your Microsoft Agent Framework application code.
10-
1. Set up authentication credentials.
11-
1. Create a `ChatAgent` with an `AzureAIAgentClient`.
12-
1. Define tools and instructions for your agent.
10+
1. Set up authentication credentials with `AzureCliCredential`.
11+
1. Connect to your project client with the `AzureOpenAIResponsesClient` class.
12+
1. Create an `Agent` instance with the client, instructions, and tools you want to use.
1313

14-
Here's the code that shows how to create a Microsoft Foundry Agent:
14+
Once your agent is created, you can create a conversation session to interact with your agent and get responses to your questions.
1515

16-
```python
17-
from agent_framework import AgentThread, ChatAgent
18-
from agent_framework.azure import AzureAIAgentClient
19-
from azure.identity.aio import AzureCliCredential
16+
### Azure AI Agent key components
2017

21-
def get_weather(
22-
location: Annotated[str, Field(description="The location to get the weather for.")],
23-
) -> str:
24-
"""Get the weather for a given location."""
25-
return f"The weather in {location} is sunny with a high of 25°C."
18+
The Microsoft Agent Framework Azure AI Agent uses the following components to work:
2619

27-
# Create a ChatAgent with Azure AI client
28-
async with (
29-
AzureCliCredential() as credential,
30-
ChatAgent(
31-
chat_client=AzureAIAgentClient(async_credential=credential),
32-
instructions="You are a helpful weather agent.",
33-
tools=get_weather,
34-
) as agent,
35-
):
36-
# Agent is now ready to use
37-
```
20+
- **AzureOpenAIResponsesClient** - manages the connection to your Microsoft Foundry project. This client lets you access the services and models associated with your project and provides enterprise-level authentication and security features.
3821

39-
Once your agent is created, you can create a thread to interact with your agent and get responses to your questions. For example:
22+
- **Agent** - the main agent class that combines the client, instructions, and tools to create a working AI agent that can handle conversations and complete tasks.
4023

41-
```python
42-
# Create the agent thread for ongoing conversation
43-
thread = agent.get_new_thread()
44-
45-
# Ask questions and get responses
46-
first_query = "What's the weather like in Seattle?"
47-
print(f"User: {first_query}")
48-
first_result = await agent.run(first_query, thread=thread)
49-
print(f"Agent: {first_result.text}")
50-
```
51-
52-
### Microsoft Foundry Agent key components
53-
54-
The Microsoft Agent Framework Microsoft Foundry Agent uses the following components to work:
55-
56-
- **AzureAIAgentClient** - manages the connection to your Microsoft Foundry project. This client lets you access the services and models associated with your project and provides enterprise-level authentication and security features.
57-
58-
- **ChatAgent** - the main agent class that combines the client, instructions, and tools to create a working AI agent that can handle conversations and complete tasks.
59-
60-
- **AgentThread** - automatically keeps track of conversation history between agents and users, and manages the conversation state. You can create new threads or reuse existing ones to maintain context across interactions.
24+
- **AgentSession** - automatically keeps track of conversation history between agents and users, and manages the conversation state. You can create new threads or reuse existing ones to maintain context across interactions.
6125

6226
- **Tools integration** - support for custom functions that extend agent capabilities. Functions are automatically registered and can be called by agents to connect with external APIs and services.
6327

learn-pr/wwl-data-ai/develop-ai-agent-with-semantic-kernel/includes/5-exercise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Now you're ready to build an agent with the Microsoft Agent Framework. In this e
44

55
Launch the exercise and follow the instructions.
66

7-
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2313222&azure-portal=true)
7+
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2353605&azure-portal=true)
88

99
> [!TIP]
1010
> After completing the exercise, if you're finished exploring Azure AI Agents, delete the Azure resources that you created during the exercise.

learn-pr/wwl-data-ai/orchestrate-semantic-kernel-multi-agent-solution/includes/2-understand-agent-framework.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,7 @@ The framework includes several core features that power agent functionality:
2828

2929
- **Conversation management**
3030

31-
Agents can maintain conversation history across multiple interactions using `AgentThread`, allowing them to track previous interactions and adapt responses accordingly. The structured message system uses roles (USER, ASSISTANT, SYSTEM, TOOL) for persistent conversation context.
32-
33-
### Types of agents
34-
35-
The Microsoft Agent Framework supports several different types of agents from multiple providers:
36-
37-
- **Microsoft Foundry Agent** - a specialized agent within the Microsoft Agent Framework designed to provide enterprise-grade conversational capabilities with seamless tool integration. It automatically handles tool calling and securely manages conversation history using threads, reducing the overhead of maintaining state. Microsoft Foundry Agents support built-in tools and provide integration capabilities for Azure AI Search, Azure Functions, and other Azure services.
38-
39-
- **ChatAgent**: designed for general conversation and task completion interfaces. The `ChatAgent` type provides natural language processing, contextual understanding, and dialogue management with support for custom tools and instructions.
40-
41-
- **OpenAI Assistant Agent**: designed for advanced capabilities using OpenAI's Assistant API. This agent type supports goal-driven interactions with features like code interpretation and file search through the OpenAI platform.
42-
43-
- **Anthropic Agent**: provides access to Anthropic's Claude models with the framework's unified interface, supporting advanced reasoning and conversation capabilities.
31+
Agents can maintain conversation history across multiple interactions using `AgentSession`, allowing them to track previous interactions and adapt responses accordingly. The structured message system uses roles (USER, ASSISTANT, SYSTEM, TOOL) for persistent conversation context.
4432

4533
## Why you should use the Microsoft Agent Framework
4634

learn-pr/wwl-data-ai/orchestrate-semantic-kernel-multi-agent-solution/includes/9-exercise.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Now it's your opportunity to build a multi agent solution with the Microsoft Age
22

33
Launch the exercise and follow the instructions.
44

5-
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2310729&azure-portal=true)
5+
[![Button to launch exercise.](../media/launch-exercise.png)](https://go.microsoft.com/fwlink/?linkid=2353606&azure-portal=true)
66

77
> [!TIP]
88
> After completing the exercise, if you're finished exploring multi-agents with Microsoft Agent Framework, delete the Azure resources that you created during the exercise.

0 commit comments

Comments
 (0)