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/agents/index.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ The Microsoft Agent Framework provides support for several types of agents to ac
18
18
::: zone pivot="programming-language-csharp"
19
19
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.
20
20
::: zone-end
21
+
21
22
::: zone pivot="programming-language-python"
22
23
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.
23
24
::: zone-end
@@ -28,7 +29,7 @@ All agents in the Microsoft Agent Framework execute using a structured runtime m
28
29
29
30

30
31
31
-
> [!IMPORTANT]
32
+
> [!WARNING]
32
33
> 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.
33
34
34
35
::: zone pivot="programming-language-csharp"
@@ -66,7 +67,6 @@ To make creating these agents even easier, Agent Framework provides helpers for
66
67
|[Anthropic](./providers/anthropic.md)|An agent that uses a Claude model via the Anthropic Service as its backend.|No|Yes|
67
68
|[OpenAI ChatCompletion](./providers/openai.md)|An agent that uses the OpenAI ChatCompletion service.|No|Yes|
68
69
|[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|
70
70
|[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|
71
71
72
72
## Complex custom agents
@@ -261,7 +261,6 @@ For detailed examples, see the agent-specific documentation sections below.
261
261
|[Azure OpenAI Assistants](./providers/azure-openai.md)|An agent that uses the Azure OpenAI Assistants service.|Yes|
262
262
|[OpenAI Chat Completion](./providers/openai.md)|An agent that uses the OpenAI Chat Completion service.|No|
263
263
|[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|
265
264
|[Anthropic Claude](./providers/anthropic.md)|An agent that uses Anthropic Claude models.|No|
266
265
|[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|
267
266
|[GitHub Copilot](./providers/github-copilot.md)|An agent that uses the GitHub Copilot SDK backend.|No|
@@ -269,20 +269,38 @@ Here are some popular types from <xref:Microsoft.Extensions.AI>:
269
269
|<xref:Microsoft.Extensions.AI.FunctionResultContent>| The result of a function tool invocation. |
270
270
271
271
::: zone-end
272
+
272
273
::: zone pivot="programming-language-python"
273
274
274
275
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. |
0 commit comments