Skip to content

Commit 3985027

Browse files
Merge pull request #805 from gewarren/ug-pass-1
Edit pass on user-guide/workflows docs
2 parents 8940564 + cd3cfa5 commit 3985027

15 files changed

Lines changed: 59 additions & 58 deletions

File tree

agent-framework/user-guide/model-context-protocol/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Model Context Protocol is an open standard that defines how applications provide
1616
You can extend the capabilities of your Agent Framework agents by connecting it to tools hosted on remote [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) servers.
1717

1818
## Considerations for using third party Model Context Protocol servers
19-
Your use of Model Context Protcol servers is subject to the terms between you and the service provider. When you connect to a non-Microsoft service, some of your data (such as prompt content) is passed to the non-Microsoft service, or your application might receive data from the non-Microsoft service. You're responsible for your use of non-Microsoft services and data, along with any charges associated with that use.
19+
20+
Your use of Model Context Protocol servers is subject to the terms between you and the service provider. When you connect to a non-Microsoft service, some of your data (such as prompt content) is passed to the non-Microsoft service, or your application might receive data from the non-Microsoft service. You're responsible for your use of non-Microsoft services and data, along with any charges associated with that use.
2021

2122
The remote MCP servers that you decide to use with the MCP tool described in this article were created by third parties, not Microsoft. Microsoft hasn't tested or verified these servers. Microsoft has no responsibility to you or others in relation to your use of any remote MCP servers.
2223

@@ -25,6 +26,7 @@ We recommend that you carefully review and track what MCP servers you add to you
2526
The MCP tool allows you to pass custom headers, such as authentication keys or schemas, that a remote MCP server might need. We recommend that you review all data that's shared with remote MCP servers and that you log the data for auditing purposes. Be cognizant of non-Microsoft practices for retention and location of data.
2627

2728
## How it works
29+
2830
You can integrate multiple remote MCP servers by adding them as tools to your agent. Agent Framework makes it easy to convert an MCP tool to an AI tool that can be called by your agent.
2931

3032
The MCP tool supports custom headers, so you can connect to MCP servers by using the authentication schemas that they require or by passing other headers that the MCP servers require. **TODO You can specify headers only by including them in tool_resources at each run. In this way, you can put API keys, OAuth access tokens, or other credentials directly in your request. TODO**
@@ -41,4 +43,3 @@ For more information on using MCP, see:
4143
> [!div class="nextstepaction"]
4244
> [Using MCP tools with Agents](./using-mcp-tools.md)
4345
> [Using MCP tools with Foundry Agents](./using-mcp-with-foundry-agents.md)
44-

agent-framework/user-guide/model-context-protocol/using-mcp-tools.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ ms.service: agent-framework
1111

1212
# Using MCP tools with Agents
1313

14-
The Microsoft Agent Framework supports integration with Model Context Protocol (MCP) servers, allowing your agents to access external tools and services. This guide shows how to connect to an MCP server and use its tools within your agent.
14+
Microsoft Agent Framework supports integration with Model Context Protocol (MCP) servers, allowing your agents to access external tools and services. This guide shows how to connect to an MCP server and use its tools within your agent.
1515

1616
::: zone pivot="programming-language-csharp"
1717

