Skip to content

Commit 19572ad

Browse files
Merge pull request #705 from westey-m/docs-bugfixing-2
A selection of AF docs fixes.
2 parents 88c1c76 + e9da539 commit 19572ad

5 files changed

Lines changed: 27 additions & 5 deletions

File tree

agent-framework/tutorials/agents/agent-as-mcp-tool.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,24 @@ This tutorial shows you how to expose an agent as a tool over the Model Context
1717

1818
## Prerequisites
1919

20-
For prerequisites and installing nuget packages, see the [Create and run a simple agent](./run-agent.md) step in this tutorial.
20+
For prerequisites see the [Create and run a simple agent](./run-agent.md) step in this tutorial.
21+
22+
## Installing Nuget packages
23+
24+
To use the Microsoft Agent Framework with Azure OpenAI, you need to install the following NuGet packages:
25+
26+
```powershell
27+
dotnet add package Azure.Identity
28+
dotnet add package Azure.AI.OpenAI
29+
dotnet add package Microsoft.Agents.AI.OpenAI --prerelease
30+
```
31+
32+
To add support for hosting a tool over the Model Context Protocol (MCP), all add the following Nuget packages
33+
34+
```powershell
35+
dotnet add package Microsoft.Extensions.Hosting --prerelease
36+
dotnet add package ModelContextProtocol --prerelease
37+
```
2138

2239
## Exposing an agent as an MCP tool
2340

agent-framework/tutorials/agents/enable-observability.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ AIAgent agent = new AzureOpenAIClient(
7373
new AzureCliCredential())
7474
.GetChatClient("gpt-4o-mini")
7575
.CreateAIAgent(instructions: "You are good at telling jokes.", name: "Joker")
76-
.WithOpenTelemetry(sourceName: "agent-telemetry-source");
76+
.AsBuilder()
77+
.UseOpenTelemetry(sourceName: "agent-telemetry-source")
78+
.Build();
7779
```
7880

7981
Run the agent and print the text response. The console exporter will show trace data on the console.

agent-framework/tutorials/agents/run-agent.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ Here is an example with a system and user message:
145145
```csharp
146146
ChatMessage systemMessage = new(
147147
ChatRole.System,
148-
"""If the user asks you to tell a joke, refuse to do so, explaining that you are not a clown.
149-
Offer the user an interesting fact instead.""");
148+
"""
149+
If the user asks you to tell a joke, refuse to do so, explaining that you are not a clown.
150+
Offer the user an interesting fact instead.
151+
""");
150152
ChatMessage userMessage = new(ChatRole.User, "Tell me a joke about a pirate.");
151153

152154
Console.WriteLine(await agent.RunAsync([systemMessage, userMessage]));

agent-framework/user-guide/agents/agent-types/azure-ai-foundry-agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The Microsoft Agent Framework supports creating agents that use the [Azure AI Fo
2020
Add the Agents Azure AI NuGet package to your project.
2121

2222
```powershell
23+
dotnet add package Azure.Identity
2324
dotnet add package Microsoft.Agents.AI.AzureAI --prerelease
2425
```
2526

agent-framework/user-guide/agents/agent-types/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ These agents support a wide range of functionality out of the box:
3737
To create one of these agents, simply construct a `ChatClientAgent` using the ChatClient implementation of your choice.
3838

3939
```csharp
40-
using Microsoft.Extensions.AI;
40+
using Microsoft.Agents.AI;
4141

4242
var agent = new ChatClientAgent(chatClient, instructions: "You are a helpful assistant");
4343
```

0 commit comments

Comments
 (0)