Commit Graph

735 Commits

  • .NET: Discover skill resources from directory instead of markdown links (#4401)
    * discover resources in skills folder
    
    * address pr review comments
    
    * change type of AllowedResourceExtensions
    
    * address pr review comment
  • .NET: Skip flacky UT + (Attempt) Merge Gatekeeper fix (#4456)
    * Skip flacky UT
    
    * Ignore org-level GitHub App checks in merge-gatekeeper
    
    Add Cleanup artifacts, Agent, Prepare, and Upload results to the
    ignored list. These are check runs created by an org-level GitHub App
    (MSDO), not by any workflow in this repo, and their transient failures
    should not block merges.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Update Azure.AI.Projects 2.0.0-beta.1 (#4270)
    * Update Microsoft.Agents.AI.AzureAI for Azure.AI.Projects SDK 2.0.0
    
    - Bump Azure.AI.Projects to 2.0.0-alpha.20260213.1
    - Bump Azure.AI.Projects.OpenAI to 2.0.0-alpha.20260213.1
    - Bump System.ClientModel to 1.9.0 (transitive dependency)
    - Switch both GetAgent and CreateAgentVersion to protocol methods
      with MEAI user-agent policy injection via RequestOptions
    - Migrate 29 CREATE-path tests from FakeAgentClient to HttpHandlerAssert
      pattern for real HTTP pipeline testing
    - Fix StructuredOutputDefinition constructor (BinaryData -> IDictionary)
    - Fix responses endpoint path (openai/responses -> /responses)
    - Add local-packages NuGet source for pre-release nupkgs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update Azure.AI.Projects to 2.0.0-beta.1 from NuGet.org
    
    - Update Azure.AI.Projects and Azure.AI.Projects.OpenAI to 2.0.0-beta.1
    - Remove local-packages NuGet source (packages now on nuget.org)
    - Fix MemorySearchTool -> MemorySearchPreviewTool rename
    - Fix RedTeams.CreateAsync ambiguous call
    - Fix CreateAgentVersion/Async signature change (BinaryData -> string)
    - Suppress AAIP001 experimental warning for WorkflowAgentDefinition
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Move s_modelWriterOptionsWire field before methods that use it
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix flaky test: prevent spurious workflow_invoke Activity on timeout wake-up
    
    The StreamingRunEventStream run loop uses a 1-second timeout on
    WaitForInputAsync. When the timeout fires before the consumer calls
    StopAsync, the loop would create a spurious workflow_invoke Activity
    even though no actual input was provided. This caused the
    WorkflowRunActivity_IsStopped_Streaming_OffThread_MultiTurnAsync test
    to intermittently fail (expecting 2 activities but finding 3).
    
    Fix: guard the loop body with a HasUnprocessedMessages check. On
    timeout wake-ups with no work, the loop waits again without creating
    an activity or changing the run status.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix epoch race condition causing unit tests to hang on net10.0 and net472
    
    The HasUnprocessedMessages guard (previous commit) correctly prevents
    spurious workflow_invoke Activity creation on timeout wake-ups, but
    exposed a latent race in the epoch-based signal filtering.
    
    The race: when the run loop processes messages quickly and calls
    Interlocked.Increment(ref _completionEpoch) before the consumer calls
    TakeEventStreamAsync, the consumer reads the already-incremented epoch
    and sets myEpoch = epoch + 1. This causes the consumer to skip the
    valid InternalHaltSignal (its epoch < myEpoch) and block forever
    waiting for a signal that will never arrive (since the guard prevents
    spurious signal generation).
    
    Fix: read _completionEpoch without +1. The +1 was originally needed to
    filter stale signals from timeout-driven spurious loop iterations, but
    those no longer exist thanks to the HasUnprocessedMessages guard.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Revert "Fix epoch race condition causing unit tests to hang on net10.0 and net472"
    
    This reverts commit 6ce7f01be8.
    
    * Revert "Fix flaky test: prevent spurious workflow_invoke Activity on timeout wake-up"
    
    This reverts commit 98963e17f2.
    
    * Skip hanging multi-turn declarative integration tests
    
    The ValidateMultiTurnAsync tests (ConfirmInput.yaml, RequestExternalInput.yaml)
    hang indefinitely in CI, blocking the merge queue. The hang is SDK-independent
    (reproduces with both Azure.AI.Projects 1.2.0-beta.5 and 2.0.0-beta.1) and
    is a pre-existing issue in the declarative workflow multi-turn test logic.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Remove unused using directive in IntegrationTest.cs
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Restore Azure.AI.Projects 2.0.0-beta.1 version bump
    
    The merge from main accidentally reverted the package versions back to
    1.2.0-beta.5. This is the primary change of this PR.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address merge conflict
    
    * Skip flaky WorkflowRunActivity_IsStopped_Streaming_OffThread_MultiTurnAsync test
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Skip CheckSystem test cases temporarily
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Disable OpenAIAssistant structured output integration tests (#4451)
    Skip all three structured output run tests in
    OpenAIAssistantStructuredOutputRunTests as they fail intermittently
    on the build agent/CI, matching the pattern already used in
    AzureAIAgentsPersistentStructuredOutputRunTests.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Updated Copilot SDK to the latest version (#4406)
    * Updated Copilot SDK to the latest version
    
    * Added retry
  • .NET: [BREAKING] Change *Provider StateKey to list of StateKeys (#4395)
    * Change *Provider StateKey to list of StateKeys
    
    * Add more statekey validation tests
    
    * Address PR comments
  • [BREAKING] Add response filter for store input in *Providers (#4327)
    * Add response filter for store input for *Providers
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address feedback
    
    * Apply suggestions from code review
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • .NET: AzureAI Package - Skip tool validation when UseProvidedChatClientAsIs is true (#4389)
    * Skip tool validation when UseProvidedChatClientAsIs is true (#3855)
    
    When GetAIAgentAsync is called with ChatClientAgentOptions.UseProvidedChatClientAsIs = true,
    skip requireInvocableTools validation so users can handle function calls manually
    via custom ChatClient middleware without needing to provide matching AIFunction tools.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Simplify requireInvocableTools expression per review feedback
    
    UseProvidedChatClientAsIs is a non-nullable bool, so use ! operator
    instead of != true for clarity.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Decouple tool matching from validation and add tool preservation test (#3855)
    
    Always match provided AIFunctions to server-side function definitions
    regardless of requireInvocableTools flag. Only throw when validation
    is required and no match is found. This ensures UseProvidedChatClientAsIs
    still preserves user-provided AIFunction tools instead of falling back
    to the broken ResponseToolAITool wrapper.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Skip OffThread observability test (#4399)
    * Skip flaky OffThread observability test
    
    Temporarily skip CreatesWorkflowEndToEndActivities_WithCorrectName_OffThreadAsync
    due to intermittent failures. Tracked in #4398.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Update dotnet/tests/Microsoft.Agents.AI.Workflows.UnitTests/ObservabilityTests.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: AuthN & AuthZ sample with asp.net service and web client (#4354)
    * Add sample demonstrating authentication and user access in agent tools
    
    * Add fixes to enable running on windows
    
    * Add launchsettings, add docker-compose to slnx and fix formatting
    
    * Switch to Expenses rather than todo based sample and address PR comments
    
    * Rename sample
    
    * Fix formatting
  • .NET: Fixing issue with invalid node Ids when visualizing dotnet workflows. (#4269)
    * Fix Mermaid rendering errors in WorkflowVisualizer.ToMermaidString
    
    Fix two bugs in the Mermaid diagram output:
    
    1. Use safe node aliases (node_0, node_1, ...) instead of raw executor IDs
       as Mermaid node identifiers. Raw IDs containing spaces, dots, or
       non-ASCII characters (e.g. Japanese) caused Mermaid parse errors.
    
    2. Fix conditional edge arrow syntax from '.--> ' (invalid) to '.-> '
       (valid Mermaid dotted arrow syntax).
    
    Fixes #1406
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Use recognizable sanitized IDs for Mermaid node identifiers\n\nReplace generic node_0/node_1 aliases with IDs derived from the original\nexecutor names. ASCII letters, digits, and underscores are preserved;\nother characters become underscores (collapsed, trimmed). Leading digits\nget an n_ prefix. Collisions are resolved with a numeric suffix.\n\nThis keeps node IDs readable in the Mermaid source while the display\nlabels continue to show the full original names."
    
    * Remove issue number references from test names and comments"
    
    * Address PR review feedback from Copilot\n\n- Add Throw.IfNull(id) guard to SanitizeMermaidNodeId\n- Add safety limit (10,000) to collision resolution loop\n- Restore missing edge assertions (middle1/middle2 --> end)\n- Fix comment to show actual sanitized ID (n_1_User_input)\n- Use stricter regex in Unicode test (must start with letter/underscore)"
    
    * Address second round of PR review feedback\n\n- Escape node display labels via EscapeMermaidLabel to handle quotes,\n  brackets, and newlines in executor IDs\n- Fix XML doc on SanitizeMermaidNodeId to accurately describe that\n  existing consecutive underscores in input are preserved\n- Restore specific edge assertion (mid --> end) in conditional edge test\n- Restore fan-in routing assertions (s1/s2 through intermediate node,\n  no direct edges to t) in fan-in test"
    
    ---------
    
    Co-authored-by: alliscode <bentho@microsoft.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .Net: Add additional Hosted Agent Samples (#4325)
    * Add 3 new hosted agent samples: AgentWithTools, AgentWithLocalTools, AgentThreadAndHITL
    
    - AgentWithTools: Foundry tools (MCP + code interpreter) via UseFoundryTools
    - AgentWithLocalTools: Local C# function tool (Seattle hotel search) with AIProjectClient
    - AgentThreadAndHITL: Human-in-the-loop with ApprovalRequiredAIFunction and thread persistence
    
    All samples follow agent-framework conventions (net10.0, AzureCliCredential, CPM disabled).
    AgentWithTools includes comprehensive README with setup guide and troubleshooting.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add root HostedAgents README, replace test_requests.py with .http, update sample READMEs
    
    - Create root README.md with shared prerequisites, Azure AI Foundry setup,
      troubleshooting, and samples index
    - Replace test_requests.py with run-requests.http in AgentThreadAndHITL
    - Add pointer to root README in all 6 sample READMEs
    - Trim AgentWithTools README to concise style
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix dotnet format issues in AgentWithLocalTools/Program.cs
    
    - Add UTF-8 BOM (CHARSET)
    - Sort System.ClientModel.Primitives import alphabetically (IMPORTS)
    - Use target-typed new for AIProjectClient (IDE0090)
    - Add internal accessibility modifier to Hotel record (IDE0040)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: align model names and package versions
    
    - Change default model from gpt-4.1-mini to gpt-4o-mini in AgentWithLocalTools
      (Program.cs, agent.yaml, README.md) to match existing samples
    - Change README example from gpt-5.2 to gpt-4o-mini in AgentWithTools and root README
    - Align AgentWithLocalTools package versions with other samples:
      Azure.AI.AgentServer.AgentFramework beta.6 -> beta.8
      Azure.AI.OpenAI 2.8.0-beta.1 -> 2.7.0-beta.2
      Microsoft.Extensions.AI.OpenAI 10.2.0-preview -> 10.1.1-preview
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Upgrade new samples to latest package versions
    
    - Azure.AI.OpenAI: 2.7.0-beta.2 -> 2.8.0-beta.1
    - Microsoft.Extensions.AI.OpenAI: 10.1.1-preview -> 10.3.0
    
    Aligns with AgentWithHostedMCP which uses the latest versions.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Pin AgentThreadAndHITL to Microsoft.Extensions.AI.OpenAI 10.1.1
    
    Azure.AI.AgentServer.AgentFramework beta.8 was compiled against
    Microsoft.Extensions.AI.Abstractions with the single-param
    FunctionApprovalRequestContent.CreateResponse(bool). Version 10.3.0
    changed the signature to include an optional reason parameter, causing
    a binary incompatibility at runtime. Pin to 10.1.1 until the framework
    is recompiled against the newer abstractions.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python: .NET: Fix .NET conversation memory in DevUI (#3484) (#4294)
    * Fix .NET conversation memory in DevUI (#3484)
    
    * formatting fixes
    
    * fix memory regression in python devui , fix for #4123
    
    * Fix for #3983: Added _get_event_type() helper that safely accesses event type on both objects (.type) and dicts (.get("type")). Replaced all 4 bare event.type accesses in _executor.py (lines 267, 477, 499, 523).
    
    Root cause: PR #3690 changed event.__class__.__name__ == "RequestInfoEvent" (safe) to event.type == "request_info" (crashes on dicts), but _execute_workflow still yields raw dicts on error paths.
    
    Test: test_workflow_error_yields_dict_event_without_crash — mocks a workflow that raises, verifies execute_entity consumes the dict error events without crashing.
    
    * format fixes
    
    * lint fixes
  • .NET: AgentThread serialization alternatives ADR (#3062)
    * AgentThread serialization alternatives ADR
    
    * Update decision drivers.
    
    * Address some Copilot PR comments.
    
    * Fix typo.
    
    * Add ChatClientAgentThread to sample code
    
    * Address comments, rename ADR and update SLNX.
  • .NET: Add helpers to more easily access in-memory ChatHistory and make ChatHistoryProvider management more configurable. (#4224)
    * Add helpers to more easily access in-memory ChatHistory and make ChatHistoryProvider management more configurable.
    
    * Apply suggestion from @Copilot
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Support hosted code interpreter for skill script execution (#4192)
    * support script execution by code interpretor
    
    * improve the instruction prompt
    
    * Add DefaultAzureCredential production warning to AgentSkills samples
    
    Add the standard three-line WARNING comment about DefaultAzureCredential
    production considerations to both AgentSkills sample Program.cs files,
    matching the convention used in all other GettingStarted/Agents samples.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * address pr review comments
    
    * address feedback
    
    * rename Skill* types to FileAgentSkill* prefix for consistency
    
    - Rename SkillFrontmatter -> FileAgentSkillFrontmatter
    - Rename SkillScriptExecutor -> FileAgentSkillScriptExecutor
    - Add FileAgentSkillScriptExecutionContext and FileAgentSkillScriptExecutionDetails
    - Update sample, provider, loader, and tests accordingly
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * reorder usings
    
    * use set for props initialization instead of init
    
    * rename HostedCodeInterpreterSkillScriptExecutor
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Python / .NET Samples - Restructure and Improve Samples (Feature Branc… (#4092)
    * Python: .NET Samples - Restructure and Improve Samples (Feature Branch) (#4091)
    
    * Moved by agent (#4094)
    
    * Fix readme links
    
    * .NET Samples - Create `04-hosting` learning path step (#4098)
    
    * Agent move
    
    * Agent reorderd
    
    * Remove A2A section from README 
    
    Removed A2A section from the Getting Started README.
    
    * Agent fixed links
    
    * Fix broken sample links in durable-agents README (#4101)
    
    * Initial plan
    
    * Fix broken internal links in documentation
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Revert template link changes; keep only durable-agents README fix
    
    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 Samples - Create `03-workflows` learning path step (#4102)
    
    * Fix solution project path
    
    * Python: Fix broken markdown links to repo resources (outside /docs) (#4105)
    
    * Initial plan
    
    * Fix broken markdown links to repo resources
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Update README to rename .NET Workflows Samples section
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * .NET Samples - Create `02-agents` learning path step (#4107)
    
    * .NET: Fix broken relative link in GroupChatToolApproval README (#4108)
    
    * Initial plan
    
    * Fix broken link in GroupChatToolApproval README
    
    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>
    
    * Update labeler configuration for workflow samples
    
    * .NET - Reorder Agents samples to start from Step01 instead of Step04 (#4110)
    
    * Fix solution
    
    * Resolve new sample paths
    
    * Move new AgentSkills and AgentWithMemory_Step04 samples
    
    * Fix link
    
    * Fix readme path
    
    * fix: update stale dotnet/samples/Durable path reference in AGENTS.md
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Moved new sample
    
    * Update solution
    
    * Resolve merge (new sample)
    
    * Sync to new sample - FoundryAgents_Step21_BingCustomSearch
    
    * Updated README
    
    * .NET Samples - Configuration Naming Update (#4149)
    
    * .NET: Restore AzureFunctions index parity with ConsoleApps under DurableAgents samples (#4221)
    
    * Clean-up `05_host_your_agent`
    
    * Config setting consistency
    
    * Refine samples
    
    * AGENTS.md
    
    * Move new samples
    
    * Re-order samples
    
    * Move new project and fixup solution
    
    * Fixup model config
    
    * Fix up new UT project
    
    ---------
    
    Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
  • .NET: Fixing issue where OpenTelemetry span is never exported in .NET in-process workflow execution (#4196)
    * 1. Add reproduction test for issue #4155: workflow.run Activity never stopped in streaming OffThread path
    
    The WorkflowRunActivity_IsStopped_Streaming_OffThread test demonstrates that
    the workflow.run OpenTelemetry Activity created in StreamingRunEventStream.RunLoopAsync
    is started but never stopped when using the OffThread/Default streaming execution.
    The background run loop keeps running after event consumption completes, so the
    using Activity? declaration never disposes until explicit StopAsync() is called.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    2. Fix workflow.run Activity never stopped in streaming OffThread execution (#4155)
    
    The workflow.run OpenTelemetry Activity in StreamingRunEventStream.RunLoopAsync
    was scoped to the method lifetime via 'using'. Since the run loop only exits on
    cancellation, the Activity was never stopped/exported until explicit disposal.
    
    Fix: Remove 'using' and explicitly dispose the Activity when the workflow reaches
    Idle status (all supersteps complete). A safety-net disposal in the finally block
    handles cancellation and error paths.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add root-level workflow.session activity spanning run loop lifetime\n\nImplements two-level telemetry hierarchy per PR feedback from lokitoth:\n- workflow.session: spans the entire run loop / stream lifetime\n- workflow_invoke: per input-to-halt cycle, nested within the session\n\nThis ensures the session activity stays open across multiple turns,\nwhile individual run activities are created and disposed per cycle.\n\nAlso fixes linkedSource CancellationTokenSource disposal leak in\nStreamingRunEventStream (added using declaration)."
    
    * Address Copilot review: fix Activity/CTS disposal, rename activity, add error tag\n\n1. LockstepRunEventStream: Remove 'using' from Activity in async iterator\n   and manually dispose in finally block (fixes #4155 pattern). Also dispose\n   linkedSource CTS in finally to prevent leak.\n2. Tags.cs: Add ErrorMessage (\"error.message\") tag for runtime errors,\n   distinct from BuildErrorMessage (\"build.error.message\").\n3. ActivityNames: Rename WorkflowRun from \"workflow_invoke\" to \"workflow.run\"\n   for cross-language consistency.\n4. WorkflowTelemetryContext: Fix XML doc to say \"outer/parent span\" instead\n   of \"root-level span\".\n5. ObservabilityTests: Assert WorkflowSession absence when DisableWorkflowRun\n   is true.\n6. WorkflowRunActivityStopTests: Fix streaming test race by disposing\n   StreamingRun before asserting activities are stopped.\n7. StreamingRunEventStream/LockstepRunEventStream: Use Tags.ErrorMessage\n   instead of Tags.BuildErrorMessage for runtime error events."
    
    * Review fixes: revert workflow_invoke rename, use 'using' for linkedSource, move SessionStarted earlier\n\n- Revert ActivityNames.WorkflowRun back to \"workflow_invoke\" (OTEL semantic convention contract)\n- Use 'using' declaration for linkedSource CTS in LockstepRunEventStream (no timing sensitivity)\n- Move SessionStarted event before WaitForInputAsync in StreamingRunEventStream to match Lockstep behavior"
    
    * Improve naming and comments in WorkflowRunActivityStopTests"
    
    * Prevent session Activity.Current leak in lockstep mode, add nesting test
    
    Save and restore Activity.Current in LockstepRunEventStream.Start() so the
    session activity doesn't leak into caller code via AsyncLocal. Re-establish
    Activity.Current = sessionActivity before creating the run activity in
    TakeEventStreamAsync to preserve parent-child nesting.
    
    Add test verifying app activities after RunAsync are not parented under the
    session, and that the workflow_invoke activity nests under the session."
    
    * Fix stale XML doc: WorkflowRun -> WorkflowInvoke in ObservabilityTests
    
    ---------
    
    Co-authored-by: alliscode <bentho@microsoft.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Support InvokeMcpTool for declarative workflows (#4204)
    * Initial implementation of InvokeMcpTool in declarative workflow
    
    * Cleaned up sample implementation
    
    * Updated sample comments.
    
    * Added missing executor routing attribute
    
    * Fix PR comments.
    
    * Updated based on PR comments.
    
    * Updated based on PR comments.
    
    * Removed unnecessary using statement.
  • Update .NET package version to rc2 (#4257)
    - Bump RCNumber from 1 to 2
    - Update GitTag to 1.0.0-rc2
    - Update preview date stamps from 260219 to 260225
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Implement Task support for A2A Hosting package (#3732)
    * implement task support?
    
    * some metadata + session store impl
    
    * address PR comments x1
    
    * API reivew
    
    * llast changes
    
    * More test
    
    * remove unsued import
    
    * fix moq override
    
    * refactoring
    
    * ontaskupdated
    
    * adjust to delegate
    
    * fix encoding
    
    * address PR comments: rework
    
    * init 1
    
    * renaming
    
    * fix tests
    
    * fix comment
    
    * runmode rename
    
    * rename
    
    * rename
    
    * use exxperimental api, allow experimental on project level
    
    * throw on refereceTaskIds
  • .NET: Fix JSON arrays of objects parsed as empty records when no schema is defined (#4199)
    * fix: use HasSchema check in DetermineElementType to prevent empty records
    
    When parsing JSON arrays containing objects without a predefined schema,
    `DetermineElementType()` was creating a `VariableType` with an empty
    (non-null) schema via `targetType.Schema?.Select(...) ?? []`. This caused
    `ParseRecord` to take the schema-based parsing path, iterating over zero
    schema fields and silently discarding all JSON properties.
    
    The fix checks `targetType.HasSchema` and falls back to
    `VariableType.RecordType` (which has `Schema = null`) when no schema is
    defined, ensuring `ParseRecord` takes the dynamic `ParseValues()` path
    that preserves all JSON properties.
    
    Closes #4195
    
    * test: add regression tests for schema-less JSON array-of-objects parsing (#4195)
    
    Add two regression tests to JsonDocumentExtensionsTests:
    
    1. ParseRecord_ObjectWithArrayOfObjects_NoSchema_PreservesNestedProperties
       - Parses a JSON object containing an array of objects using
         VariableType.RecordType (no schema) and verifies that nested
         object properties (name, role) are preserved in each element.
       - This is the exact scenario from issue #4195 where objects in
         arrays were being returned as empty dictionaries.
    
    2. ParseList_ArrayOfObjects_NoSchema_PreservesProperties
       - Parses a JSON array of objects directly via ParseList with
         VariableType.ListType (no schema) and verifies all properties
         are preserved.
    
    Both tests follow the existing Arrange/Act/Assert pattern and would
    have failed before the DetermineElementType() fix (empty dictionaries
    instead of populated ones).
  • .NET: Add Foundry Agents Tool Sample - Bing Custom Search (#3701)
    * .NET: Add Bing Custom Search sample #3674
    
    * Apply format fixes
    
    * .NET: Improve Bing Custom Search sample with dual MEAI/Native SDK options
    
    - Add MEAI (Option 1) and Native SDK (Option 2) agent creation patterns
    - Add DefaultAzureCredential with standard WARNING comment
    - Add sample to solution file and FoundryAgents README index
    - Improve README with connection ID/instance name guidance
    - Fix missing newline at EOF in .csproj
    - Suppress CS8321 for unused local function pattern
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review comments for Bing Custom Search sample
    
    - Add Async suffix to CreateAgentWithMEAI and CreateAgentWithNativeSDK methods
    - Clarify comment to reference ResponseTool instead of BingCustomSearchTool
    - Update README Option 1 description to accurately reflect SDK usage
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Fix case-sensitive property mismatch in CosmosChatHistoryProvider queries (#3485)
    * Initial plan
    
    * Fix case-sensitivity bug in Cosmos queries and add tests
    
    Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com>
    
    * Fix style issues and update tests for new API
    
    Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: markwallace-microsoft <127216156+markwallace-microsoft@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • .NET: Add Foundry Agents Tool Sample - Web Search (#4040)
    * .NET: Add Web Search sample #3674
    
    * .NET: Fix WebSearch sample to use Responses API built-in web search
    
    Remove incorrect Bing Grounding connection ID requirement from the
    WebSearch sample. The web search tool uses the OpenAI Responses API
    built-in capability and does not need a connection ID.
    
    - Remove AZURE_FOUNDRY_BING_CONNECTION_ID env var requirement
    - Use HostedWebSearchTool() without connectionId properties
    - Refactor creation options into local functions (MEAI + NativeSDK)
    - Switch from AzureCliCredential to DefaultAzureCredential
    - Update README to reflect correct prerequisites
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix README to align DefaultAzureCredential docs with code
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address review: add project to solution, README, simplify response text
    
    - Add FoundryAgents_Step25_WebSearch to agent-framework-dotnet.slnx
    - Add web search sample entry to parent FoundryAgents README.md
    - Simplify text response extraction to use response.Text directly
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix merge conflict in slnx solution file
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Make Cosmos DB tests read COSMOSDB_ENDPOINT and COSMOSDB_KEY from environment variables (#4156)
    * Initial plan
    
    * Make Cosmos DB tests read COSMOSDB_ENDPOINT and COSMOSDB_KEY from environment variables
    
    Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
    
    * Rename EmulatorEndpoint/EmulatorKey static fields to use s_ prefix convention
    
    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: Fix FunctionInvocationDelegatingAgent to preserve all AgentRunOptions properties (#4179)
    When converting base AgentRunOptions to ChatClientAgentRunOptions, the middleware
    now preserves AllowBackgroundResponses, ContinuationToken, and AdditionalProperties
    in addition to ResponseFormat.
    
    Added unit test verifying all properties are preserved during the conversion.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Add ChatClient decorator for calling AIContextProviders (#4097)
    * Add ChatClient decorator for calling AIContextProviders
    
    * Format new files
    
    * Address PR comments
    
    * Revert problematic change
    
    * Rename Use to UseAIContextProvider
  • .NET: Add Foundry Agents Tool Sample - Memory Search (#3700)
    * .NET: Add Memory Search sample #3674
    
    * Apply format fixes
    
    * Add MemorySearch sample to solution, FoundryAgents and AgentWithMemory READMEs
    
    - Add FoundryAgents_Step26_MemorySearch.csproj to agent-framework-dotnet.slnx
    - Add Memory Search entry to FoundryAgents/README.md samples table
    - Add cross-reference from AgentWithMemory/README.md to MemorySearch sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Simplify store=false scenario for responses (#4124)
    * Simplify store=false scenario for responses
    
    * Mark AsIChatClientWithStoredOutputDisabled as Experimental
  • .NET: Support Agent Skills (#4122)
    * support agent skills
    
    * make the new agent skill provider experimental
    
    * Fix file encoding: add UTF-8 BOM to .cs files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix final newline and simplify new expressions
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix broken links in Agent Skills sample README
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add null check for skillPaths parameter
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Normalize references
    
    * normilize skill path
    
    * address comments regarding symlink check
    
    * address comments
    
    * fix failing test + regex improvements
    
    * small optimizations and improvments
    
    * address pr review comments
    
    * Update dotnet/src/Microsoft.Agents.AI/Skills/FileAgentSkillsProvider.cs
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * address pr review comments
    
    * address pr review comments
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Fix failing vision integration tests by using local test files (#4128)
    * Initial plan
    
    * Fix failing vision integration tests by using local test files
    
    Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
    
    * Fix net472 build error: replace File.ReadAllBytesAsync with compatible helper using AppContext.BaseDirectory
    
    Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
    
    * Simplify ReadLocalFile: return byte[] directly instead of Task<byte[]>
    
    Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: westey-m <164392973+westey-m@users.noreply.github.com>
  • Replace inline string literals with constants in ChatHistoryMemoryProvider (#4096)
    Extract 11 private const string fields for vector store property names
    (Key, Role, MessageId, AuthorName, ApplicationId, AgentId, UserId,
    SessionId, Content, CreatedAt, ContentEmbedding) and replace all inline
    usages across the collection definition, store dictionary, search result
    access, and filter expressions.
    
    Fixes #3801
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Add Foundry Memory Context Provider (#3522)
    * Add Azure AI Foundry Memory Context Provider with unit tests
    
    * Add FoundryMemory integration tests and sample application
    
    * Fix ClearStoredMemoriesAsync to handle 404 gracefully and rename to EnsureStoredMemoriesDeletedAsync
    
    * Refactor FoundryMemory: simplify architecture and add memory store creation
    
    - Remove IFoundryMemoryOperations interface (was only for test mocking)
    - Remove AIProjectClientMemoryOperations wrapper class
    - Provider now directly uses AIProjectClient with internal extension methods
    - Extension methods return actual response models instead of extracted values
    - Remove WaitForUpdateCompletionAsync from provider (sample uses delay)
    - Simplify EnsureMemoryStoreCreatedAsync to return Task instead of Task<bool>
    - Add memory store creation with chat_model and embedding_model
    - Add UpdateMemoriesResponse with SupersededBy and Error fields
    - Simplify unit tests to focus on constructor validation and serialization
    - Update sample to use simple delay for memory processing wait
    
    * Add waiting operation for memory store updates
    
    * Fix UTF-8 BOM encoding for FoundryMemory csproj files
    
    * Update copilot instructions for UTF-8 BOM and fix sample API rename
    
    * Fix UTF-8 BOM encoding for TestableAIProjectClient.cs
    
    * Add missing response headers for TS
    
    * Changing default embedding
    
    * Using the SDK Models
    
    * Program update
    
    * Remove debugging code from sample
    
    * Adapt FoundryMemoryProvider to new AIContextProvider API and add UTF-8 BOM instruction
    
    - Override ProvideAIContextAsync/StoreAIContextAsync instead of removed virtual InvokingAsync/InvokedAsync
    - Use ProviderSessionState<State> for session-scoped state management (matching Mem0Provider pattern)
    - Replace constructor-based scope with stateInitializer delegate
    - Remove Serialize method (no longer on base class)
    - Add SearchInputMessageFilter, StorageInputMessageFilter, StateKey to options
    - Update sample to use AIContextProviders list instead of AIContextProviderFactory
    - Update unit and integration tests for new API
    - Add UTF-8 BOM encoding and --tl:off instructions to dotnet/AGENTS.md
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Use DefaultAzureCredential in Foundry Memory sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review comments for FoundryMemoryProvider
    
    - Move memoryStoreName from options to required constructor parameter
    - Make FoundryMemoryProviderScope require non-null/whitespace scope in constructor
    - Make Scope property read-only (getter only)
    - Replace ConcurrentQueue with single last update ID to fix memory leak
    - Only clear pending update ID after successful completion
    - Add delete success logging
    - Mark FoundryMemoryProvider with [Experimental] attribute
    - Update unit tests for new API signatures
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Use Throw.IfNullOrWhitespace for scope and memoryStoreName validation
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Workflows API Review Naming Changes (Part 1?) (#4090)
    * refactor: Normalize Run/RunStreaming with AIAgent
    
    * refactor: Clarify Session vs. Run -level concepts
    
    * Rename RunId to SessionId to better match Run/Session terminology in AIAgent
    * [BREAKING]: Will break existing checkpointed sessions in CosmosDb due to field rename
    
    * refactor: Rename and simplify interface around getting typed data out of ExternalRequest/Response
    
    * Also adds hints around using value types in PortableValue
    
    * refactor: Rename AddFanInEdge to AddFanInBarrierEdge
    
    This will prevent a breaking change later when we introduce a programmable FanIn edge, analogous to the FanOut edge's EdgeSelector.
    
    The goal, in the long run is to support a number of different FanIn scenarios, with naive FanIn (no barrier) by default, similar to FanOut.
    
    * refactor: AsAgent(this Workflow, ...) => AsAIAgent(...)
    
    * misc - part1: SwitchBuilder internal
    
    ---------
    
    Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
  • .NET: Small fixes in README (#4099)
    * Small fixes in README
    
    * Disabled problematic test
    
    * Disabled problematic test
  • .NET: Remove FunctionCalls and Tool Messages from Handoff passed messages (#3811)
    * Fix handoff orchestration not passing user message to handoff target agent (#3161)
    
    Filter out internal handoff function call and tool result messages before
    passing conversation history to the target agent's LLM. These messages
    confused the model into ignoring the original user question.
    
    * Add handoff tool call filtering behavior and enhance workflow builder
    
    - Introduced HandoffToolCallFilteringBehavior enum to specify filtering behavior for tool call contents in handoff workflows.
    - Updated HandoffsWorkflowBuilder to support customizable handoff instructions and tool call filtering behavior.
    - Enhanced HandoffAgentExecutor to utilize new filtering options for improved message handling during agent handoffs.
    
    * Enhance handoff message filtering logic and add unit tests for filtering behaviors
    
    * Refactor HandoffMessagesFilter to remove unused handoff function names and enhance filtering logic for non-handoff function calls
    
    * Refactor HandoffMessagesFilter to streamline FilterCandidateState initialization and improve clarity
    
    * Refactor HandoffMessagesFilter to improve filtering logic and add integration tests for handoff workflows
    
    * fix: HandoffAgentExecutor tests
  • .NET: Support a message only AIContextProvider as an AIAgent Decorator (#4009)
    * Support a message only AIContextProvider as an AIAgent Decorator
    
    * Fix formatting
    
    * Address PR comments.
  • .NET: Add tweaks to .net agent skills (#4081)
    * Add tweaks to .net agent skills
    
    * Address PR feedback
  • .NET: Updated package versions for RC release (#4067)
    * Updated package versions for RC release
    
    * Resolved comment
    
    * Resolved comments
  • [BREAKING] .NET: Decouple Checkpointing from Run/StreamAsync APIs (#4037)
    * [BREAKING] refactor: Decouple Checkpointing and Execution APIs
    
    With this change, Checkpointing becomes an property of an IWorkflowExecutionEnvironment. This lets environments that are tightly-coupled to their CheckpointManager avoid needing to present APIs that would not work (e.g. taking in an InMemory CheckpointManager for Durable Tasks, for example)
    
    * refactor: Normalize IsCheckpointingEnabled naming
  • .NET: Add Foundry Agents Tool Sample - OpenAPI Tools (#3702)
    * .NET: Add OpenAPI Tools sample #3674
    
    * Apply format fixes
    
    * Add MEAI and Native SDK creation options for OpenAPI Tools sample
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review: DefaultAzureCredential and CS8321 in NoWarn
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add project to slnx
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>