Commit Graph

334 Commits

  • .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.
  • .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: 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>
  • .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: 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: Support a message only AIContextProvider as an AIAgent Decorator (#4009)
    * Support a message only AIContextProvider as an AIAgent Decorator
    
    * Fix formatting
    
    * Address PR 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>
  • .NET: [BREAKING] Implement Polymorphic Routing (#3792)
    * feat: Implement Polymorphic Routing
    
    * feat: Add support for Send/Yield annotations with basic Executor
    
    * Adds annotations to Declarative workflow executors
    
    * fix: Address PR Comments
    
    * Implicit filter in collection loops
    * Remove debug / usused / superfluous code
    * Fix ProtocolBuilder implicit output registrations
    * Fix logic error in ExecuteRouteGeneratorTests.ClassWithManualConfigureProtocol_DoesNotGenerate
    
    * fix: Solidify type checks and send/yield type registrations
    
    * fix: Suppress generation of TurnTokens out of AggregateTurnMessagesExecutor
    
    * Fixes an issue where ConcurrentEndExecutor is not expecting TurnTokens.
    
    * fix: Add ProtocolBuilder support for chained-delegation
    
    * Updates Declarative pacakge to rely on chained-delegation Send/Yield registration
    * Renames DeclarativeActionExectuor's new ExecuteAsync to ExecuteActionAsync to avoid colliding with Executor.ExecutoeAsync
    
    * fix: Address PR Comments
    
    * Fixes type mapping in FanInEdgeRunner
    * Fixes and expalins send/yield type registration in FunctionExecutor
    
    * fixup: build-break
    
    * fix: Add missing SendsMesage declaration to InvokeAzureAgentExecutor
  • .NET: Add File Search Sample for Foundry Agents. (#3990)
    * .NET: Add File Search sample #3674
    
    * Add FileSearch sample to solution and parent README
    
    - Add FoundryAgents_Step18_FileSearch to agent-framework-dotnet.slnx
    - Add FileSearch entry to FoundryAgents samples table in README.md
    - Fix README inaccuracy: sample creates one agent, not two
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Refactor FileSearch sample: local functions + DefaultAzureCredential
    
    - Refactor agent creation into switchable local functions
    - Use DefaultAzureCredential with WARNING comment (matching other samples)
    - Update README to reference DefaultAzureCredential
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Fix orphaned temp file in FileSearch sample
    
    Use Path.Combine + Path.GetRandomFileName instead of Path.GetTempFileName
    to avoid leaving an orphaned temp file on disk.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Fix FoundryAgents_Step15_ComputerUse sample for Azure Agents API (#3989)
    * Fix FoundryAgents_Step15_ComputerUse sample for Azure Agents API
    
    The Azure Agents API rejects previous_response_id alongside computer_call_output
    items, unlike the vanilla OpenAI Responses API. This fix:
    
    - Send all prior response output items (reasoning, computer_call, etc.) as input
      items in follow-up calls so the API has full conversation context
    - Create a fresh session per call to avoid ConversationId/previous_response_id
    - Use currentCallId instead of initialCallId for computer_call_output
    - Clear ContinuationToken after polling to prevent stale tokens
    - Remove unused initialCallId tracking variable
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address comments
    
    ---------
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Support InvokeFunctionTool for declarative workflows (#4014)
    * Initial Implementation of InvokeFunctionTool
    
    * Added unit test for InvokeFunctionTool executor.
    
    * Implemented unit and integration tests for InvokeFunctionTool.
    
    * Add sample for InvokeFunctionTool in declarative workflows.
    
    * Remove unused sample and updated comments.
    
    * Updating to official OM release with InvokeFunctionTool
    
    * Fix formatting issues.
    
    * Updated PowerFx version
    
    * Update test fixture
    
    * Cleanup - Removed unused method in InvokeFunctionToolExecutor
    
    * Update test based on PR feedback.
    
    * Update based on PR comments
  • Fix MCP samples: update MCP SDK to 0.8.0-preview.1 and fix README references (#3959)
    - Update ModelContextProtocol NuGet package from 0.4.0-preview.3 to 0.8.0-preview.1
    - Update System.Net.ServerSentEvents from 10.0.1 to 10.0.3
    - Fix OAuth config to use DynamicClientRegistration in Agent_MCP_Server_Auth
    - Fix incorrect sample name references in README files
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Add Foundry Evaluation samples (Safety + Quality) (#3697)
    * Initial plan
    
    * Add Foundry evaluation samples for Red Teaming and Self-Reflection
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Refactor evaluation samples with real implementations in local functions
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Uncomment function signatures and bodies, keep only invocations commented
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Update Foundry evaluation samples with observability support
    
    * Restructure evaluation samples to follow FoundryAgents naming convention
    
    - Rename Evaluation/Evaluation_StepXX to FoundryAgents_Evaluations_StepXX
    - Add evaluation projects to slnx
    - Fix var usage, apply dotnet format, use DefaultAzureCredential
    - Add try/finally for agent cleanup
    - Fix evaluator deployment name separation in Step02
    - Update README references
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Rewrite Step01 to use Azure.AI.Projects RedTeam API and address review comments
    
    - Replace safety evaluator sample with actual Red Teaming using AIProjectClient.RedTeams
    - Use AttackStrategy (Easy, Moderate, Jailbreak) and RiskCategory from Azure.AI.Projects
    - Remove Microsoft.Extensions.AI.Evaluation.Safety dependency from Step01
    - Add DefaultAzureCredential warning comments to Step02
    - Remove unused bestResponse variable in Step02
    - Add session isolation comments in self-reflection loop
    - Fix stale directory references in READMEs
    - Fix misleading evaluation overview link in main README
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add note about agent-targeted red teaming limitations in README
    
    The .NET RedTeam API currently only supports model deployment targets
    via AzureOpenAIModelConfiguration. Agent-targeted red teaming with
    AzureAIAgentTarget is documented in concept docs but not yet available
    in the SDK's RedTeam constructor. Results appear in classic portal view.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Add classic Foundry disclaimer to red teaming sample README
    
    Clarify that this sample uses the classic Azure AI Foundry red teaming
    API (/redTeams/runs). The new Foundry portal uses a separate evaluation-
    based API not yet available in the .NET SDK. AzureAIAgentTarget exists
    in the SDK but is consumed by the Evaluation Taxonomy API, not RedTeam.
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    * Address PR review comments on Step02 SelfReflection
    
    - Pass full prompt (with context) to evaluator messages instead of just
      the question, so evaluator input matches what the agent received
    - Include previous response text in self-reflection refinement prompt
      so the LLM can meaningfully improve its answer across iterations
    - Inline CreateKnowledgeAgent helper (single use, single statement)
    - Add comment clarifying why RunCombinedQualityAndSafetyEvaluation
      intentionally passes only the question (no context)
    
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • .NET: Surface downstream experimental flags and remove unnecessary suppressions (#3968)
    * Surface downstream experimental flags and remove unecessary suppressions
    
    * Fix format error
    
    * Fix file encoding.
    
    * Address PR comments.
  • .NET: [BREAKING] Refactor providers to move common functionality to base (#3900)
    * Move common functionality to provider base classes
    
    Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR comments.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [Breaking] Structured Output improvements (#3761)
    * .NET: Delete AgentResponse.{Try}Deserialize<T> methods (#3518)
    
    * delete deserialize method of agent response
    
    * order usings
    
    * Update dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step05_StructuredOutput/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/Workflows/_Foundational/08_WriterCriticWorkflow/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/AGUI/Step05_StateManagement/Server/SharedStateAgent.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/AGUIClientServer/AGUIDojoServer/SharedState/SharedStateAgent.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/samples/M365Agent/Agents/WeatherForecastAgent.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * .NET:[Breaking] Add support for structured output (#3658)
    
    * add support for so
    
    * restore lost xml comment part
    
    * fix using ordering
    
    * Update dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgentStructuredOutput.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Agents.AI.Abstractions/AIAgentStructuredOutput.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgent_SO_WithFormatResponseTests.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * addressw pr review comments
    
    * address pr review feedback
    
    * address pr review comments
    
    * fix compilation issues after the latest merge with main
    
    * remove unnecessry options
    
    * remove RunAsync<object> methods
    
    * address code review feedback
    
    * address pr review feedback
    
    * make copy constructor protected
    
    * address pr review feedback
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * .NET: Add decorator for structured output support (#3694)
    
    * add decorator that adds structured output support to agents that don't natively support it.
    
    * Update dotnet/src/Microsoft.Agents.AI/StructuredOutput/StructuredOutputAgentResponse.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * Update dotnet/samples/GettingStarted/Agents/Agent_Step05_StructuredOutput/Program.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * address pr review feedback
    
    ---------
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * .NET: Support primitives and arrays for SO (#3696)
    
    * wrap primitives and arrays
    
    * fix file encoding
    
    * address review comments
    
    * add adr
    
    * add missed change
    
    * fix compilation issue
    
    * address review comments
    
    * rename adr file name
    
    * reflect decision to have SO decorator as a reference implementation in samples
    
    * .NET: Move SO agent to samples (#3820)
    
    * move SO agent to samples
    
    * change file encoding
    
    * fix files encoding
    
    * .NET: Preserve caller context (#3803)
    
    * fix stuck orchestration
    
    * add previously removed RunAsync<T> method to DurableAIAgent
    
    * suppress IDE0005 warning
    
    * update changelog and remove unused constructor of AgentResponse<T>
    
    * updatge the changelog
    
    * address PR review feedback
    
    * .NET: Disable irrelevant integration test (#3913)
    
    * disable irrelevant integration test
    
    * Update dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentStructuredOutputRunTests.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * forgotten change
    
    * address pr review feedback
    
    * disable intermittently failing integration test.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
  • .NET: [BREAKING] Add session StateBag for state storage and support multiple providers on the Agent (#3806)
    * .NET: [BREAKING] Add session statebag to use for state storage instead of inside providers (#3737)
    
    * Add a StateBag to AgentSession and pass Agent and AgentSession to AIContextProvider and ChatHistoryProviders
    
    * Convert all AIContextProviders to use the statebag
    
    * Update InMemoryChatHistoryProvider to use StateBag
    
    * Update Comsos and Workflow ChatHistoryProviders
    
    * Update 3rd party chat history storage sample.
    
    * Remove serialize method from providers
    
    * Replacing provider factories with properties
    
    * Remove Providers from Session and flatten state bag serialization
    
    * Update samples to use getservice on agent
    
    * Updated additional session types to serialize statebag
    
    * Fix regression
    
    * Address PR comments
    
    * Address PR comments.
    
    * Fix formatting
    
    * Fix unit tests
    
    * Remove InMemoryAgentSession since it is not required anymore.
    
    * Address PR comments
    
    * Convert sessions for A2AAgent, ChatClientAgent, CopilotStudioAgent and GithubCopilotAgent to use regular json serialization.
    
    * Fix durable agent session jso usgae
    
    * Add jso to InMemory and Workflow ChatHistoryProviders
    
    * Update InMemoryChatHistoryProvider to use an options class for it's many optional settings.
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR feedback
    
    * Fix verification bug.
    
    * Improve state bag thread safety
    
    * Address PR comments and fix unit tests
    
    * Address PR comments
    
    * Fix unit test
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Add a public StateKey property to providers (#3810)
    
    * .NET: [BREAKING] Update providers in such a way that they can participate in a pipeline (#3846)
    
    * Make providers pipeline capable
    
    * Fix unit tests
    
    * Move source stamping to providers from base class
    
    * Also update samples.
    
    * Address PR comments
    
    * Rename AsAgentRequestMessageSourcedMessage to WithAgentRequestMessageSource
    
    * .NET: [BREAKING] Add consistent message filtering to all providers. (#3851)
    
    * Add consistent message filtering to all providers.
    
    * Remove old chat history filtering classes
    
    * Fix merge issues
    
    * Fix unit test
    
    * Enforce non-nullable property
    
    * Fix merging bug and make troubleshooting source info easier by adding tostring implementation
    
    * .NET: [BREAKING] Add support for multiple AIContextProviders on a ChatClientAgent (#3863)
    
    * Add support for multiple AIContextProviders on a ChatClientAgent
    
    * Address PR comments and fix tests
    
    * Address PR comments.
    
    * .NET: [BREAKING]Delay AIContext Materialization until the end of the pipeline is reached. (#3883)
    
    * Delay AIContext Materialization until the end of the pipeline is reached.
    
    * Address PR comments.
    
    * Address PR comments
    
    * Modify InvokedContext to be immutable (#3888)
    
    * .NET: Address Feedback on StateBag feature branch PR (#3910)
    
    * Address Feedback on statebag feature branch PR
    
    * Update dotnet/src/Microsoft.Agents.AI.DurableTask/CHANGELOG.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR comments
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET Workflows - Rename agent-provider and add comments (Declarative Workflows) (#3895)
    * Renamed with comments
    
    * Fix rename arcs
    
    * Integration tests
  • .NET: [BREAKING] Change SerializeSession to be Async (#3879)
    * Change SerializeSession to be Async
    
    * Update Changelog
  • .NET: Add Foundry Agents Tool Sample - Local MCP (#3703)
    * .NET: Add Local MCP sample #3674
    
    * Apply format fixes
    
    * .NET: Use local MCP client instead of hosted MCP in Step27 sample
    
    * Address PR review feedback: cleanup, try/finally, update parent README
  • .NET: Workflow telemetry opt in (#3467)
    * feat(workflows): Make telemetry opt-in via WithOpenTelemetry()
    
    - Add WorkflowTelemetryOptions class with EnableSensitiveData property
    - Add WorkflowTelemetryContext to manage ActivitySource lifecycle
    - Add WithOpenTelemetry() extension method on WorkflowBuilder
    - Update all workflow components to use telemetry context:
      - WorkflowBuilder, Workflow, Executor
      - InProcessRunnerContext, InProcessRunner
      - LockstepRunEventStream, StreamingRunEventStream
      - All edge runners (Direct, FanIn, FanOut, Response)
    - Telemetry is now disabled by default
    - Users must call WithOpenTelemetry() to enable spans/activities
    
    BREAKING CHANGE: Workflow telemetry is now opt-in. Users who relied on
    automatic telemetry must add .WithOpenTelemetry() to their workflow builder.
    
    * refactor: Pass telemetry context as parameter instead of via interface
    
    - Remove IWorkflowContextWithTelemetry interface
    - Add internal ExecuteAsync overload that accepts WorkflowTelemetryContext
    - Public ExecuteAsync delegates with WorkflowTelemetryContext.Disabled
    - InProcessRunner passes TelemetryContext when calling ExecuteAsync
    - BoundContext now implements IWorkflowContext (not the removed interface)
    
    * Add optional ActivitySource parameter to WithOpenTelemetry
    
    Allow users to provide their own ActivitySource when enabling telemetry,
    giving them better control over the ActivitySource lifecycle. When not
    provided, the framework creates one internally (existing behavior).
    
    Changes:
    - Add optional activitySource parameter to WithOpenTelemetry() extension
    - Update WorkflowTelemetryContext to accept external ActivitySource
    - Add unit test for user-provided ActivitySource scenario
    
    * Add component-level telemetry control with disable flags
    
    Allow users to selectively disable specific activity types via
    WorkflowTelemetryOptions. All activities are enabled by default.
    
    New disable flags:
    - DisableWorkflowBuild: Disables workflow.build activities
    - DisableWorkflowRun: Disables workflow_invoke activities
    - DisableExecutorProcess: Disables executor.process activities
    - DisableEdgeGroupProcess: Disables edge_group.process activities
    - DisableMessageSend: Disables message.send activities
    
    Added helper methods to WorkflowTelemetryContext for each activity type
    and updated all activity creation sites to use them.
    
    * Implement EnableSensitiveData to log executor input/output
    
    When EnableSensitiveData is true in WorkflowTelemetryOptions, executor
    input and output are logged as JSON-serialized attributes in the
    executor.process activity.
    
    New activity tags:
    - executor.input: JSON serialized input message
    - executor.output: JSON serialized output result (non-void only)
    
    Added suppression attributes for AOT/trimming warnings since this is
    an opt-in feature for debugging/diagnostics.
    
    * Refactor activity start methods to centralize tagging logic
    
    Move tagging logic into WorkflowTelemetryContext methods:
    - StartExecutorProcessActivity now accepts executorId, executorType,
      messageType, and message; sets all tags including executor.input
      when EnableSensitiveData is true
    - Added SetExecutorOutput method to set executor.output after execution
    - StartMessageSendActivity now accepts sourceId, targetId, and message;
      sets all tags including message.content when EnableSensitiveData is true
    
    Simplified Executor.cs and InProcessRunnerContext.cs by removing
    inline tagging code. Added message.content tag constant.
    
    * Revert Python changes
    
    * Update samples and code cleanup
    
    * Fix file formatting
    
    * Add comment
    
    * Add telemetry configuration to declarative workflow
    
    * Remove delays in tests
    
    * Address comments
  • .NET: [BREAKING] Add ability to mark the source of Agent request messages and use that for filtering (#3540)
    * Add ability to mark the source of Agent request messages and use that for filtering
    
    * Add support for source, in addition to source type, and add unit tests for automatic stamping
    
    * Address PR comments.
    
    * Add merge fixes
    
    * Address PR comments
  • .NET: Introduce Core implementation methods for session methods on AIAgent (#3699)
    * Introduce Core implementation methods for session methods on AIAgent
    
    * Update changelog
  • .NET: [BREAKING] Provide agent and session to AIContextProvider & ChatHistoryProvider (#3695)
    * Add a StateBag to AgentSession and pass Agent and AgentSession to AIContextProvider and ChatHistoryProviders
    
    * Remove statebag code from this branch, to get the refactoring out of the way first
    
    * Apply suggestion from @rogerbarreto
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Apply suggestion from @westey-m
    
    * Apply suggestion from @westey-m
    
    ---------
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: [BREAKING] Remove UserInputRequests property (#3682)
    * Remove UserInputRequests property
    
    * Fix formatting issue.
  • [BREAKING] Obsoleting ReflectingExecutor in favor of source gen (#3380)
    * Initial working version with tests.
    
    * Updates to validate class data once instead of for each handler method. Also updated Diagnostics Ids to format of MAFGENWF{NUM}
    
    * Formatting and trying to fix generation project pack.
    
    * Another atempt at getting the genrators project to build.
    
    * More attempts to fix generator build and pack.
    
    * Fixing file encodings.
    
    * Initail round of cleanup.
    
    * Trying to fix packing.
    
    * Still trying to fix pipeline pack.
    
    * Remove obsolescence markers, sample updates, and docs from generator branch.
    
    This commit separates the generator core functionality from the
    deprecation of ReflectingExecutor. The removed changes will be
    re-added in a dependent branch (wf-obsolete-reflector).
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Mark ReflectingExecutor and IMessageHandler as obsolete.
    
    This commit deprecates the reflection-based handler discovery approach
    in favor of the new [MessageHandler] attribute with source generation.
    
    Changes:
    - Add [Obsolete] to ReflectingExecutor<T>, IMessageHandler<T>, IMessageHandler<T,R>
    - Add #pragma to suppress warnings in internal reflection code
    - Update Concurrent sample to use new [MessageHandler] pattern
    - Add Directory.Build.props for samples to include generator
    - Add documentation files explaining the migration
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Obsoleteing Reflector-based workflow code generation in favor of Source Generators and updating some samples to use new pattern.
    
    This commit deprecates the reflection-based handler discovery approach
    in favor of the new [MessageHandler] attribute with source generation.
    
    Changes:
    - Add [Obsolete] to ReflectingExecutor<T>, IMessageHandler<T>, IMessageHandler<T,R>
    - Add #pragma to suppress warnings in internal reflection code
    - Update Concurrent sample to use new [MessageHandler] pattern
    - Add Directory.Build.props for samples to include generator
    - Add documentation files explaining the migration
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
    
    * Cleaning up temporary design and progress files.
    
    ---------
    
    Co-authored-by: alliscode <bentho@microsoft.com>
    Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: [BREAKING] Rename session state json param (#3681)
    * Rename session state json param to ensure consistency
    
    * Fix merge failures and PR comments.
  • .NET: Add .NET Anthropic Claude Skills sample (#3497)
    * Initial plan
    
    * Add Claude Skills sample and integration tests for Anthropic
    
    - Add Agent_Anthropic_Step04_UsingSkills sample demonstrating pptx skill usage
    - Add integration tests for skills functionality
    - Update README.md with new sample reference
    - Update solution file to include new sample project
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Simplify Anthropic Skills sample with AsAITool and add file download
    
    * Remove excessive comments from integration tests
    
    * Update README with correct model name and syntax
    
    * Fix Anthropic SDK 12.3.0 API changes: APIKey->ApiKey, SkillListPageResponse->SkillListPage, Data->Items
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: [BREAKING] Move AgentSession.Serialize to AIAgent (#3650)
    * Move AgentSession.Serialize to AIAgent
    
    * Address PR comments.
    
    * Improve code and fix unit test
    
    * Update test agents to return a default json element instead of throwing where the the result of the serialization is never used.
    
    * Update further tests to actually serialize the session
  • .NET: [BREAKING] Rename GetNewSession to CreateSession (#3501)
    * Rename GetNewSession to CreateSession
    
    * Address copilot feedback
    
    * Suppress warning
    
    * Suppress warning
    
    * Fix further warnings.
  • .Net: Update Anthropic and Anthropic.Foundry package versions (#3517)
    * Initial plan
    
    * Update Anthropic packages to v12.3.0 and Anthropic.Foundry to v0.4.1
    
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Fix AnthropicClient not being disposed in sample
    
    ---------
    
    Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
    Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Consolidate durable agent samples into Durable/Agents folder (#3471)
    * Durable samples reorganization.
    
    * Add local.settings.json
    
    * Fix broken link in samples root markdown file.
    
    * Add a link for console app samples.
    
    * Fixed samples path in integration test.
    
    * Fix consols app test path.
  • .NET - [Breaking]: Update Declarative Object Model + Dependencies (#3017)
    * Builds locally and tests pass
    
    * Fix typo
    
    * Reverted nuget config change to remove internal feed and map to new public object model package with renames.
    
    * Renaming Bot object model in additional sample.
    
    ---------
    
    Co-authored-by: Peter Ibekwe <peibekwe@microsoft.com>
  • .NET: Python: [BREAKING] Renamed Github to GitHub (#3486)
    * Renamed Github to GitHub
    
    * Small fix
    
    * Updated package versions