mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
d18ce24bf8
* feat(mcp): add full _meta field support for CallToolResult objects - Extract and preserve complete _meta field from MCP CallToolResult responses - Merge metadata into additional_properties of converted content items - Handle isError field for proper error state integration - Support arbitrary metadata like token usage, costs, and performance metrics - Maintain backward compatibility with existing tool execution workflows - Add comprehensive test coverage for all metadata scenarios including edge cases - Update documentation with metadata handling examples and patterns Fixes protocol compliance violation where _meta fields were being dropped, enables proper monitoring and cost tracking of MCP tool usage. * Update python/packages/core/agent_framework/_mcp.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Clarify MCP _meta field test to use generic example metadata - Updated test_mcp_call_tool_result_with_meta_arbitrary_data to use arbitrary metadata fields - Added comments to emphasize that _meta structure is server-specific and not standardized --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
d18ce24bf8
ยท
2025-11-21 08:43:24 +00:00
History
Agent Examples
This folder contains examples demonstrating how to create and use agents with different chat clients from the Agent Framework. Each sub-folder focuses on a specific provider and client type, showing various capabilities like function tools, code interpreter, thread management, structured outputs, image processing, web search, Model Context Protocol (MCP) integration, and more.
Examples by Provider
Azure AI Foundry Examples
| Folder | Description |
|---|---|
azure_ai_agent/ |
Create agents using Azure AI Agent Service (based on azure-ai-agents V1 package) including function tools, code interpreter, MCP integration, thread management, and more. |
azure_ai/ |
Create agents using Azure AI Agent Service (based on azure-ai-projects V2 package) including function tools, code interpreter, MCP integration, thread management, and more. |
Microsoft Copilot Studio Examples
| Folder | Description |
|---|---|
copilotstudio/ |
Create agents using Microsoft Copilot Studio with streaming and non-streaming responses, authentication handling, and explicit configuration options |
Azure OpenAI Examples
| Folder | Description |
|---|---|
azure_openai/ |
Create agents using Azure OpenAI APIs with multiple client types (Assistants, Chat, and Responses clients) supporting function tools, code interpreter, thread management, and more |
OpenAI Examples
| Folder | Description |
|---|---|
openai/ |
Create agents using OpenAI APIs with comprehensive examples including Assistants, Chat, and Responses clients featuring function tools, code interpreter, file search, web search, MCP integration, image analysis/generation, structured outputs, reasoning, and thread management |
Anthropic Examples
| Folder | Description |
|---|---|
anthropic/ |
Create agents using Anthropic models through OpenAI Chat Client configuration, demonstrating tool calling capabilities |
Custom Implementation Examples
| Folder | Description |
|---|---|
custom/ |
Create custom agents and chat clients by extending the base framework classes, showing complete control over agent behavior and backend integration |