18-
The .Net version of Agent Framework can be used together with the [official MCP C# SDK](https://github.com/modelcontextprotocol/csharp-sdk) to allow your agent to call MCP tools.
18+
The .NET version of Agent Framework can be used together with the [official MCP C# SDK](https://github.com/modelcontextprotocol/csharp-sdk) to allow your agent to call MCP tools.
1919

2020
The following sample shows how to:
2121

@@ -55,7 +55,7 @@ var mcpTools = await mcpClient.ListToolsAsync().ConfigureAwait(false);
5555

5656
The `ListToolsAsync()` method returns a collection of tools that the MCP server exposes. These tools are automatically converted to AITool objects that can be used by your agent.
5757

58-
### Creating an Agent with MCP Tools
58+
### Create an Agent with MCP Tools
5959

6060
Create your agent and provide the MCP tools during initialization:
6161

@@ -65,7 +65,7 @@ AIAgent agent = new AzureOpenAIClient(
6565
new AzureCliCredential())
6666
.GetChatClient(deploymentName)
6767
.CreateAIAgent(
68-
instructions: "You answer questions related to GitHub repositories only.",
68+
instructions: "You answer questions related to GitHub repositories only.",
6969
tools: [.. mcpTools.Cast<AITool>()]);
7070

7171
```
@@ -97,7 +97,7 @@ The agent will:
9797
Make sure to set up the required environment variables:
9898

9999
```csharp
100-
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ??
100+
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ??
101101
throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
102102
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
103103
```
@@ -123,8 +123,7 @@ Popular MCP servers include:
123123
Each server provides different tools and capabilities that extend your agent's functionality.
124124
This integration allows your agents to seamlessly access external data and services while maintaining the security and standardization benefits of the Model Context Protocol.
125125

126-
127-
The full source code and instructions to run this sample is available [here](https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/ModelContextProtocol/Agent_MCP_Server).
126+
The full source code and instructions to run this sample is available at <https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/GettingStarted/ModelContextProtocol/Agent_MCP_Server>.
128127

129128
::: zone-end
130129
::: zone pivot="programming-language-python"
@@ -148,8 +147,8 @@ async def local_mcp_example():
148147
"""Example using a local MCP server via stdio."""
149148
async with (
150149
MCPStdioTool(
151-
name="calculator",
152-
command="uvx",
150+
name="calculator",
151+
command="uvx",
153152
args=["mcp-server-calculator"]
154153
) as mcp_server,
155154
ChatAgent(
@@ -159,7 +158,7 @@ async def local_mcp_example():
159158
) as agent,
160159
):
161160
result = await agent.run(
162-
"What is 15 * 23 + 45?",
161+
"What is 15 * 23 + 45?",
163162
tools=mcp_server
164163
)
165164
print(result)
@@ -240,7 +239,7 @@ if __name__ == "__main__":
240239
Common MCP servers you can use with Python Agent Framework:
241240

242241
- **Calculator**: `uvx mcp-server-calculator` - Mathematical computations
243-
- **Filesystem**: `uvx mcp-server-filesystem` - File system operations
242+
- **Filesystem**: `uvx mcp-server-filesystem` - File system operations
244243
- **GitHub**: `npx @modelcontextprotocol/server-github` - GitHub repository access
245244
- **SQLite**: `uvx mcp-server-sqlite` - Database operations
246245

agent-framework/user-guide/observability.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.service: agent-framework
1313

1414
Observability is a key aspect of building reliable and maintainable systems. Agent Framework provides built-in support for observability, allowing you to monitor the behavior of your agents.
1515

16-
This guide will walk you through the steps to enable observability with Agent Framework to help you understand how your agents are performing and diagnose any issues that may arise.
16+
This guide will walk you through the steps to enable observability with Agent Framework to help you understand how your agents are performing and diagnose any issues that might arise.
1717

1818
## OpenTelemetry Integration
1919

@@ -47,10 +47,10 @@ var agent = new ChatClientAgent(
4747
```
4848

4949
> [!IMPORTANT]
50-
> When you enable observability for your chat clients and agents, you may see duplicated information, especially when sensitive data is enabled. The chat context (including prompts and responses) that is captured by both the chat client and the agent will be included in both spans. Depending on your needs, you may choose to enable observability only on the chat client or only on the agent to avoid duplication. See the [GenAI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) for more details on the attributes captured for LLM and Agents.
50+
> When you enable observability for your chat clients and agents, you might see duplicated information, especially when sensitive data is enabled. The chat context (including prompts and responses) that is captured by both the chat client and the agent will be included in both spans. Depending on your needs, you might choose to enable observability only on the chat client or only on the agent to avoid duplication. See the [GenAI Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/) for more details on the attributes captured for LLM and Agents.
5151
5252
> [!NOTE]
53-
> Only enable sensitive data in development or testing environments, as it may expose user information in production logs and traces. Sensitive data includes prompts, responses, function call arguments, and results.
53+
> Only enable sensitive data in development or testing environments, as it might expose user information in production logs and traces. Sensitive data includes prompts, responses, function call arguments, and results.
5454
5555
### Configuration
5656

@@ -79,14 +79,14 @@ var resourceBuilder = ResourceBuilder
7979
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
8080
.SetResourceBuilder(resourceBuilder)
8181
.AddSource(SourceName)
82-
.AddSource("*Microsoft.Extensions.AI") // Listen to the Experimental.Microsoft.Extensions.AI source for chat client telemetry
83-
.AddSource("*Microsoft.Extensions.Agents*") // Listen to the Experimental.Microsoft.Extensions.Agents source for agent telemetry
82+
.AddSource("*Microsoft.Extensions.AI") // Listen to the Experimental.Microsoft.Extensions.AI source for chat client telemetry.
83+
.AddSource("*Microsoft.Extensions.Agents*") // Listen to the Experimental.Microsoft.Extensions.Agents source for agent telemetry.
8484
.AddAzureMonitorTraceExporter(options => options.ConnectionString = applicationInsightsConnectionString)
8585
.Build();
8686
```
8787

8888
> [!TIP]
89-
> Depending on your backend, you can use different exporters, see the [OpenTelemetry .NET documentation](https://opentelemetry.io/docs/instrumentation/net/exporters/) for more information. For local development, consider using the [Aspire Dashboard](#aspire-dashboard).
89+
> Depending on your backend, you can use different exporters. For more information, see the [OpenTelemetry .NET documentation](https://opentelemetry.io/docs/instrumentation/net/exporters/). For local development, consider using the [Aspire Dashboard](#aspire-dashboard).
9090
9191
#### Metrics
9292

@@ -151,8 +151,8 @@ Consider using the Aspire Dashboard as a quick way to visualize your traces and
151151
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
152152
.SetResourceBuilder(resourceBuilder)
153153
.AddSource(SourceName)
154-
.AddSource("*Microsoft.Extensions.AI") // Listen to the Experimental.Microsoft.Extensions.AI source for chat client telemetry
155-
.AddSource("*Microsoft.Extensions.Agents*") // Listen to the Experimental.Microsoft.Extensions.Agents source for agent telemetry
154+
.AddSource("*Microsoft.Extensions.AI") // Listen to the Experimental.Microsoft.Extensions.AI source for chat client telemetry.
155+
.AddSource("*Microsoft.Extensions.Agents*") // Listen to the Experimental.Microsoft.Extensions.Agents source for agent telemetry.
156156
.AddOtlpExporter(options => options.Endpoint = new Uri("http://localhost:4317"))
157157
.Build();
158158
```
@@ -307,7 +307,7 @@ These are wrappers of the OpenTelemetry API that return a tracer or meter from t
307307
The following environment variables control Agent Framework observability:
308308

309309
- `ENABLE_INSTRUMENTATION` - Default is `false`, set to `true` to enable OpenTelemetry instrumentation.
310-
- `ENABLE_SENSITIVE_DATA` - Default is `false`, set to `true` to enable logging of sensitive data (prompts, responses, function call arguments and results). Be careful with this setting as it may expose sensitive data.
310+
- `ENABLE_SENSITIVE_DATA` - Default is `false`, set to `true` to enable logging of sensitive data (prompts, responses, function call arguments, and results). Be careful with this setting as it might expose sensitive data.
311311
- `ENABLE_CONSOLE_EXPORTERS` - Default is `false`, set to `true` to enable console output for telemetry.
312312
- `VS_CODE_EXTENSION_PORT` - Port for AI Toolkit or Azure AI Foundry VS Code extension integration.
313313

@@ -396,7 +396,7 @@ agent = ChatAgent(
396396

397397
### Aspire Dashboard
398398

399-
For local development without Azure setup, you can use the [Aspire Dashboard](/dotnet/aspire/fundamentals/dashboard/standalone) which runs locally via Docker and provides an excellent telemetry viewing experience.
399+
For local development without Azure setup, you can use the [Aspire Dashboard](/dotnet/aspire/fundamentals/dashboard/standalone), which runs locally via Docker and provides an excellent telemetry viewing experience.
400400

401401
#### Setting up Aspire Dashboard with Docker
402402

@@ -409,7 +409,8 @@ docker run --rm -it -d \
409409
mcr.microsoft.com/dotnet/aspire-dashboard:latest
410410
```
411411

412-
This will start the dashboard with:
412+
This command will start the dashboard with:
413+
413414
- **Web UI**: Available at <http://localhost:18888>
414415
- **OTLP endpoint**: Available at `http://localhost:4317` for your applications to send telemetry data
415416

@@ -437,11 +438,11 @@ Once everything is setup, you will start seeing spans and metrics being created
437438
The metrics that are created are:
438439

439440
- For the chat client and `chat` operations:
440-
- `gen_ai.client.operation.duration` (histogram): This metric measures the duration of each operation, in seconds.
441-
- `gen_ai.client.token.usage` (histogram): This metric measures the token usage, in number of tokens.
441+
- `gen_ai.client.operation.duration` (histogram): This metric measures the duration of each operation, in seconds.
442+
- `gen_ai.client.token.usage` (histogram): This metric measures the token usage, in number of tokens.
442443

443444
- For function invocation during the `execute_tool` operations:
444-
- `agent_framework.function.invocation.duration` (histogram): This metric measures the duration of each function execution, in seconds.
445+
- `agent_framework.function.invocation.duration` (histogram): This metric measures the duration of each function execution, in seconds.
445446

446447
### Example trace output
447448

@@ -485,6 +486,6 @@ This trace shows:
485486

486487
## Samples
487488

488-
We have a number of samples in our repository that demonstrate these capabilities, see the [observability samples folder](https://github.com/microsoft/agent-framework/tree/main/python/samples/getting_started/observability) on Github. That includes samples for using zero-code telemetry as well.
489+
There are a number of samples in the `microsoft/agent-framework` repository that demonstrate these capabilities. For more information, see the [observability samples folder](https://github.com/microsoft/agent-framework/tree/main/python/samples/getting_started/observability). That folder includes samples for using zero-code telemetry as well.
489490

490491
::: zone-end

agent-framework/user-guide/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ ms.service: agent-framework
1010

1111
# Agent Framework User Guide
1212

13-
Welcome to the Agent Framework User Guide. This guide provides comprehensive information for developers and solution architects working with the Agent Framework. Here, you'll find detailed explanations of agent concepts, configuration options, advanced features, and best practices for building robust, scalable agent-based applications. Whether you're just getting started or looking to deepen your expertise, this guide will help you understand how to leverage the full capabilities of the Agent Framework in your projects.
13+
Welcome to the Agent Framework User Guide. This guide provides comprehensive information for developers and solution architects working with Agent Framework. Here, you'll find detailed explanations of agent concepts, configuration options, advanced features, and best practices for building robust, scalable agent-based applications. Whether you're just getting started or looking to deepen your expertise, this guide will help you understand how to leverage the full capabilities of Agent Framework in your projects.

agent-framework/user-guide/workflows/as-agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: agent-framework
1111

1212
# Microsoft Agent Framework Workflows - Using Workflows as Agents
1313

14-
This document provides an overview of how to use **Workflows as Agents** in the Microsoft Agent Framework.
14+
This document provides an overview of how to use **Workflows as Agents** in Microsoft Agent Framework.
1515

1616
## Overview
1717

@@ -41,7 +41,7 @@ When you convert a workflow to an agent:
4141

4242
To use a workflow as an agent, the workflow's start executor must be able to handle `IEnumerable<ChatMessage>` as input. This is automatically satisfied when using `ChatClientAgent` or other agent-based executors.
4343

44-
## Creating a Workflow Agent
44+
## Create a Workflow Agent
4545

4646
Use the `AsAgent()` extension method to convert any compatible workflow into an agent:
4747

agent-framework/user-guide/workflows/core-concepts/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: agent-framework
1111

1212
# Microsoft Agent Framework Workflows Core Concepts - Events
1313

14-
This document provides an in-depth look at the **Events** system of Workflows in the Microsoft Agent Framework.
14+
This document provides an in-depth look at the **Events** system of Workflows in Microsoft Agent Framework.
1515

1616
## Overview
1717

agent-framework/user-guide/workflows/observability.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ ms.service: agent-framework
1414
Observability provides insights into the internal state and behavior of workflows during execution. This includes logging, metrics, and tracing capabilities that help monitor and debug workflows.
1515

1616
> [!TIP]
17-
> Observability is a framework-wide feature and is not limited to workflows. For more information, refer to [Observability](../observability.md).
17+
> Observability is a framework-wide feature and is not limited to workflows. For more information, see [Observability](../observability.md).
1818
19-
Aside from the standard [GenAI telemetry](https://opentelemetry.io/docs/specs/semconv/gen-ai/), Agent Framework Workflows emits additional spans, logs, and metrics to provide deeper insights into workflow execution. These observability features help developers understand the flow of messages, the performance of executors, and any errors that may occur.
19+
Aside from the standard [GenAI telemetry](https://opentelemetry.io/docs/specs/semconv/gen-ai/), Agent Framework Workflows emits additional spans, logs, and metrics to provide deeper insights into workflow execution. These observability features help developers understand the flow of messages, the performance of executors, and any errors that might occur.
2020

2121
## Enable Observability
2222

@@ -34,13 +34,13 @@ Please refer to [Enabling Observability](../observability.md#enable-observabilit
3434

3535
## Workflow Spans
3636

37-
| Span Name | Description |
38-
|----------------------------------|--------------------------------------------------|
39-
| `workflow.build` | For each workflow build |
40-
| `workflow.run` | For each workflow execution |
41-
| `message.send` | For each message sent to an executor |
42-
| `executor.process` | For each executor processing a message |
43-
| `edge_group.process` | For each edge group processing a message |
37+
| Span Name | Description |
38+
|----------------------|------------------------------------------|
39+
| `workflow.build` | For each workflow build |
40+
| `workflow.run` | For each workflow execution |
41+
| `message.send` | For each message sent to an executor |
42+
| `executor.process` | For each executor processing a message |
43+
| `edge_group.process` | For each edge group processing a message |
4444

4545
### Links between Spans
4646

0 commit comments

Comments
 (0)