Commit Graph

1779 Commits

  • Python: fix: update PyRIT repository link from Azure/PyRIT to microsoft/PyRIT (#4960)
    * Initial plan
    
    * fix: update PyRIT repository link from Azure/PyRIT to microsoft/PyRIT
    
    Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/830b8ccf-a79c-49b6-90c9-3bb3e740bc06
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: [Breaking] Update Foundry Agents for Responses API (#4502)
    * Stage
    
    * Add FoundryAgentClient, model param, chatClientFactory, and RAPI samples
    
    - Add model parameter to FoundryAgentClient simple constructor
    - Add chatClientFactory parameter to both constructors
    - Switch to OpenAI.GetProjectResponsesClientForModel for direct Responses API usage
    - Add FoundryAgents-RAPI samples (Step01 Basics, Step02 Multiturn, Step03 FunctionTools)
    - Add solution folder entry for FoundryAgents-RAPI samples
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add auto-discovery constructor and simplify RAPI samples
    
    - Add FoundryAgentClient constructor that reads AZURE_AI_PROJECT_ENDPOINT and
      AZURE_AI_MODEL_DEPLOYMENT_NAME from environment variables with DefaultAzureCredential
    - Simplify RAPI samples to use auto-discovery (no env var or credential code)
    - Remove Azure.Identity direct references from sample csproj files
    - Update READMEs to document environment variable requirements
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add remaining RAPI samples (Step04-Step12)
    
    - Step04: Function tools with human-in-the-loop approvals
    - Step05: Structured output with typed responses
    - Step06: Persisted conversations with session serialization
    - Step07: Observability with OpenTelemetry
    - Step08: Dependency injection with hosted service
    - Step10: Image multi-modality
    - Step11: Agent as function tool (agent composition)
    - Step12: Middleware (PII, guardrails, function logging, HITL approval)
    - Update solution file and folder README with all new samples
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add all RAPI samples (Step09-Step23) and switch to AzureCliCredential
    
    - Step09: MCP client as tools (GitHub server via stdio)
    - Step13: Plugins with dependency injection
    - Step14: Code Interpreter tool
    - Step15: Computer Use tool with screenshot simulation
    - Step16: File Search with vector stores
    - Step17: OpenAPI tools (REST Countries API)
    - Step18: Bing Custom Search
    - Step19: SharePoint grounding
    - Step20: Microsoft Fabric
    - Step21: Web Search with citations
    - Step22: Memory Search with multi-turn conversations
    - Step23: Local MCP via HTTP (Microsoft Learn)
    - Switch all samples (Step04-Step12) to use AzureCliCredential with env vars
    - Update solution file and README with all 23 samples
    - All 23 samples build successfully, tested Step05/06/11/13/21
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Switch Step01-03 samples to AzureCliCredential for consistency
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Clarify connection ID format in SharePoint and Fabric READMEs
    
    Document that SHAREPOINT_PROJECT_CONNECTION_ID and FABRIC_PROJECT_CONNECTION_ID
    should use the connection name (e.g., 'SharepointTestTool'), not the full ARM
    resource URI.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Normalize env vars, fix structured output, update READMEs with connection ID formats
    
    - Normalize AZURE_FOUNDRY_PROJECT_* env vars to AZURE_AI_PROJECT_ENDPOINT / AZURE_AI_MODEL_DEPLOYMENT_NAME across all samples (Steps 18-22 READMEs + Steps 19-20 Program.cs)
    - Fix RAPI Step05 StructuredOutput to use full constructor with ResponseFormat for streaming JSON
    - Update Deep Research sample to use AzureCliCredential
    - Enrich Bing Grounding README with full ARM resource URI format
    - Fix Bing Custom Search README env var mismatch (BING_CUSTOM_SEARCH_* -> AZURE_AI_CUSTOM_SEARCH_*)
    - Add finding instructions for connection ID and instance name in Bing Custom Search READMEs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Refactor memory samples and switch to DefaultAzureCredential
    
    - Refactor RAPI Step22 MemorySearch: extract store setup to EnsureMemoryStoreAsync local function
    - Refactor non-RAPI Step22 MemorySearch: same pattern with explicit memory lifecycle
    - Set UpdateDelay=0 on MemoryUpdateOptions and MemorySearchPreviewTool for faster ingestion
    - Use WaitForMemoriesUpdateAsync with 500ms polling interval
    - Switch Step19 SharePoint, Step20 Fabric, Step22 MemorySearch (both) to DefaultAzureCredential
    - Remove SearchOptions from MemorySearchPreviewTool (causes unknown parameter error)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Switch all RAPI samples to DefaultAzureCredential and format
    
    - Replace AzureCliCredential with DefaultAzureCredential across all 20 RAPI samples
    - Run dotnet format on all RAPI and non-RAPI Foundry samples
    - AzureAI unit tests: 341 passed (net10.0 + net472)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Rename to Microsoft Foundry, add metadata, rename RAPI folder
    
    - Replace 'Azure AI Foundry' / 'Azure Foundry' with 'Microsoft Foundry' in all docs, comments, and XML docs
    - Update FoundryAgentClient metadata provider name to 'microsoft.foundry'
    - Rename FoundryAgents-RAPI folder to FoundryResponseAgents
    - Rewrite FoundryResponseAgents README with comparison table vs Foundry Agents
    - Update slnx and parent README with new folder references
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: simplify sample comments and fix DeepResearch credential
    
    - Remove 'no server-side agent' and 'Responses API directly' phrasing from comments
    - Simplify to 'Create a FoundryAgentClient' per review feedback
    - Switch Agent_Step15_DeepResearch to DefaultAzureCredential
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Restore full DefaultAzureCredential warning comment in DeepResearch sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add ADR 0020: Foundry agent type naming convention
    
    Proposes naming options for a new MAF type wrapping versioned
    Foundry agents (Prompt, ContainerApp, Hosted, Workflow) to
    distinguish from the existing FoundryResponsesAgent (RAPI path).
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Simplify FoundryResponsesAgent samples with env-var constructors and rename folders
    
    - Add env-var constructors to FoundryResponsesAgent (simple + options-based)
    - Fix Constructor 1 model optionality (no longer throws on missing AZURE_AI_MODEL_DEPLOYMENT_NAME)
    - Add ApplyModelDeploymentFallback helper for options-based constructor
    - Update all 23 FoundryResponseAgents samples to remove Environment.GetEnvironmentVariable boilerplate
    - Condense 6 simple samples to one-liner constructor calls
    - Add XML doc remarks about auto-resolved parameters on all constructors
    - Rename FoundryAgents -> FoundryVersionedAgents (server-side, versioned)
    - Rename FoundryResponseAgents -> FoundryAgents (now the default path forward)
    - Update .slnx and README cross-references for new folder names
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add FoundryAITool factory, rename RAPI folders, and clean up references
    
    - Create FoundryAITool static factory class with 17 methods wrapping AgentTool.Create* and ResponseTool.Create* into AITool returns
    - Rename 23 FoundryAgentsRAPI_* subfolders to FoundryAgents_* (drop RAPI prefix)
    - Rename .csproj files and update .slnx references accordingly
    - Update 12 samples (6 FoundryAgents + 6 FoundryVersionedAgents) to use FoundryAITool
    - Replace all FoundryResponsesAgent references with FoundryAgent in comments and READMEs
    - Update sample READMEs to reference FoundryAITool methods
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Rename FoundryVersionedAgents subfolders from FoundryAgents_* to FoundryVersionedAgents_*
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add FoundryVersionedAgent class and refactor extension method internals
    
    - Create FoundryVersionedAgent with private ctor and async static factory methods
      (CreateAIAgentAsync/GetAIAgentAsync) with env-var and explicit endpoint tiers
    - Extract shared internal helpers from AzureAIProjectChatClientExtensions:
      CreateChatClientAgent, CreateAgentVersionFromOptionsAsync,
      CreateAgentVersionWithProtocolAsync (tools overload),
      CreateChatClientAgentOptions, GetAgentRecordByNameAsync, ThrowIfInvalidAgentName
    - Extension methods now delegate to shared internal helpers
    - All 49 existing samples continue to build successfully
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add CreateConversationSessionAsync, DeleteAIAgentAsync, auto-resolve model, simplify samples
    
    - Add CreateConversationSessionAsync to FoundryAgent and FoundryVersionedAgent
      (returns ChatClientAgentSession, creates server-side conversation + session in one call)
    - Add DeleteAIAgentAsync static method to FoundryVersionedAgent
    - Make model parameter optional in env-var factory overloads (auto-resolves from
      AZURE_AI_MODEL_DEPLOYMENT_NAME)
    - Update all FoundryVersionedAgents samples to use DeleteAIAgentAsync
    - Remove deploymentName env var from samples where only used for model parameter
    - Use CreateConversationSessionAsync in Step02_MultiturnConversation
    - Use explicit types instead of var for agent/session variables
    - All 49 samples build successfully
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove manual AIProjectClient construction from FoundryVersionedAgents samples
    
    - Replace manual AIProjectClient construction with GetService<AIProjectClient>()
      from the FoundryVersionedAgent in all dual-option and tool-specific samples
    - Remove AZURE_AI_PROJECT_ENDPOINT env var reads from updated samples
    - Remove Azure.Identity usings where no longer needed
    - Only Step01.1, Step01.2, Eval_Step01 retain manual construction (pedagogical samples)
    - All 49 samples build successfully
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Replace aiProjectClient extension calls with FoundryVersionedAgent factories in all samples
    
    - Replace aiProjectClient.CreateAIAgentAsync with FoundryVersionedAgent.CreateAIAgentAsync
      in Option 2 (Native SDK) paths across Steps 14-21
    - Replace aiProjectClient.Agents.DeleteAgentAsync with FoundryVersionedAgent.DeleteAIAgentAsync
    - Remove unused AIProjectClient variables and using directives
    - Only Step01.1, Step01.2, Eval_Step01 retain direct AIProjectClient usage (pedagogical)
    - Step16, Step22 use GetService<AIProjectClient>() for file/memory operations
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove unused using directives from Step01.2, Step09, Eval_Step02
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update ADR 0020 with accepted decision: Option 6
    
    - Add Option 6 detailing FoundryAgent, FoundryVersionedAgent, FoundryAITool,
      env-var auto-discovery, and self-contained factory patterns
    - Mark decision as accepted with rationale
    - Update current state and metadata sections
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update Step01 basics samples to use FoundryVersionedAgent factories
    
    - Step01.1: Replace manual AIProjectClient/AsAIAgent with FoundryVersionedAgent.CreateAIAgentAsync/GetAIAgentAsync/DeleteAIAgentAsync
    - Step01.2: Replace manual AIProjectClient with FoundryVersionedAgent.CreateAIAgentAsync/DeleteAIAgentAsync
    - Remove env var boilerplate and Azure.Identity dependency
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add DeleteAIAgentVersionAsync to FoundryVersionedAgent
    
    - DeleteAIAgentAsync: deletes the agent and all its versions (existing)
    - DeleteAIAgentVersionAsync: deletes only the specific version associated with the agent instance
    - Internally delegates to Agents.DeleteAgentAsync vs Agents.DeleteAgentVersionAsync
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix cleanup comments: DeleteAIAgentAsync deletes the agent and all its versions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update all FoundryVersionedAgents READMEs for FoundryVersionedAgent and auto-discovery
    
    - Rewrite main README with FoundryVersionedAgent usage, auto-discovery table, code example
    - Fix sample table links from FoundryAgents_Step* to FoundryVersionedAgents_Step*
    - Add FoundryAITool references in tool-specific sample descriptions
    - Update individual READMEs: fix stale paths, add auto-discovery note after env var blocks
    - Update tool references: AgentTool/ResponseTool -> FoundryAITool
    - Update parent 02-agents/README.md with FoundryVersionedAgent description
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Revert unrelated AGUI and Hosting.OpenAI formatting changes to main
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove env-var auto-discovery, add AsAIAgent, mark extensions Obsolete
    
    - Remove 2 env-var constructors from FoundryAgent (keep explicit endpoint ctors)
    - Remove 5 env-var factory methods from FoundryVersionedAgent (keep explicit ones)
    - Add 3 AsAIAgent static methods to FoundryVersionedAgent (AgentVersion/AgentRecord/AgentReference)
    - Mark all 8 AIProjectClient extension methods as [Obsolete] pointing to FoundryVersionedAgent
    - Remove ApplyModelDeploymentFallback, env var constants, Azure.Identity usings from source
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update all samples to use explicit endpoint, credential, and model parameters
    
    - Add explicit Environment.GetEnvironmentVariable reads for AZURE_AI_PROJECT_ENDPOINT
      and AZURE_AI_MODEL_DEPLOYMENT_NAME to all 48 sample files
    - Pass new Uri(endpoint), new DefaultAzureCredential(), deploymentName to
      FoundryAgent constructors and FoundryVersionedAgent factory methods
    - Add using Azure.Identity where missing
    - Matches repo-wide pattern used by other non-Foundry samples
    - All 49 samples build successfully
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Migrate remaining samples and source from obsoleted extension methods
    
    - Migrate AgentProviders, AgentWithRAG, AgentWithMemory, HostedWorkflow samples to FoundryVersionedAgent
    - Migrate AzureAgentProvider.cs to FoundryVersionedAgent.AsAIAgent
    - Migrate AzureAIProjectChatClientTests.cs to FoundryVersionedAgent.GetAIAgentAsync
    - Remove pragma suppressions from migrated files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add unit tests for FoundryAgent and FoundryVersionedAgent
    
    - FoundryAgentTests.cs: 14 tests covering constructors, validation,
      properties, metadata, GetService, chat client factory, user-agent header
    - FoundryVersionedAgentTests.cs: 31 tests covering CreateAIAgentAsync,
      GetAIAgentAsync, AsAIAgent (3 overloads), DeleteAIAgentAsync,
      DeleteAIAgentVersionAsync, validation, invalid names, metadata, GetService
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Finalize Foundry agent migration
    
    Align FoundryAgent and FoundryVersionedAgent samples, docs, and tests with the explicit configuration model, clean up stale README guidance, and fix AzureAI unit test validation/build issues.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply formatter cleanup after validation
    
    Capture the dotnet format follow-up changes produced during branch validation so the committed state matches the successfully built and tested branch.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add integration tests for FoundryAgent and FoundryVersionedAgent
    
    Mark old AIProjectClient extension-method integration tests as obsolete and add new integration test suites for both FoundryAgent (Responses API) and FoundryVersionedAgent (versioned agents). All 71 non-skipped tests pass against the live Foundry service.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update ADR 0020 with test coverage details
    
    Add integration test coverage note to the Current State section of ADR 0020.
    
    * Simplify Foundry agents and validate moved samples
    
    * Rename FoundryAgent integration tests to ResponsesAgent
    
    The test classes exercise the non-versioned Responses path via
    AIProjectClient.AsAIAgent(), not the removed FoundryAgent wrapper type.
    Rename files and class names to reflect the actual test surface.
    
    * Update documentation for ChatClientAgent usage
    
    Added example usage of ChatClientAgent with JokerAgent.
    
    * Refactor ChatClientAgent instantiation for clarity
    
    * Revise agent type naming and usage examples
    
    Updated documentation to reflect changes in agent creation methods and added examples for using `ChatClientAgent`.
    
    * Fix Azure SDK namespace migration after rebase
    
    Update Azure.AI.Projects.OpenAI references to Azure.AI.Projects.Agents
    and Azure.AI.Extensions.OpenAI to match Azure.AI.Projects 2.0.0-beta.2.
    
    - Replace deprecated namespace across samples, tests, and src
    - Fix renamed types: OpenAPIFunctionDefinition -> OpenApiFunctionDefinition,
      BingCustomSearchToolParameters -> BingCustomSearchToolOptions,
      BrowserAutomationToolParameters -> BrowserAutomationToolOptions
    - Fix API changes: AgentRecord.Versions -> GetLatestVersion(),
      ResponsesClient constructor, FunctionApprovalRequestContent ->
      ToolApprovalRequestContent
    - Apply dotnet format
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address merge markers
    
    * Replace obsolete GetAIAgentAsync with AsAIAgent in samples
    
    Switch Agent_Step07_AsMcpTool and A2AServer to use the non-obsolete
    PersistentAgentsClient.AsAIAgent(PersistentAgent) extension instead
    of the deprecated GetAIAgentAsync, fixing CS0618 build errors.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix broken markdown links in Responses sample READMEs
    
    Replace stale ChatClientAgents_Step* folder references with the
    correct Agent_Step* names across all Responses sample READMEs.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix format errors and address PR review comments
    
    - Fix charset and remove unused using in AzureAIProjectResponsesChatClient
    - Fix doc comment tags (code -> c) in FoundryAITool
    - Fix stray period in LocalMCP sample comment
    - Fix grammar in FoundryMemoryProvider xmldoc
    - Fix AIProjectClientAgentRunStreamingConversationTests base class
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply dotnet format fixes to PR-changed files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix build errors from format pass and apply naming conventions
    
    - Fix static call to CreateSessionAsync in Step02 samples and extension tests
    - Use expression-bodied lambda in FoundryMemoryProvider (RCS1021)
    - Apply PascalCase naming to const fields in ResponsesAgentExtensionCreateTests (IDE1006)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Introduce FoundryAgent sealed type and update AsAIAgent extensions
    
    - Add FoundryAgent sealed class wrapping ChatClientAgent with:
      - Public ctors: (projectEndpoint, credential, model, instructions) and (agentEndpoint, credential)
      - Internal ctor: (AIProjectClient, ChatClientAgent) for extension use
      - CreateConversationSessionAsync() for server-side conversations
      - GetService<ChatClientAgent>() and GetService<AIProjectClient>()
      - MEAI user-agent policy on internally-created AIProjectClient
    - Change all AsAIAgent extension return types from ChatClientAgent to FoundryAgent
    - Update all samples and tests to use FoundryAgent type
    - Add 16 FoundryAgentTests covering ctors, GetService, UserAgent, RunAsync
    - Fix pre-existing Agent_Step12_Plugins build error
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Collapse sample folders and add FoundryAgent_Step01 sample
    
    - Move all Responses/* samples up to AgentsWithFoundry/ (flat structure)
    - Remove entire Versioned/ folder (26 samples)
    - Add FoundryAgent_Step01 sample showing direct FoundryAgent ctor usage
    - Update slnx to reflect flat folder structure
    - Fix csproj ProjectReference paths for new depth
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update READMEs for flat AgentsWithFoundry structure
    
    - Rewrite AgentsWithFoundry/README.md with FoundryAgent quick start
    - Fix cd commands and paths in 11 sample READMEs
    - Update 02-agents/README.md to single Foundry link
    - Update AGENTS.md tree to flat structure
    - Fix AgentWithMemory cross-reference
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix FoundryAgent_Step01 sample with full create/run/delete lifecycle
    
    Show the complete server-side agent lifecycle: create version with
    native SDK, wrap as FoundryAgent via AsAIAgent, run, then delete.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Revert RAPI samples to use AIAgent instead of FoundryAgent
    
    RAPI samples should not reference FoundryAgent directly. Restored
    original sample code with only ChatClientAgent -> AIAgent type change
    to accommodate the AsAIAgent return type.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Convert versioned-pattern samples to pure RAPI
    
    Step09, Step13, Step17, Step22 were using CreateAgentVersionAsync +
    PromptAgentDefinition which is the versioned pattern. Converted to
    use AsAIAgent(model, instructions, tools) which is the RAPI path.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix format issues from Docker CI check
    
    - FoundryAgent_Step01: CRLF -> LF
    - Agent_Step09: missing final newline
    - Agent_Step11_Middleware: add internal modifier, final newline
    - Agent_Step02: remove redundant cast (IDE0004)
    - Agent_Step08: simplify name (IDE0001)
    - FoundryAgentTests: s_ prefix, Async suffix naming conventions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Switch Step09 MCP sample to Microsoft Learn HTTP endpoint
    
    Replace npx stdio GitHub MCP server with the public Microsoft Learn
    MCP endpoint (https://learn.microsoft.com/api/mcp) using HTTP transport.
    No external tooling required to run.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix missing final newline in Step09 MCP sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: use DelegatingAIAgent, clean up Step01 sample
    
    - FoundryAgent now inherits DelegatingAIAgent instead of AIAgent,
      removing manual delegation boilerplate (westey-m feedback)
    - Simplified Agent_Step01_Basics to single agent creation path,
      moved composable IChatClient approach to README (westey-m feedback)
    - Fixed FoundryAgentTests param name assertion
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update sample using Project specialized type instead
    
    * Address PR review feedback: DefaultAzureCredential warnings, sample simplifications, format fixes
    
    - Add DefaultAzureCredential production warning comments to ~25 samples
    - Simplify Anthropic and OpenAI Step01 samples to single agent
    - Convert Step11 Middleware regex patterns to [GeneratedRegex]
    - Remove unnecessary cleanup comment from Step06
    - Fix Step09 README MCP transport description
    - Enhance FoundryAgent xmldoc with non-persistent agent comparison
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Split Step02, simplify RAG Step04, sharpen Step23 differentiation
    
    - Split Step02 into 02.1 (simple multi-turn via sessions) and 02.2 (server-side conversations via CreateConversationSessionAsync)
    - RAG Step04: replace HostedFileSearchTool + MEAI wrapping with native OpenAI FileSearchTool
    - Step23: clarify DelegatingAIFunction wrapping pattern vs Step09 basic MCP
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix Hosted MCP sample: use ResponseTool.CreateMcpTool and move tool to PromptAgentDefinition
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix broken README link after Step02 split
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address Sergey round 3 feedback: branding, README nav, sample rename
    
    - Replace 'Azure AI Foundry' with 'Microsoft Foundry' in ADR 0020
    - Fix 3 READMEs: 'ChatClientAgents' → 'AgentsWithFoundry' sample directory
    - Rename FoundryAgent_Step01 → Agent_Step00_FoundryAgentLifecycle for naming consistency
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: BugFix #3433 ChatClientAgent streaming responses missing messageid (#4615)
    * Changes
    
    * Fix ChatClientAgent streaming responses missing MessageId
    
    Generate fallback MessageId in ChatClientAgent.RunCoreStreamingAsync when
    the underlying LLM provider does not set ChatResponseUpdate.MessageId.
    Without a MessageId the AGUI converter's null==null check silently drops
    all text content, causing CopilotKit Zod validation errors.
    
    Changes:
    - ChatClientAgent: generate msg_{Guid} fallback via ??= in streaming loop
    - AgentResponseExtensions: sync wrapper MessageId back to RawRepresentation
      in AsChatResponseUpdate() so downstream consumers see the value
    - Add unit tests for both fixes and AGUI streaming MessageId scenarios
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR #4615 review comments
    
    - Fix MessageId seeding: use first-seen provider MessageId (or generate
      fallback) and apply consistently to all chunks in the stream, preventing
      message splitting when providers set MessageId only on the first chunk
    - Add test for mixed MessageId scenario (first chunk only)
    - Fix skipped TextStreaming test: assert Empty (not NotEmpty) to match
      actual null==null behavior
    - Fix skipped ToolCalls test: assert empty ParentMessageId to match
      actual empty-string passthrough behavior
    
    * Handle empty MessageId in AsChatResponseUpdate sync
    
    Treat empty/whitespace MessageId the same as null when syncing from
    the AgentResponseUpdate wrapper back to RawRepresentation. Providers
    that return empty string MessageId (e.g. tool call responses) now get
    the wrapper value recovered correctly.
    
    Add test for empty string MessageId recovery scenario.
    
    * Move MessageId fallback generation to AGUI layer
    
    Move fallback MessageId generation from ChatClientAgent to
    AsAGUIEventStreamAsync, addressing the architectural concern that
    MessageId is nullable in the AIAgent abstraction and the requirement
    for non-null values is specific to the AGUI protocol.
    
    The AGUI layer now generates a fallback MessageId for null or
    empty/whitespace values, covering all agent types (not just
    ChatClientAgent) including external implementations.
    
    Changes:
    - Revert MessageId generation from ChatClientAgent.RunCoreStreamingAsync
    - Add fallback MessageId generation in AsAGUIEventStreamAsync for
      null/empty MessageId values (handles both null and whitespace)
    - Unskip and update AGUI tests to verify fallback generation
    - Update ChatClientAgent tests to reflect passthrough behavior
    
    * Revert AsChatResponseUpdate MessageId sync-back
    
    Remove the MessageId sync-back logic from AsChatResponseUpdate() as it
    is no longer needed. With fallback generation moved to the AGUI layer,
    the abstraction layer should not mutate the RawRepresentation object.
    
    Revert to the original passthrough behavior for AsChatResponseUpdate()
    and update tests accordingly.
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Skip flaky integration tests blocking merge queue (#4972)
    * Skip flaky integration tests blocking merge queue
    
    Skip 7 timing-dependent integration tests that are causing a 73% failure
    rate in the merge queue over the past 3 days. All failures are
    LLM-latency/timeout related and occur across unrelated PRs.
    
    Skipped tests:
    - ConsoleAppSamplesValidation.ReliableStreamingSampleValidationAsync
    - ConsoleAppSamplesValidation.SingleAgentOrchestrationHITLSampleValidationAsync
    - ConsoleAppSamplesValidation.LongRunningToolsSampleValidationAsync
    - SamplesValidation.LongRunningToolsSampleValidationAsync (AzureFunctions)
    - SamplesValidation.ReliableStreamingSampleValidationAsync (AzureFunctions)
    - ExternalClientTests.CallFunctionToolsAsync
    - ExternalClientTests.CallLongRunningFunctionToolsAsync
    
    Tracking issue: https://github.com/microsoft/agent-framework/issues/4971
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Extract skip reason to const per review feedback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: [BREAKING] Remove deprecated kwargs compatibility paths (#4858)
    * [BREAKING] Remove deprecated kwargs compatibility paths
    
    Remove the deprecated kwargs compatibility shims across core agents, clients, tools, middleware, and telemetry.
    
    Keep workflow kwargs behavior intact in this branch and follow up separately in #4850.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix PR CI fallout for kwargs removal
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review feedback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * updates
    
    * Fix Azure AI CI fallout
    
    Remove the stale _get_current_conversation_id override from the Azure AI client after the OpenAI base helper was deleted.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fixed new classes
    
    * Fix Assistants deprecated import gating
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix integration replay regressions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Switch multi-agent hosting samples to Azure chat completions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Simplify Azure multi-agent sample config
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Fixes for durable agents integration tests (#4952)
    * Fixing for durable agents integration tests
    
    * Add further fixes
  • Python: Fix broken samples for GitHub Copilot, declarative, and Responses API (#4915)
    * Python: Fix broken samples for GitHub Copilot, declarative, and Responses API
    
    - Add missing on_permission_request handler to github_copilot_basic and
      github_copilot_with_session samples (required by copilot SDK)
    - Increase timeout for remote MCP query in github_copilot_with_mcp sample
    - Soften session isolation claim in github_copilot_with_session sample
    - Fix inline_yaml sample: pass project_endpoint via client_kwargs instead
      of relying on YAML connection block (AzureAIClient expects
      project_endpoint, not endpoint)
    - Handle raw JSON schemas in Responses client _convert_response_format
      so declarative outputSchema works with the Responses API
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Improve raw JSON schema detection heuristic and add tests
    
    - Broaden raw schema detection to handle anyOf, oneOf, allOf, $ref, $defs
      keywords and JSON Schema primitive types, not just 'properties'
    - Apply same raw schema handling to azure-ai _shared.py for consistency
    - Add unit tests for both openai and azure-ai response_format conversion
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • [BREAKING] Python: fix OpenAI Azure routing and provider samples (#4925)
    * Python: fix OpenAI Azure routing and provider samples
    
    Prefer OpenAI when OPENAI_API_KEY is present unless Azure is explicitly requested. Clarify constructor docs, keep deprecated Azure wrappers compatible with stricter settings validation, and refresh the provider samples and tests to use the current client patterns.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix bandit
    
    * Python: align OpenAI embedding Azure routing
    
    Extend the shared OpenAI-vs-Azure routing and credential behavior to the embedding client, add Azure embedding regression coverage, and refresh the embedding samples to use the generic client path.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix embedding client pyright check
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: thin OpenAI embedding wrapper
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: document embedding overload routing
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix callable OpenAI key routing
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: fix Azure credential routing tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: address OpenAI review feedback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: narrow Azure routing markers
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: refine OpenAI model fallback order
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: narrow Azure deployment docs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: remove embedding routing wording
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: run embedding Azure integration tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * changed variable name
    
    * Python: expand OpenAI package README
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * clarified readme
    
    * Python: fix Azure OpenAI integration setup
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: correct Azure integration env mapping
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * updated code to fix int tests
    
    * test updates
    
    * test fix
    
    * fix test setup
    
    * updates to tests and setup
    
    * remove openai assistants int tests
    
    * improvements in int tests
    
    * fix env var
    
    * fix env vars
    
    * fix azure responses test
    
    * trigger actions
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Bump flatted from 3.3.3 to 3.4.2 in /python/packages/devui/frontend (#4805)
    Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.3 to 3.4.2.
    - [Commits](https://github.com/WebReflection/flatted/compare/v3.3.3...v3.4.2)
    
    ---
    updated-dependencies:
    - dependency-name: flatted
      dependency-version: 3.4.2
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • .NET: [Breaking] Restructure agent skills to use multi-source architecture (#4871)
    * initial commit
    
    * address comments
    
    * address comments
    
    * address comments
    
    * address  comments
    
    * rename executor to runner to align naming with python implementation
    
    * rename runner execute method to run method
    
    * remove poc leftovers and fix compilation issues
    
    * make script runner optional
    
    * remove unnecessary pragmas
    
    * make resources and scripts props virtual
    
    * address comments
    
    * update comment for name validation regex
    
    * address comments
  • .NET: feat: Implement return-to-previous routing in handoff workflow (#4356)
    * feat: Implement return-to-previous routing in handoff workflow
    
    - Also obsoletes HandoffsWorkflowBuilder => HandoffWorkflowBuilder (no "s")
    
    * refactor: Remove instance-shared current agent tracking in handoffs
    
    Because the tracker was instance-shared between the start and end executors, it would be shared between all sessions, resulting in incorrect behaviour.
    
    The corect way to do this is to keep the data in a shared executor scope, which is per-session.
    
    * fix: Fix test logic for Handoff to correctly use checkpointing for multiturn
  • Python: Move ag_ui_workflow_handoff demo from demos/ to 05-end-to-end/ (#4900)
    * Move ag_ui_workflow_handoff demo to 05-end-to-end (#4895)
    
    Move the AG-UI workflow handoff demo from python/samples/demos/ to
    python/samples/05-end-to-end/ to follow the current folder structure
    convention. Update README paths accordingly.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix review feedback: remove build artifacts, fix README paths (#4895)
    
    - Add .gitignore to frontend/ to exclude *.tsbuildinfo, vite.config.js,
      and vite.config.d.ts build artifacts from version control
    - Remove the 4 tracked build artifact files from the tree
    - Fix step 2 cd path in README to be relative after 'cd python'
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Clarify working directory context in README Step 2 (#4895)
    
    Step 2 uses a python/-relative path (samples/...) which assumes the
    user is still in the python/ directory from Step 1. Add a brief note
    making this explicit.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Fix bug with per-service-call persistence and approvals (#4933)
    * Fix bug with per-service-call persistence and approvals
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Improve observability sample (#4917)
    * Improve .Net observability sample
    
    * Update dotnet/samples/02-agents/AgentOpenTelemetry/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Fix role assignment in ChatMessage construction (#4290)
    * Use actual message role when creating ChatMessage
    
    Replace hard-coded ChatRole.User with a ChatRole constructed from the message's Role. The change ensures ToChatMessage and FunctionMessage use the original role (new ChatRole(this.Role)) for both text and contents branches, fixing incorrect role assignment when constructing ChatMessage instances.
    
    * Update changes
    
    * Fix formatting in ToChatMessage tests
    
    ---------
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Add integration test validating OpenAPI tools with AsAIAgent(agentVersion) (#4931)
    * .NET: Add integration test for OpenAPI tools with AsAIAgent(agentVersion)
    
    Validates end-to-end flow creating a Foundry agent with an OpenAPI tool
    definition via native Azure.AI.Projects SDK types and wrapping it with
    AsAIAgent(agentVersion). The test confirms the server-side OpenAPI
    function is invoked correctly through RunAsync.
    
    Addresses #4883
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: RetryFact, PascalCase naming, stronger tool assertion
    
    - Use RetryFact with Skip for manual testing (flaky due to external API)
    - Fix agentName -> AgentName to match PascalCase convention in file
    - Strengthen tool invocation assertion: require >= 3 Eurozone countries
    - Add comment explaining server-side OpenAPI tools don't surface as
      FunctionCallContent in the MEAI abstraction
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Add AsIChatClientWithStoredOutputDisabled for ProjectResponsesClient (#4911)
    * Add AsIChatClientWithStoredOutputDisabled for ProjectResponsesClient
    
    Add extension method on ProjectResponsesClient in Microsoft.Agents.AI.AzureAI
    package (Azure.AI.Extensions.OpenAI namespace) mirroring the existing extension
    on ResponsesClient in the OpenAI package. This enables Azure AI consumers to
    disable server-side response storage without depending on the OpenAI package.
    
    - New ProjectResponsesClientExtensions class with AsIChatClientWithStoredOutputDisabled
    - Optional deploymentName parameter (model is no longer required)
    - Updated OpenAI counterpart doc to remove 'Required' wording for model param
    - Added unit tests covering null guard, inner client accessibility,
      StoredOutputEnabled=false, and reasoning encrypted content inclusion/exclusion
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Preserve existing RawRepresentationFactory when disabling stored output
    
    Address PR review feedback: wrap/chain the existing factory instead of
    replacing it, so upstream configuration (e.g., deploymentName/model defaults
    from AsIChatClient) is preserved.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • ADR to support a multi-source architecture for agent skills (#4787)
    * add  adr suggesting a new design to support a multi-source architecture for agent skills
    
    * add deciders
    
    * move the adr to the decisions folder
    
    * remove unnecessary section
    
    * describe adding a custom skill source
    
    * update
    
    * address comments
    
    * add constructor overloads to inline skill resource and script
    
    * consider ai-function as an alternative for skill script and skill resource model classes
    
    * update decision outcome section and sync adr with latest changes in the code
  • Add ADR to decide consistency of Chat History Persistence (#4816)
    * Add ADR to decide consitency of Chat History Persistence
    
    * Add example
    
    * Update ADR with review results
    
    * Remove unecessary clarification
    
    * Rename ADR to no 22
  • Python: Support structuredContent in MCP tool results and fix sampling options type (#4763)
    * Support MCP sampling tools capability (#4625)
    
    Forward systemPrompt, tools, and toolChoice from MCP sampling requests
    to the chat client's get_response() call. Also advertise the
    sampling.tools capability to MCP servers when a client is configured.
    
    - Pass SamplingCapability with tools support to ClientSession
    - Convert systemPrompt to instructions in options
    - Convert MCP Tool objects to FunctionTool instances for options
    - Map MCP ToolChoice.mode to tool_choice in options
    - Add tests for all new behaviors and update existing sampling tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix #4625: Support MCP sampling tool with proper typing and structured content
    
    - Fix mypy error by typing sampling callback options as ChatOptions[None]
      instead of dict[str, Any], and importing ChatOptions from _types
    - Handle structuredContent from CallToolResult in _parse_tool_result_from_mcp,
      serializing it as JSON text Content when present
    - Add tests for structuredContent parsing (with and without regular content)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix lint: add author to TODO comment
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: remove default=str, add edge-case tests
    
    - Remove default=str from json.dumps for structuredContent to fail fast
      on non-JSON-serializable values instead of silently converting
    - Add test for non-JSON-serializable structuredContent (TypeError)
    - Add tests for empty systemPrompt ('') and empty tools list ([]) edge
      cases in sampling callback
    - Expand TODO comment noting list[Content] return type constraint for
      future result_type support
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Sanitize sampling callback error to avoid leaking internals (#4625)
    
    Log exception details at DEBUG level instead of including them in the
    ErrorData message returned to the MCP server, which may be untrusted.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: move params to options, restore error info
    
    - Remove stale TODO comment about response_format (ChatOptions already has it)
    - Restore {ex} in sampling callback error message for useful debugging info
    - Set structuredContent as additional_property on Content for structured access
    - Move temperature, max_tokens, stop into options dict (not top-level kwargs)
    - Only set temperature when provided (not all models support it)
    - Add tests for generation params in options and temperature omission
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix MCP sampling callback and structured content error handling (#4625)
    
    - Guard max_tokens like temperature: only set when not None, so options
      can properly evaluate to None when all params are absent
    - Wrap json.dumps of structuredContent in try/except to fall back to
      str() for non-serializable values instead of propagating TypeError
    - Extract test_connect_sampling_capabilities_with_client into its own
      test function so pytest can discover it independently
    - Add test for max_tokens=None omission from options
    - Update structured content non-serializable test to expect fallback
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4625: review comment fixes
    
    * Fix MCP and Azure validation regressions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Include reasoning messages in MESSAGES_SNAPSHOT events (#4844)
    * Include reasoning messages in MESSAGES_SNAPSHOT (#4843)
    
    FlowState now tracks reasoning messages emitted during a run.
    _emit_text_reasoning() persists reasoning (including encrypted_value)
    into flow.reasoning_messages, and _build_messages_snapshot() appends
    them to the final MESSAGES_SNAPSHOT event.
    
    Changes:
    - Add reasoning_messages field to FlowState
    - Update _emit_text_reasoning() to accept optional flow parameter
    - Include reasoning_messages in _build_messages_snapshot()
    - Add 'reasoning' to ALLOWED_AGUI_ROLES so normalize_agui_role()
      preserves the role through snapshot round-trips
    - Skip reasoning messages in agui_messages_to_agent_framework() since
      they are UI-only state and should not be forwarded to LLM providers
    - Add regression tests for snapshot emission, encrypted value
      preservation, and multi-turn round-trip with reasoning
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Python: Include reasoning messages in MESSAGES_SNAPSHOT events
    
    Fixes #4843
    
    * Fix PR review feedback for reasoning persistence (#4843)
    
    - Accumulate reasoning text per message_id (append deltas) instead of
      storing only the current chunk, matching flow.accumulated_text pattern
    - Use camelCase encryptedValue in snapshot JSON to match AG-UI protocol
      conventions (toolCallId, encryptedValue)
    - Normalize snake_case encrypted_value to encryptedValue in
      agui_messages_to_snapshot_format for input compatibility
    - Update normalize_agui_role docstring to include reasoning role
    - Add tests for incremental reasoning accumulation and key normalization
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review feedback for #4843: Python: agent-framework-ag-ui: include reasoning messages in MESSAGES_SNAPSHOT
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Fix streaming path to emit mcp_server_tool_result on output_item.done instead of output_item.added (#4821)
    * Fix streaming path to deliver mcp_server_tool_result content (#4814)
    
    Remove premature mcp_server_tool_result emission from the
    response.output_item.added/mcp_call handler — at that point the MCP
    server has not yet responded and output is always None.
    
    Add a handler for response.mcp_call.completed that emits
    mcp_server_tool_result with the actual tool output, matching the
    non-streaming path behavior.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix streaming path to deliver mcp_server_tool_result content (#4814)
    
    Stop eagerly emitting mcp_server_tool_result on response.output_item.added
    (when output is always None). Instead, handle response.output_item.done for
    mcp_call items, which carries the full McpCall with populated output.
    
    This matches the non-streaming path which guards with 'if item.output is not
    None' before emitting the result.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix test docstring to match actual implementation event name
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review: call_id fallback and raw_representation consistency (#4814)
    
    - Add call_id fallback in response.output_item.done mcp_call handler to
      match the output_item.added handler pattern
    - Use done_item instead of event for raw_representation to keep
      consistent with other output_item branches and non-streaming path
    - Add test for call_id fallback when id attribute is missing
    - Add raw_representation assertions to existing done handler tests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review: call_id fallback for non-streaming path and test coverage (#4814)
    
    - Apply defensive call_id fallback (getattr with id/call_id/empty) to
      non-streaming mcp_call path for consistency with streaming path
    - Add raw_representation assertion to call_id fallback test
    - Add test for empty-string fallback when neither id nor call_id exist
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Fix A2AAgent to surface message content from in-progress TaskStatusUpdateEvents (#4798)
    * Fix A2AAgent dropping message content from in-progress TaskStatusUpdateEvents (#4783)
    
    _updates_from_task() returned [] for working-state tasks when
    background=False, silently discarding all intermediate message content
    from task.status.message. Now extracts and yields message parts from
    in-progress status updates during streaming.
    
    Also fixed MockA2AClient.send_message to yield all queued responses
    (enabling multi-event streaming tests) and added text parameter to
    add_in_progress_task_response for tests that need status messages.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix: gate intermediate status updates behind emit_intermediate flag and add missing test coverage
    
    - Add emit_intermediate parameter to _updates_from_task and _map_a2a_stream
    - Thread stream flag from run() so only streaming callers see intermediate updates
    - Add IN_PROGRESS_TASK_STATES guard to emit_intermediate condition
    - Add role parameter to test helper add_in_progress_task_response
    - Add clarifying comment on MockA2AClient.send_message batch semantics
    - Add tests for user role mapping, background precedence, non-streaming behavior,
      terminal task with no artifacts, and empty parts edge case
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: fix: HandoffAgentExecutor does not output any response when non-streaming (#4745)
    * fix: HandoffAgentExecutor does not output any reponse when non-streaming
    
    * fix: Ensure Workflow outputs persisted in chat history when hosted AsAgent
    
    * fix: Remove duplicate history entry creation and ad test
    
    * test: Add streaming tests for AsAgent to smoke tests
    
    * feat: Add output configurability to Handoffs
  • .NET: [BREAKING] Update type names and source generator to reduce conflicts (#4903)
    * refactor: [BREAKING] Config => ExecutorConfig
    
    Make the Config name less likely to collide with other classes by renaming to ExecutorConfig. Makes Configured and related classes internal as they do not need to be part of the public surface.
    
    * fix: Make RouteBuilder explicit in SourceGen to avoid conflicts
  • .NET: Fix ChatOptions mutation in AIContextProviderChatClient across calls (#4891)
    * Fix UseAIContextProviders tool accumulation across calls (#4864)
    
    Clone ChatOptions before mutating it in InvokeProvidersAsync to prevent
    context provider tools from accumulating when the same ChatOptions
    instance is reused across multiple API calls.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: chetantoshniwal <chetantoshniwal@gmail.com>
    
    * Apply suggestion from @westey-m
    
    ---------
    
    Co-authored-by: MAF Dashboard Bot <maf-dashboard-bot@users.noreply.github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • .NET: Pass through external input request and handle response conversion for workflow as agent scenario (#4361)
    * Handle external input request and response conversion for workflow as agent scenario
    
    * Remove unnecessary test comment
    
    * Fix PR comments
    
    * Updated to fix edge cases, and add more tests.
    
    * Update pending requests to use typed properties instead of relying on StateBag. replying to PR feedback.
    
    * Fixed external response de-dup and updated possible brittle test.
    
    * Address PR comments on sending turn token for normal messages and handle contentId collision by source agent
    
    * Remove unnecessary serialization element and address pr comment on intercepted outgoing requests
    
    * Updated MEAI changes for UserInput request and response abstractions.
  • .NET: Clarify IResettableExecutor usage comment in workflow sample (#4905)
    * Clarify IResettableExecutor usage comment in workflow sample
    
    * Update dotnet/samples/03-workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/03-workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • Python: [BREAKING] Reduce core dependencies and simplify optional integrations (#4904)
    * improved dependencies and some fixes
    
    * fix for mypy
    
    * improve mcp
  • .NET: Expose workflows as MCP tools when hosting on Azure functions (#4768)
    * Expose workflow as MCP Tool
    
    * Expose workflow as MCP Tool
    
    * Cleanup
    
    * PR feedback fixes
    
    * update changelog to include PR numner
    
    * Improvements to error handling.
    
    * Adding a sample project demonstrating how to setup Agents and Workflows together.
    
    * Ensure duplicate agent registrations are properly handled.
  • fix: FS Checkpoint storage special character support (#4730)
    The `sessionId`, an optional parameter when starting a new session when
    running a workflow is an arbitrary string. This allows consumers to
    support whatever ids are needed by other systems, but can result in
    errors when an OS special or forbidden character is included.
    
    The fix is to escape the paths, in a 1:1 manner. We rely on
    EncodeDataString to do this.
    
    * Also modifies the index file to make it easier to determine what the
      name of the file on disk is for a given `sessionId`.
  • .NET: Persist messages during function call loop (#4762)
    * Persist messages during the Function Call Loop
    
    * Revert version reset
    
    * Fix bugs and improve sample
    
    * Fix formatting issues
    
    * Also updating conversation id during run
    
    * Update based on ADR feedback
  • Python: [BREAKING] Python: Provider-leading client design & OpenAI package extraction (#4818)
    * Python: Provider-leading client design & OpenAI package extraction
    
    Major refactoring of the Python Agent Framework client architecture:
    
    - Extract OpenAI clients into new `agent-framework-openai` package
    - Core package no longer depends on openai, azure-identity, azure-ai-projects
    - Rename clients for discoverability: OpenAIResponsesClient → OpenAIChatClient,
      OpenAIChatClient → OpenAIChatCompletionClient
    - Unify `model_id`/`deployment_name`/`model_deployment_name` → `model` param
    - New FoundryChatClient for Azure AI Foundry Responses API
    - New FoundryAgent/FoundryAgentClient for connecting to pre-configured Foundry agents
    - Remove OpenAIBase/OpenAIConfigMixin from non-deprecated client MRO
    - Deprecate AzureOpenAI* clients, AzureAIClient, OpenAIAssistantsClient
    - Reorganize samples: azure_openai+azure_ai+azure_ai_agent → azure/
    - ADR-0020: Provider-Leading Client Design
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: missing Agent imports in samples, .model_id → .model in foundry_local sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: CI failures — mypy errors, coverage targets, sample imports
    
    - azure-ai mypy: add type ignores for TypedDict total=, model arg, forward ref
    - Coverage: replace core.azure/openai targets with openai package target
    - project_provider: add type annotation for opts dict
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix: populate openai .pyi stub, fix broken README links, coverage targets
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fixes
    
    * updated observabilitty
    
    * reset azure init.pyi
    
    * fix errors
    
    * updated adr number
    
    * fix foundry local
    
    * fixed not renamed docstrings and comments, and added deprecated markers to old classes
    
    * fix tests and pyprojects
    
    * fix test vars
    
    * updated function tests
    
    * update durable
    
    * updated test setup for functions
    
    * Fix Foundry auth in workflow samples
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Stabilize Python integration workflows
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update hosting samples for Foundry
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Trigger full CI rerun
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Trigger CI rerun again
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * trigger rerun
    
    * trigger rerun
    
    * fix for litellm
    
    * undo durabletask changes
    
    * Move Foundry APIs into foundry namespace
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix Foundry pyproject formatting
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Split provider samples by Foundry surface
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Restore hosting sample requirements
    
    Also fix the Foundry Local sample link after the provider sample move.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * updated tests
    
    * udpated foundry integration tests
    
    * removed dist from azurefunctions tests
    
    * Use separate Foundry clients for concurrent agents
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix client setup in azfunc and durable
    
    * disabled two tests
    
    * updated setup for some function and durable tests
    
    * improved azure openai setup with new clients
    
    * ignore deprecated
    
    * fixes
    
    * skip 11
    
    * remove openai assistants int tests
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Update sample validation scripts (#4870)
    * Update sample validation scripts
    
    * Adjust prompt
    
    * Update autogen-migration samples
    
    * Add fix suggestion
    
    * Split jobs
    
    * Add .env
    
    * Create trend report
    
    * Add timestamp
    
    * Add more env vars
    
    * Comments
    
    * force node24
    
    * force node24
    
    * force node22
  • .NET: Update AIContextProviders to use Microsoft.Extensions.Compliance.Redaction (#4854)
    * Update providers to use Microsoft.Extensions.Compliance.Redaction
    
    * Fix formatting.
    
    * Fix readme
  • .NET: Re-enable AzureAI.Persistent packaging and integration tests (#4769) (#4865)
    Azure.AI.Agents.Persistent 1.2.0-beta.10 now targets ME.AI 10.4.0+,
    resolving the compatibility issue that required disabling this package.
    
    - Remove IsPackable=false from the csproj
    - Re-enable all 6 integration test classes (IntegrationDisabled → Integration)
    - Remove outdated compatibility warning from README.md
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Bump actions/download-artifact from 7 to 8 (#4372)
    Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
    - [Release notes](https://github.com/actions/download-artifact/releases)
    - [Commits](https://github.com/actions/download-artifact/compare/v7...v8)
    
    ---
    updated-dependencies:
    - dependency-name: actions/download-artifact
      dependency-version: '8'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Python: Fix PydanticSchemaGenerationError when using from __future__ import annotations with @tool (#4822)
    * Fix PydanticSchemaGenerationError with PEP 563 annotations in @tool
    
    _resolve_input_model used raw param.annotation from inspect.signature(),
    which returns string annotations when 'from __future__ import annotations'
    is active (PEP 563). This caused Pydantic's create_model to fail for
    complex types like Optional[int] or FunctionInvocationContext.
    
    Use typing.get_type_hints() to resolve annotations to actual types before
    passing them to create_model, matching the approach already used by
    _discover_injected_parameters.
    
    Fixes #4809
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Remove reproduction report and unused test imports
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * fix(tests): strengthen PEP 563 regression tests per review feedback (#4809)
    
    - Verify type correctness in schema assertions (not just key presence)
    - Fix ctx annotation to FunctionInvocationContext | None for type consistency
    - Add test for Optional[CustomType] pattern (original bug trigger)
    - Add test for get_type_hints() fallback with unresolvable forward refs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Apply pre-commit auto-fixes
    
    * Address review feedback for #4809: Python: [Bug]: PydanticSchemaGenerationError in FunctionInvocationContext
    
    ---------
    
    Co-authored-by: Copilot <copilot@github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>