You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent-framework/user-guide/model-context-protocol/index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,8 @@ Model Context Protocol is an open standard that defines how applications provide
16
16
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.
17
17
18
18
## 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.
20
21
21
22
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.
22
23
@@ -25,6 +26,7 @@ We recommend that you carefully review and track what MCP servers you add to you
25
26
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.
26
27
27
28
## How it works
29
+
28
30
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.
29
31
30
32
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:
41
43
> [!div class="nextstepaction"]
42
44
> [Using MCP tools with Agents](./using-mcp-tools.md)
43
45
> [Using MCP tools with Foundry Agents](./using-mcp-with-foundry-agents.md)
Copy file name to clipboardExpand all lines: agent-framework/user-guide/model-context-protocol/using-mcp-tools.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ ms.service: agent-framework
11
11
12
12
# Using MCP tools with Agents
13
13
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.
15
15
16
16
::: zone pivot="programming-language-csharp"
17
17
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.
19
19
20
20
The following sample shows how to:
21
21
@@ -55,7 +55,7 @@ var mcpTools = await mcpClient.ListToolsAsync().ConfigureAwait(false);
55
55
56
56
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.
57
57
58
-
### Creating an Agent with MCP Tools
58
+
### Create an Agent with MCP Tools
59
59
60
60
Create your agent and provide the MCP tools during initialization:
61
61
@@ -65,7 +65,7 @@ AIAgent agent = new AzureOpenAIClient(
65
65
newAzureCliCredential())
66
66
.GetChatClient(deploymentName)
67
67
.CreateAIAgent(
68
-
instructions: "You answer questions related to GitHub repositories only.",
68
+
instructions: "You answer questions related to GitHub repositories only.",
69
69
tools: [..mcpTools.Cast<AITool>()]);
70
70
71
71
```
@@ -97,7 +97,7 @@ The agent will:
97
97
Make sure to set up the required environment variables:
Each server provides different tools and capabilities that extend your agent's functionality.
124
124
This integration allows your agents to seamlessly access external data and services while maintaining the security and standardization benefits of the Model Context Protocol.
125
125
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>.
Copy file name to clipboardExpand all lines: agent-framework/user-guide/observability.md
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.service: agent-framework
13
13
14
14
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.
15
15
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.
17
17
18
18
## OpenTelemetry Integration
19
19
@@ -47,10 +47,10 @@ var agent = new ChatClientAgent(
47
47
```
48
48
49
49
> [!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.
51
51
52
52
> [!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.
54
54
55
55
### Configuration
56
56
@@ -79,14 +79,14 @@ var resourceBuilder = ResourceBuilder
> 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).
90
90
91
91
#### Metrics
92
92
@@ -151,8 +151,8 @@ Consider using the Aspire Dashboard as a quick way to visualize your traces and
@@ -307,7 +307,7 @@ These are wrappers of the OpenTelemetry API that return a tracer or meter from t
307
307
The following environment variables control Agent Framework observability:
308
308
309
309
-`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.
311
311
-`ENABLE_CONSOLE_EXPORTERS` - Default is `false`, set to `true` to enable console output for telemetry.
312
312
-`VS_CODE_EXTENSION_PORT` - Port for AI Toolkit or Azure AI Foundry VS Code extension integration.
313
313
@@ -396,7 +396,7 @@ agent = ChatAgent(
396
396
397
397
### Aspire Dashboard
398
398
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.
400
400
401
401
#### Setting up Aspire Dashboard with Docker
402
402
@@ -409,7 +409,8 @@ docker run --rm -it -d \
409
409
mcr.microsoft.com/dotnet/aspire-dashboard:latest
410
410
```
411
411
412
-
This will start the dashboard with:
412
+
This command will start the dashboard with:
413
+
413
414
-**Web UI**: Available at <http://localhost:18888>
414
415
-**OTLP endpoint**: Available at `http://localhost:4317` for your applications to send telemetry data
415
416
@@ -437,11 +438,11 @@ Once everything is setup, you will start seeing spans and metrics being created
437
438
The metrics that are created are:
438
439
439
440
- 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.
442
443
443
444
- 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.
445
446
446
447
### Example trace output
447
448
@@ -485,6 +486,6 @@ This trace shows:
485
486
486
487
## Samples
487
488
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.
Copy file name to clipboardExpand all lines: agent-framework/user-guide/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,4 +10,4 @@ ms.service: agent-framework
10
10
11
11
# Agent Framework User Guide
12
12
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.
Copy file name to clipboardExpand all lines: agent-framework/user-guide/workflows/as-agents.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.service: agent-framework
11
11
12
12
# Microsoft Agent Framework Workflows - Using Workflows as Agents
13
13
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.
15
15
16
16
## Overview
17
17
@@ -41,7 +41,7 @@ When you convert a workflow to an agent:
41
41
42
42
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.
43
43
44
-
## Creating a Workflow Agent
44
+
## Create a Workflow Agent
45
45
46
46
Use the `AsAgent()` extension method to convert any compatible workflow into an agent:
Copy file name to clipboardExpand all lines: agent-framework/user-guide/workflows/observability.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,9 @@ ms.service: agent-framework
14
14
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.
15
15
16
16
> [!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).
18
18
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.
20
20
21
21
## Enable Observability
22
22
@@ -34,13 +34,13 @@ Please refer to [Enabling Observability](../observability.md#enable-observabilit
0 commit comments