Commit Graph

441 Commits

  • .NET: Add Message Delivery Callback Overloads to Executor (#5081)
    * feat: Implement Executor Message Delivery Event callbacks
    
    * fix: ResumeAsync does not run pending steps
    
    * fix: address review comments
  • .NET: Improve workflow unit test coverage (#5072)
    * Improve workflow unit tests
    
    * Update test name prefix for clarity.
    
    * Update tests to surface any errors.
  • .NET: skill as class (#5027)
    * add class-based skills
    
    * address formating issues
    
    * Remove generated filtered-unit.slnx and add to .gitignore
    
    The filtered solution file is generated dynamically by
    eng/scripts/New-FilteredSolution.ps1 during CI. Checking it in
    risks it becoming stale and out-of-sync with the real solution.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove generated filtered-unit.slnx and add to .gitignore
    
    The filtered solution file is generated dynamically by
    eng/scripts/New-FilteredSolution.ps1 during CI. Checking it in
    risks it becoming stale and out-of-sync with the real solution.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * consolidate DI samples into one
    
    * fix file encoding
    
    * suppress compatibility warning
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Remove timeout from InputWait in OffThread execution (#4996)
    * fix: Remove Timeout from InputWait in StreamingRunEventStream
    
    * fix: Race condition when the workflow executes to halt before TakeEventStream
    
    * test: Make the OffThread Delay test more nimble
    
    * fix: Remove slight window where runStatus could be stale
  • .NET: Bump Azure.AI.Projects to 2.0.0 GA (#5060)
    * Bump Azure.AI.Projects to 2.0.0 GA
    
    - Update Azure.AI.Projects from 2.0.0-beta.2 to 2.0.0 in CPM
    - Update Azure.Identity from 1.19.0 to 1.20.0 (transitive dep)
    - Update System.ClientModel from 1.9.0 to 1.10.0 (transitive dep)
    - Rename types per Azure.AI.Projects.Agents 2.0.0 breaking changes:
      - AgentVersion -> ProjectsAgentVersion
      - AgentRecord -> ProjectsAgentRecord
      - AgentDefinition -> ProjectsAgentDefinition
      - AgentVersionCreationOptions -> ProjectsAgentVersionCreationOptions
      - PromptAgentDefinition -> DeclarativeAgentDefinition
      - AgentTool -> ProjectsAgentTool
      - AgentsClient -> AgentAdministrationClient
      - .Agents property -> .AgentAdministrationClient
    - Add using Azure.AI.Projects.Memory namespace (types moved)
    - Update AGENTS.md with BOM and output capture conventions
    
    * Address PR review feedback
    
    - Rename AIProjectClient parameter to aiProjectClient in AsChatClientAgent overloads
    - Fix XML doc: ProjectsAgentTool namespace from Azure.AI.Projects.OpenAI to Azure.AI.Projects.Agents
    - Rename test method to reflect DeclarativeAgentDefinition terminology
  • .NET: Remove OpenAIAssistantClientExtensions class (#5058)
    * Remove OpenAIAssistantClientExtensions class
    
    Remove the deprecated OpenAI Assistants API extension methods, along with
    their unit tests, integration tests, sample project, and related references.
    
    - Delete OpenAIAssistantClientExtensions.cs (source)
    - Delete OpenAIAssistantClientExtensionsTests.cs (unit + integration tests)
    - Delete Agent_With_OpenAIAssistants sample project
    - Remove sample from solution file, README, and verify-samples definitions
    - Remove AIOpenAIAssistants diagnostic ID constant
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * add removed extension methods to the suppression file
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: Move workflow-samples and agent-samples under declarative-agents directory (#5011)
    * Move workflow-samples and agent-samples under declarative-agents and update all references
    
    Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c
    
    Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>
    
    * Fix relative paths in README files inside moved directories
    
    Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f70f7d19-9256-4eec-b7db-28007d74440c
    
    Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: sphenry <6749825+sphenry@users.noreply.github.com>
    Co-authored-by: Shawn Henry <shahen@microsoft.com>
  • .NET: Rename Microsoft.Agents.AI.AzureAI to Microsoft.Agents.AI.Foundry and consolidate FoundryMemory (#5042)
    * Update Foundry Responses as ChatClientAgent
    
    * Migrate obsolete AzureAI integration tests to versioned agent pattern
    
    Replace obsolete CreateAIAgentAsync/GetAIAgentAsync calls with
    Agents.CreateAgentVersionAsync() + AsAIAgent(AgentVersion) in all
    AzureAI integration tests.
    
    - Rename AIProjectClient* test files to FoundryVersionedAgent*
    - Register AIFunction tools in PromptAgentDefinition.Tools for
      server-side visibility via AsOpenAIResponseTool()
    - Skip structured output tests (AzureAIProjectChatClient clears
      ResponseFormat for versioned agents)
    - Remove all [Obsolete] attributes and #pragma warning disable CS0618
    
    * Merge FoundryMemory package into AzureAI under Memory/ folder
    
    Move all FoundryMemory source, unit tests, and integration tests into
    the Microsoft.Agents.AI.AzureAI package. Change namespace from
    Microsoft.Agents.AI.FoundryMemory to Microsoft.Agents.AI.AzureAI.
    
    - Add [Experimental] to FoundryMemoryProviderOptions and Scope
    - Rename internal AIProjectClientExtensions to MemoryStoreExtensions
    - Update AzureAI .csproj with Compliance.Abstractions, Redaction
    - Remove FoundryMemory from solution and release filter
    - Update sample to reference AzureAI instead of FoundryMemory
    - Delete old Microsoft.Agents.AI.FoundryMemory project and tests
    
    * Add EnsureMemoryStoreCreatedAsync and memory existence checks to integration tests
    
    - Ensure memory store is created before testing memory operations
    - Add AZURE_AI_EMBEDDING_DEPLOYMENT_NAME config setting
    - Assert memories exist in store via SearchMemoriesAsync before cleanup
    - Verify scope isolation with direct memory store queries
    
    * Fix and rename AzureAI unit tests for RAPI vs Versioned clarity
    
    - Rename AsAIAgentAsync_* to AsAIAgent_* (drop Async from method group)
    - Add _Rapi_ prefix to non-versioned (Responses API) tests
    - Add _Versioned_ prefix to versioned agent tests where needed
    - Fix RAPI tests: assert GetService<AIProjectClient>() is null
    - Fix Versioned tests: assert IsType<FoundryAgent> and
      GetService<AIProjectClient>() returns the client instance
    - Fix UserAgent header tests: proper HTTP handler routing
    - Fix ChatClient_UsesDefaultConversationIdAsync test setup
    - All 153 unit tests pass with 0 failures
    
    * Rename Microsoft.Agents.AI.AzureAI to Microsoft.Agents.AI.Foundry
    
    Rename the project, namespace, folder, and all references from
    Microsoft.Agents.AI.AzureAI to Microsoft.Agents.AI.Foundry.
    Also rename Workflows.Declarative.AzureAI to .Foundry.
    
    - Rename src, unit test, integration test, and workflow folders
    - Update namespaces in all source and test .cs files
    - Update ProjectReferences in ~47 sample and test .csproj files
    - Update solution files (.slnx, .slnf)
    - Update sample using statements
    - Update READMEs, SKILL.md, ADRs in docs/
    - Disable package validation baseline for renamed packages
    - Fix UTF-8 BOM encoding on all affected .cs files
    - AzureAI.Persistent left completely unchanged
    
    * Fix format: remove ImplicitUsings, add explicit usings, fix BOM encoding
    
    - Remove ImplicitUsings=enable from Foundry csproj to resolve IDE0005
      on shared ReplacingRedactor.cs
    - Add explicit System usings to all source files that relied on them
    - Sort usings alphabetically per editorconfig rules
    - Fix UTF-8 BOM on 12 sample Program.cs files
    - Rename Azure AI Foundry Agents to Microsoft Foundry Agents in docs
  • .NET: Fix RequestInfoEvent lost when resuming workflow from checkpoint (#4955)
    * Fix RequestInfoEvent lost when resuming workflow from checkpoint
    
    * Fix streaming run double disposal in tests and lockstep republishing before Started event is emitted.
    
    * Fix bug to remove messages after sending to avoid losing messages on send failure.
    
    * Fix declarative test harness
  • .NET: [BREAKING] Rename from ServiceStoredSimulatingChatClient to PerServiceCallChatHistoryPersistingChatClient (#4993)
    * Rename from ServiceStoredSimulatingChatClient to PerServiceCallChatHistoryPersistingChatClient
    
    * Address PR comment
  • .NET: Allow Simulating service stored ChatHistory to improve consistency (#4974)
    * Allow Simulating service stored ChatHistory to improve consistency
    
    * Fixing bug in ServiceStoredSimulatingChatClient
    
    * Addressing PR comments.
    
    * Address PR comments
    
    * Apply suggestion from @SergeyMenshykh
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
    
    * Fix bug
    
    ---------
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • .NET: Add inline skills API (#4951)
    * add inline skills
    
    * Fix IDE1006 and IDE0004 formatting errors in test files
    
    - Add 'Async' suffix to async test methods in FilteringAgentSkillsSourceTests,
      DeduplicatingAgentSkillsSourceTests, and AgentInMemorySkillsSourceTests
    - Use pragma to suppress false-positive IDE0004 on casts needed for overload
      disambiguation in AgentInlineSkillTests and AgentInlineSkillResourceTests
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * address issues
    
    * address comments
    
    * make inline skills script and resource model classes internal
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@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>
  • .NET: Fixes for durable agents integration tests (#4952)
    * Fixing for durable agents integration tests
    
    * Add further fixes
  • .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
  • .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: 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>
  • .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: 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: 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
  • .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>
  • .NET: Obsolete the V1 helper methods and migrate samples using it where possible (#4795)
    * Obsolete the V1 helper methods and migrate samples using it where possible
    
    * Address PR comments
  • .NET: Improve visibility for AzureFunctions Workflows samples run tests in increase timeouts (#4820)
    * Reduce timeout flakiness for AzureFunctions Workflows samples run tests
    
    * Add more updates
    
    * Address PR comments
    
    * Address PR comments
  • .NET: Update to OpenAI 2.9.1, Azure.AI.OpenAI 2.9.0-beta.1, Microsoft.Extensions.AI 10.4.0, and Azure.AI.Projects 2.0.0-beta.2 (#4613)
    * Initial plan
    
    * Update code for Microsoft.Extensions.AI.Abstractions 10.4.0 breaking changes
    
    - Rename FunctionApprovalRequestContent → ToolApprovalRequestContent
    - Rename FunctionApprovalResponseContent → ToolApprovalResponseContent
    - Rename UserInputRequestContent → ToolApprovalRequestContent
    - Rename UserInputResponseContent → ToolApprovalResponseContent
    - Update .FunctionCall property → .ToolCall with FunctionCallContent casts where needed
    - Update .Id property → .RequestId on the renamed types
    - Rename FunctionApprovalRequestEventGenerator → ToolApprovalRequestEventGenerator
    - Rename FunctionApprovalResponseEventGenerator → ToolApprovalResponseEventGenerator
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update OpenAI 2.9.1, ME.AI 10.4.0, fix breaking API changes
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Fix remaining ME.AI 10.4.0 breaking changes: MCP approval types, .Output→.Outputs
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Use pattern matching with `when` for ToolApprovalRequestContent/FunctionCallContent
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Update Azure.AI.OpenAI to 2.9.0-beta.1
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Fix remaining GetResponsesClient(model) build failures for Azure.AI.OpenAI 2.9.0-beta.1
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Address review feedback: remove redundant type checks in TestRequestAgent.cs and fix error message in AIAgentHostExecutor.cs
    
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    
    * Update Azure.AI.Projects to 2.0.0-beta.2 with namespace migration
    
    - Azure.AI.Projects 2.0.0-beta.1 → 2.0.0-beta.2
    - Azure.AI.Projects.OpenAI → Azure.AI.Extensions.OpenAI (transitive)
    - Agent types moved to Azure.AI.Projects.Agents namespace
    - AgentRecord.Versions.Latest → AgentRecord.GetLatestVersion()
    - OpenAPIFunctionDefinition → OpenApiFunctionDefinition
    - BingCustomSearchToolParameters → BingCustomSearchToolOptions
    - MemorySearchPreviewTool.UpdateDelay → UpdateDelayInSecs
    - Azure.Identity 1.17.1 → 1.19.0
    - Microsoft.Identity.Client.Extensions.Msal 4.78.0 → 4.83.1
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Fix remaining type renames for Azure.AI.Projects 2.0.0-beta.2
    
    - BrowserAutomationToolParameters → BrowserAutomationToolOptions
    - MemoryUpdateOptions.UpdateDelay stays as UpdateDelay (not renamed)
    - WaitForMemoriesUpdateAsync parameter order: pollingInterval before options
    - AIProjectAgentsOperations → AgentsClient
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Fix format errors and OpenTelemetry test for ME.AI 10.4.0
    
    - Remove unused 'using Azure.AI.Extensions.OpenAI' and fix import ordering
      in Agent_With_AzureAIProject/Program.cs
    - Update OpenTelemetryAgentTests: gen_ai.tool.definitions is now always
      emitted regardless of EnableSensitiveData per ME.AI 10.4.0 change
      (dotnet/extensions#7346). Tool definitions are not considered sensitive.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix GetRepoFolder() to work in git worktrees
    
    Use 'workflow-samples' directory as repo root marker instead of '.git',
    which fails in worktrees (.git is a file) and also matches too early
    when a '.github' folder exists in subdirectories.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix formatting: remove unused usings and fix import ordering
    
    dotnet format applied across 59 impacted projects. Primarily removes
    unnecessary 'using Azure.AI.Projects' where Azure.AI.Projects.Agents
    provides all needed types, and fixes import ordering per editorconfig.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Disable AzureAIAgentsPersistent integration tests (#4769)
    
    Azure.AI.Agents.Persistent 1.2.0-beta.9 references McpServerToolApprovalResponseContent
    which was removed in ME.AI 10.4.0 (renamed to ToolApprovalResponseContent), causing
    TypeLoadException at runtime. Mark all 6 test classes with IntegrationDisabled trait
    until Persistent ships a version targeting ME.AI 10.4.0+.
    
    Upstream fix: https://github.com/Azure/azure-sdk-for-net/pull/56929
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add README with compatibility note for AzureAI.Persistent (#4769)
    
    Documents that Azure.AI.Agents.Persistent 1.2.0-beta.9 is only compatible
    with ME.AI ≤10.3.0 and OpenAI ≤2.8.0 due to type renames in ME.AI 10.4.0.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix file encoding: restore UTF-8 BOM on Persistent test files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Mark AzureAI.Persistent as IsPackable=false (#4769)
    
    Prevent shipping until Azure.AI.Agents.Persistent targets ME.AI 10.4.0+.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Moving IsPackable after import
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Trim src references and add utility to enforce (#4693)
    * Trim src references and add utility to enforce
    
    * Potential fix for pull request finding
    
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
  • .NET: Fix source generator bug that silently drops base class handler registrations for protocol-only partial executors (#4751)
    * Fix source generator bug that silently drops base class handler registrations for protocol-only partial executors
    
    * Fixed xml comments and variable naming.
  • .NET: Validate SkillsInstructionPrompt contains {0} placeholder in FileAgentSkillsProvider (#4642)
    * Fix FileAgentSkillsProvider accepting SkillsInstructionPrompt without {0} placeholder (#4638)
    
    BuildSkillsInstructionPrompt validated only format-string syntax via
    string.Format(template, ""), which silently accepted templates without a
    {0} placeholder. The generated skills list was then dropped from the final
    instructions.
    
    Tighten validation to format with a sentinel string and verify it appears
    in the output, rejecting templates that do not reference argument 0 with
    an ArgumentException.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix netstandard2.0 compat and simplify prompt template validation (#4638)
    
    - Replace string.Contains(string, StringComparison) with IndexOf for
      netstandard2.0/net472 compatibility
    - Remove sentinel round-trip check; validate {0} directly on the raw
      template string using IndexOf
    - Add positive test verifying custom SkillsInstructionPrompt with {0}
      is accepted and applied to output
    
    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 Compaction - Allow developer to specify a custom formatter for ToolResultCompactionStrategy (#4667)
    * Initial plan
    
    * Allow developer to specify custom formatter for ToolResultCompactionStrategy
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Refine shape
    
    * Fix test expectation
    
    * Potential fix for pull request finding
    
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    Co-authored-by: Chris Rickman <crickman@microsoft.com>
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
  • .NET Compaction - Add AsChatReducer() extension to expose CompactionStrategy as IChatReducer (#4664)
    * Initial plan
    
    * Add ChatStrategyExtensions.cs with AsChatReducer() extension method and tests
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Refactor message list creation in ReduceAsync method
    
    * Remove unnecessary blank line in AsChatReducer method
    
    * Potential fix for pull request finding
    
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
    
    * Potential fix for pull request finding
    
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
    
    * Fix test
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Chris Rickman <crickman@microsoft.com>
  • .NET: Fix race condition issue in FanInEdge while processing messages. (#4662)
    * Fix race condition issue in FanInEdge while processing messages.
    
    * refactored to limit the code segment under lock.
    
    * Remove extra materialization of the result.
    
    * Added comment to clarify future changes if process message is made async.
  • .NET: Align sample build configuration with test runner in CI (#4735)
    * Run azure functions integration tests in release mode.
    
    * Use debug when in debug build.
  • .NET: Add durable workflow support (#4436)
    * .NET: [Feature Branch] Add basic durable workflow support (#3648)
    
    * Add basic durable workflow support.
    
    * PR feedback fixes
    
    * Add conditional edge sample.
    
    * PR feedback fixes.
    
    * Minor cleanup.
    
    * Minor cleanup
    
    * Minor formatting improvements.
    
    * Improve comments/documentation on the execution flow.
    
    * .NET: [Feature Branch] Add Azure Functions hosting support for durable workflows (#3935)
    
    * Adding azure functions workflow support.
    
    * - PR feedback fixes.
    - Add example to demonstrate complex Object as payload.
    
    * rename instanceId to runId.
    
    * Use custom ITaskOrchestrator to run orchestrator function.
    
    * .NET: [Feature Branch] Adding support for events & shared state in durable workflows (#4020)
    
    * Adding support for events & shared state in durable workflows.
    
    * PR feedback fixes
    
    * PR feedback fixes.
    
    * Add YieldOutputAsync calls to 05_WorkflowEvents sample executors
    
    The integration test asserts that WorkflowOutputEvent is found in the
    stream, but the sample executors only used AddEventAsync for custom
    events and never called YieldOutputAsync. Since WorkflowOutputEvent is
    only emitted via explicit YieldOutputAsync calls, the assertion would
    fail. Added YieldOutputAsync to each executor to match the test
    expectation and demonstrate the API in the sample.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix deserialization to use shared serializer options.
    
    * PR feedback updates.
    
    * Sample cleanup
    
    * PR feedback fixes
    
    * Addressing PR review feedback for DurableStreamingWorkflowRun
    
       - Use -1 instead of 0 for taskId in TaskFailedException when task ID is not relevant.
       - Add [NotNullWhen(true)] to TryParseWorkflowResult out parameter following .NET TryXXX conventions.
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * .NET: [Feature Branch]  Add nested sub-workflow support for durable workflows (#4190)
    
    * .NET: [Feature Branch] Add nested sub-workflow support for durable workflows
    
    * fix readme path
    
    * Switch Orchestration output from string to DurableWorkflowResult.
    
    * PR feedback fixes
    
    * Minor cleanup based on PR feedback.
    
    * .NET: [Feature Branch] Add Human In the Loop support for durable workflows (#4358)
    
    * Add Azure Functions HITL workflow sample
    
    Add 06_WorkflowHITL Azure Functions sample demonstrating Human-in-the-Loop
    workflow support with HTTP endpoints for status checking and approval responses.
    
    The sample includes:
    - ExpenseReimbursement workflow with RequestPort for manager approval
    - Custom HTTP endpoint to check workflow status and pending approvals
    - Custom HTTP endpoint to send approval responses via RaiseEventAsync
    - demo.http file with step-by-step interaction examples
    
    * PR feedback fixes
    
    * Minor comment cleanup
    
    * Minor comment clReverted the `!context.IsReplaying` guards on `PendingEvents.Add`/`RemoveAll` and `SetCustomStatus` in `ExecuteRequestPortAsync`. The guards broke fan-out scenarios where parallel RequestPorts      need to be discoverable after replay. `SetCustomStatus` is idempotent metadata that doesn't affect replay determinism.eanup
    
    * fix  for PR feedback
    
    * PR feedback updates
    
    * Improvements to samples
    
    * Improvements to README
    
    * Update samples to use parallel request ports.
    
    * Unit tests
    
    * Introduce local variables to improve readability of Workflows.Workflows access patter
    
    * Use GitHub-style callouts and add PowerShell command variants in HITL sample README
    
    * Add changelog entries for durable workflow support (#4436)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Bump Microsoft.DurableTask.Worker to 1.19.1 to fix version downgrade
    
    Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.13.1 requires
    Microsoft.DurableTask.Worker >= 1.19.1 via its transitive dependency on
    Microsoft.DurableTask.Worker.Grpc 1.19.1.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix broken markdown links in durable workflow sample READMEs
    
    - Create Workflow/README.md with environment setup docs
    - Fix ../README.md -> ../../README.md in ConsoleApps 01, 02, 03, 08
    - Fix SubWorkflows relative path (3 levels -> 4 levels up)
    - Fix dead Durable Task Scheduler URL
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix build errors from main merge: Throw conflict, ExecuteAsync rename, GetNewSessionAsync rename
    
    - Remove InjectSharedThrow from DurableTask csproj (uses Workflows' internal Throw via InternalsVisibleTo)
    - Update ExecuteAsync -> ExecuteCoreAsync with WorkflowTelemetryContext.Disabled
    - Update GetNewSessionAsync -> CreateSessionAsync
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Move durable workflow samples to 04-hosting/DurableWorkflows
    
    Aligns with main branch sample reorganization where durable samples
    live under 04-hosting/ (alongside DurableAgents/).
    
    - Move samples/Durable/Workflow/ -> samples/04-hosting/DurableWorkflows/
    - Add Directory.Build.props matching DurableAgents pattern
    - Update slnx project paths
    - Update integration test sample paths
    - Update README cd paths and cross-references
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix build errors: remove duplicate base class members, update renamed APIs
    
    - Remove duplicate OutputLog, WriteInputAsync, CreateTestTimeoutCts, etc. from
      ConsoleAppSamplesValidation (already in SamplesValidationBase)
    - Update AddFanInEdge -> AddFanInBarrierEdge in workflow samples
    - Update GetNewSessionAsync -> CreateSessionAsync in workflow samples
    - Update SourceId -> ExecutorId (obsolete) in workflow samples
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix dotnet format issues: add UTF-8 BOM and remove unused using
    
    - Add UTF-8 BOM to 20 .cs files across DurableTask, AzureFunctions,
      unit tests, and workflow samples
    - Remove unnecessary using directive in 07_SubWorkflows/Executors.cs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix typo PaymentProcesser -> PaymentProcessor and garbled arrows in README
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix GetExecutorName to handle agent names with underscores
    
    Split on last underscore instead of first, and validate that the
    suffix is a 32-char hex string (sanitized GUID) before stripping it.
    This prevents truncation of agent names like 'my_agent' when the
    executor ID is 'my_agent_<guid>'.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Align DurableTask.Client.AzureManaged to 1.19.1
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Bump DurableTask and Azure Functions extension package versions
    
    - DurableTask.* packages: 1.19.1 -> 1.22.0
    - Functions.Worker.Extensions.DurableTask: 1.13.1 -> 1.16.0
    - Functions.Worker.Extensions.DurableTask.AzureManaged: 1.0.1 -> 1.5.0 (telemetry bug fix)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Bump DurableTask SDK packages to 1.22.0
    
    - DurableTask.Client: 1.19.1 -> 1.22.0
    - DurableTask.Client.AzureManaged: 1.19.1 -> 1.22.0
    - DurableTask.Worker: 1.19.1 -> 1.22.0
    - DurableTask.Worker.AzureManaged: 1.19.1 -> 1.22.0
    - Azure Functions extensions kept at original versions (1.13.1/1.0.1) due to
      host-side DurableTask.Core 3.7.0 incompatibility with newer extensions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update Microsoft.Azure.Functions.Worker.Extensions.DurableTask to "1.16.0"
    
    * Add the local.settings.json files to the sample which were previously ignored. This aligns with our other samples.
    
    * Increase timeout for tests as CI has them failing transiently.
    
    * increaset timeout value for azure functions integration tests.
    
    * Add YieldsOutput(string) to workflow shared state sample executors
    
    ValidateOrder and EnrichOrder call YieldOutputAsync with string messages,
    but only their TOutput (OrderDetails) was in the allowed yield types.
    This caused TargetInvocationException in the WorkflowSharedState sample
    validation integration test.
    
    * Downgrade the durable packages to 1.18.0
    
    * Downgrading Worker.Extensions.DurableTask to 1.12.1
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET - Fix flaky workflows test (#4700)
    * Initial plan
    
    * Fix flaky test: initialize creationTime 1 second in the past
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
  • .NET: [Durable Agents] Filter empty AIContent from durable agent state responses (#4670)
    * Filter empty AIContent from durable agent state responses
    
    Prevent opaque AIContent objects (e.g., with only RawRepresentation set)
    from being stored in durable entity state, where they serialize to empty
    JSON payloads. Base AIContent instances are kept only if they have
    Annotations or AdditionalProperties.
    
    Fixes https://github.com/microsoft/agent-framework/issues/4481
    
    * Update CHANGELOG.md and fix linter violation
  • .NET: Fix to emit WorkflowStartedEvent during workflow execution (#4514)
    * Fix bug to emit WorkflowStartedEvent during workflow execution
    
    * Updated based on PR comments
  • .NET: Update A2A, MCP, and system package dependencies (#4647)
    * .NET: Update A2A, MCP, and system package dependencies
    
    Update dependency versions:
    - A2A/A2A.AspNetCore: 0.3.3-preview → 0.3.4-preview
    - ModelContextProtocol: 0.8.0-preview.1 → 1.1.0
    - Microsoft.Bcl.AsyncInterfaces: 10.0.3 → 10.0.4
    - System.Linq.AsyncEnumerable: 10.0.0 → 10.0.4
    - Add Microsoft.Bcl.Memory 10.0.4
    
    Remove internal polyfill extensions now provided by A2A SDK 0.3.4:
    - A2AMetadataExtensions (source + tests)
    - AdditionalPropertiesDictionaryExtensions (source + tests)
    
    Update DefaultMcpToolHandler to match MCP SDK 1.1.0 API changes where
    ImageContentBlock.Data and AudioContentBlock.Data changed from string
    to ReadOnlyMemory<byte>.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * address pr review comments
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Include ReasoningEncryptedContent by default when stored output disabled with Responses (#4623)
    * Include ReasoningEncryptedContent by default when stored output disabled
    
    * Fix formatting
    
    * Fix formatter
  • .NET: Add FinishReason to AgentResponses (#4617)
    * Add FinishReason to AgentResponses
    
    * Address PR comments
  • .NET Compaction - Introducing compaction strategies and pipeline (#4533)
    * Checkpoint
    
    * Checkpoint
    
    * Stable
    
    * Strategies
    
    * Updated
    
    * Encoding
    
    * Formatting
    
    * Cleanup
    
    * Formatting
    
    * Tests
    
    * Tuning
    
    * Update tests
    
    * Test update
    
    * Remove working solution
    
    * Add sample to solution
    
    * Sample readyme
    
    * Experimental
    
    * Format
    
    * Formatting
    
    * Encoding
    
    * Support IChatReducer
    
    * Sample output formatting
    
    * Initial plan
    
    * Replace CompactingChatClient with MessageCompactionContextProvider
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Boundary condition
    
    * Fix encoding
    
    * Fix cast
    
    * Test coverage
    
    * Namespace
    
    * Improvements
    
    * Efficiency
    
    * Cleanup
    
    * Detect service managed conversation
    
    * Fix namespace
    
    * Fix merge
    
    * Fix test expectation
    
    * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * Address PR comments (x1)
    
    * Update comment
    
    * Update comments
    
    * Clean-up
    
    * Format output
    
    * Sync sample comment
    
    * Fix condition
    
    * Adjust data-flow
    
    * Address comments (x2)
    
    * Direct compaction
    
    * Fix summarization content
    
    * Argument check / fix count calculation
    
    * Minor follow-up
    
    * Diagnostics
    
    * Minor updates
    
    * Fix state test
    
    * Fix sliding window perf
    
    * Stable state keys
    
    * Increase size computation
    
    * Formatting
    
    * Add README.md for Agent_Step18_CompactionPipeline sample (#4574)
    
    * Sample comments
    
    * Updated
    
    * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/tests/Microsoft.Agents.AI.UnitTests/Compaction/CompactionProviderTests.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Agents.AI/Compaction/MessageIndex.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address copilot comments
    
    * Fix namespace
    
    * Comments / convensions
    
    * Prefix `MessageGroup` and `MessageIndex`
    
    * Fix sliding window
    
    * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Agents.AI.Abstractions/InMemoryChatHistoryProvider.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Python alignment
    
    * Fix merge
    
    * Fix equality, readme, and sample
    
    * Readme update and ToolResult fix
    
    * Update dotnet/src/Microsoft.Agents.AI/Compaction/SummarizationCompactionStrategy.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Simplify readme
    
    * Update dotnet/samples/02-agents/Agents/Agent_Step18_CompactionPipeline/README.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Remove example
    
    * Remove unused
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Added support for polymorphic type as workflow output (#4485)
    * Added support for polymorphic type as workflow output
    
    * Update Linq expression to avoid unnecessary allocations.
    
    * Added caching as per PR comment