Skip to content

Commit 75beb14

Browse files
authored
Fix doc inaccuracies in various places (#954)
1 parent dee0b1a commit 75beb14

4 files changed

Lines changed: 53 additions & 36 deletions

File tree

agent-framework/agents/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The Microsoft Agent Framework provides support for several types of agents to ac
1818
::: zone pivot="programming-language-csharp"
1919
All agents are derived from a common base class, `AIAgent`, which provides a consistent interface for all agent types. This allows for building common, agent agnostic, higher level functionality such as multi-agent orchestrations.
2020
::: zone-end
21+
2122
::: zone pivot="programming-language-python"
2223
All agents are derived from a common base class, `Agent`, which provides a consistent interface for all agent types. This allows for building common, agent agnostic, higher level functionality such as multi-agent orchestrations.
2324
::: zone-end
@@ -28,7 +29,7 @@ All agents in the Microsoft Agent Framework execute using a structured runtime m
2829

2930
![AI Agent Diagram](../media/agent.svg)
3031

31-
> [!IMPORTANT]
32+
> [!WARNING]
3233
> If you use Microsoft Agent Framework to build applications that operate with third-party servers or agents, you do so at your own risk. We recommend reviewing all data being shared with third-party servers or agents and being cognizant of third-party practices for retention and location of data. It is your responsibility to manage whether your data will flow outside of your organization's Azure compliance and geographic boundaries and any related implications.
3334
3435
::: zone pivot="programming-language-csharp"
@@ -66,7 +67,6 @@ To make creating these agents even easier, Agent Framework provides helpers for
6667
|[Anthropic](./providers/anthropic.md)|An agent that uses a Claude model via the Anthropic Service as its backend.|No|Yes|
6768
|[OpenAI ChatCompletion](./providers/openai.md)|An agent that uses the OpenAI ChatCompletion service.|No|Yes|
6869
|[OpenAI Responses](./providers/openai.md)|An agent that uses the OpenAI Responses service.|Yes|Yes|
69-
|[OpenAI Assistants](./providers/openai.md)|An agent that uses the OpenAI Assistants service.|Yes|No|
7070
|[Any other `IChatClient`](./providers/custom.md)|You can also use any other [`Microsoft.Extensions.AI.IChatClient`](/dotnet/ai/microsoft-extensions-ai#the-ichatclient-interface) implementation to create an agent.|Varies|Varies|
7171

7272
## Complex custom agents
@@ -261,7 +261,6 @@ For detailed examples, see the agent-specific documentation sections below.
261261
|[Azure OpenAI Assistants](./providers/azure-openai.md)|An agent that uses the Azure OpenAI Assistants service.|Yes|
262262
|[OpenAI Chat Completion](./providers/openai.md)|An agent that uses the OpenAI Chat Completion service.|No|
263263
|[OpenAI Responses](./providers/openai.md)|An agent that uses the OpenAI Responses service.|Yes|
264-
|[OpenAI Assistants](./providers/openai.md)|An agent that uses the OpenAI Assistants service.|Yes|
265264
|[Anthropic Claude](./providers/anthropic.md)|An agent that uses Anthropic Claude models.|No|
266265
|[Amazon Bedrock](https://github.com/microsoft/agent-framework/tree/main/python/packages/bedrock)|An agent that uses Amazon Bedrock models through the Agent Framework Bedrock chat client.|No|
267266
|[GitHub Copilot](./providers/github-copilot.md)|An agent that uses the GitHub Copilot SDK backend.|No|

agent-framework/agents/running-agents.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ zone_pivot_groups: programming-languages
55
author: markwallace
66
ms.topic: reference
77
ms.author: markwallace
8-
ms.date: 09/24/2025
8+
ms.date: 03/31/2026
99
ms.service: agent-framework
1010
---
1111

@@ -269,20 +269,38 @@ Here are some popular types from <xref:Microsoft.Extensions.AI>:
269269
| <xref:Microsoft.Extensions.AI.FunctionResultContent> | The result of a function tool invocation. |
270270

271271
::: zone-end
272+
272273
::: zone pivot="programming-language-python"
273274

274275
The Python Agent Framework uses message and content types from the `agent_framework` package.
275-
Messages are represented by the `Message` class and all content classes inherit from the base `Content` class.
276-
277-
Various `Content` subclasses exist that are used to represent different types of content:
278-
279-
|Type|Description|
280-
|---|---|
281-
|`Content`|Unified content type with factory methods (`Content.from_text()`, `Content.from_data()`, `Content.from_uri()`). Use the `type` property to check content type ("text", "data", "uri").|
282-
|`FunctionCallContent`|A request by an AI service to invoke a function tool.|
283-
|`FunctionResultContent`|The result of a function tool invocation.|
284-
|`ErrorContent`|Error information when processing fails.|
285-
|`UsageContent`|Token usage and billing information from the AI service.|
276+
Messages are represented by the `Message` class and all content items are represented by the `Content` class discriminated by the `type` property.
277+
278+
All content is represented by the unified `Content` class with factory methods for each content type. Use the `type` property to check the content type. The following content types are available:
279+
280+
| Content Type | Factory Method | Description |
281+
|---|---|---|
282+
| `"text"` | `Content.from_text()` | Textual content for input and output. Typically contains the text result from an agent. |
283+
| `"text_reasoning"` | `Content.from_text_reasoning()` | Reasoning text from models that support chain-of-thought reasoning. May include protected data. |
284+
| `"data"` | `Content.from_data()`, `Content.from_uri()` | Binary content encoded as a data URI. Used for images, audio, video, and documents. |
285+
| `"uri"` | `Content.from_uri()` | A URL pointing to hosted content such as an image, audio, or video. |
286+
| `"error"` | `Content.from_error()` | Error information when processing fails. Includes optional error code and details. |
287+
| `"function_call"` | `Content.from_function_call()` | A request by an AI service to invoke a function tool. |
288+
| `"function_result"` | `Content.from_function_result()` | The result of a function tool invocation. |
289+
| `"usage"` | `Content.from_usage()` | Token usage and billing information from the AI service. |
290+
| `"hosted_file"` | `Content.from_hosted_file()` | A reference to a file hosted by the provider (for example, uploaded to OpenAI). |
291+
| `"hosted_vector_store"` | `Content.from_hosted_vector_store()` | A reference to a vector store hosted by the provider. |
292+
| `"code_interpreter_tool_call"` | `Content.from_code_interpreter_tool_call()` | A request by the AI service to execute code via a code interpreter. |
293+
| `"code_interpreter_tool_result"` | `Content.from_code_interpreter_tool_result()` | The result of a code interpreter execution. |
294+
| `"image_generation_tool_call"` | `Content.from_image_generation_tool_call()` | A request by the AI service to generate an image. |
295+
| `"image_generation_tool_result"` | `Content.from_image_generation_tool_result()` | The result of an image generation request. |
296+
| `"mcp_server_tool_call"` | `Content.from_mcp_server_tool_call()` | A request to invoke a tool on an MCP server. |
297+
| `"mcp_server_tool_result"` | `Content.from_mcp_server_tool_result()` | The result of an MCP server tool invocation. |
298+
| `"shell_tool_call"` | `Content.from_shell_tool_call()` | A request by the AI service to execute shell commands. |
299+
| `"shell_tool_result"` | `Content.from_shell_tool_result()` | The aggregate result of a shell tool call. |
300+
| `"shell_command_output"` | `Content.from_shell_command_output()` | The output of a single shell command execution. |
301+
| `"function_approval_request"` | `Content.from_function_approval_request()` | A request for user approval before executing a function call. |
302+
| `"function_approval_response"` | `Content.from_function_approval_response()` | The user's response to a function approval request. |
303+
| `"oauth_consent_request"` | `Content.from_oauth_consent_request()` | A request for the user to complete OAuth consent via a provided link. |
286304

287305
Here's how to work with different content types:
288306

agent-framework/get-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This tutorial walks you through building an AI agent from scratch, adding one co
1616
|------|-------------------|
1717
| [Step 1: Your First Agent](your-first-agent.md) | Create an agent, invoke it, and stream the response |
1818
| [Step 2: Add Tools](add-tools.md) | Give the agent a function tool it can call |
19-
| [Step 3: Multi-Turn Conversations](multi-turn.md) | Maintain conversation state with threads |
19+
| [Step 3: Multi-Turn Conversations](multi-turn.md) | Maintain conversation state with sessions |
2020
| [Step 4: Memory & Persistence](memory.md) | Inject persistent context via context providers |
2121
| [Step 5: Workflows](workflows.md) | Compose a multi-step workflow |
2222
| [Step 6: Host Your Agent](hosting.md) | Expose the agent via hosting infrastructure |

agent-framework/get-started/workflows.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,35 @@ Define workflow steps (executors):
2121
using Microsoft.Agents.AI.Workflows;
2222

2323
// Step 1: Convert text to uppercase
24-
class UpperCase : Executor
25-
{
26-
[Handler]
27-
public async Task ToUpperCase(string text, WorkflowContext<string> ctx)
28-
{
29-
await ctx.SendMessageAsync(text.ToUpper());
30-
}
31-
}
24+
Func<string, string> uppercaseFunc = s => s.ToUpperInvariant();
25+
var uppercase = uppercaseFunc.BindAsExecutor("UppercaseExecutor");
3226

3327
// Step 2: Reverse the string and yield output
34-
[Executor(Id = "reverse_text")]
35-
static async Task ReverseText(string text, WorkflowContext<Never, string> ctx)
28+
class ReverseTextExecutor() : Executor<string, string>("ReverseTextExecutor")
3629
{
37-
var reversed = new string(text.Reverse().ToArray());
38-
await ctx.YieldOutputAsync(reversed);
30+
public override ValueTask<string> HandleAsync(string message, IWorkflowContext context, CancellationToken cancellationToken = default)
31+
{
32+
return ValueTask.FromResult(string.Concat(message.Reverse()));
33+
}
3934
}
35+
ReverseTextExecutor reverse = new();
4036
```
4137

4238
Build and run the workflow:
4339

4440
```csharp
45-
var upper = new UpperCase();
46-
var workflow = new AgentWorkflowBuilder(startExecutor: upper)
47-
.AddEdge(upper, ReverseText)
48-
.Build();
49-
50-
var result = await workflow.RunAsync("hello world");
51-
Console.WriteLine($"Output: {string.Join(", ", result.GetOutputs())}");
52-
// Output: DLROW OLLEH
41+
WorkflowBuilder builder = new(uppercase);
42+
builder.AddEdge(uppercase, reverse).WithOutputFrom(reverse);
43+
var workflow = builder.Build();
44+
45+
await using Run run = await InProcessExecution.RunAsync(workflow, "Hello, World!");
46+
foreach (WorkflowEvent evt in run.NewEvents)
47+
{
48+
if (evt is ExecutorCompletedEvent executorComplete)
49+
{
50+
Console.WriteLine($"{executorComplete.ExecutorId}: {executorComplete.Data}");
51+
}
52+
}
5353
```
5454

5555
> [!TIP]

0 commit comments

Comments
 (0)