Commit Graph
610 Commits
Author SHA1 Message Date
ab450078ab Update to M.E.AI 9.10 (#1461)
And other System.*/Microsoft.Extensions.* updated today

Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
2025-10-15 08:33:33 +00:00
ChrisandGitHub 8e8dfb3948 Better (#1463) 2025-10-14 21:17:18 +00:00
ChrisandGitHub a6b6937b94 .NET Workflows - Support agent level function invocation for declarative workflow (#1442)
* Checkpoint

* Checkpoint

* Checkpoint

* Good

* Namespace

* Namespace

* Dun

* Async Test

* AgentId

* Portable pattern

* Portable2

* Portable3

* Respond to comments

* Namespace

* Function call selection

* ToHashSet

* ToHashSet

* Updated

* Parameter name

* Final

* Tests
2025-10-14 20:42:15 +00:00
0331331dbc .NET [WIP]: introduce Hosting extensions for Workflows (#1359)
* skeleton

* wip

* rename + fix tests

* implement workflow tests

* fix comments

* Update dotnet/src/Microsoft.Agents.AI.Hosting/HostApplicationBuilderWorkflowExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fixes

* fix worfklow build logic

* rollback + new overload on workflow builder

* address PR comments

* :)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-14 19:44:58 +00:00
Korolev DmitryandGitHub f42a3ee6b9 .NET: Enable access to hosted AIAgents via OpenAI Chat Completions (#1302)
* non-streaming chat completion

* support streaming

* simplify frontend clients + nit

* nit

* use baseaddress

* rm unnecessary

* refactor

* remove conversation id for chatcompletions agent client

* nits
2025-10-14 18:38:02 +00:00
1f0faff623 .NET: Add sample showing how to create ai function per a2a skill (#1452)
* add sample showing how to create ai function per a2a skill

* Update dotnet/src/Microsoft.Agents.AI.A2A/Extensions/A2AAgentCardExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/samples/GettingStarted/A2A/A2AAgent_AsFunctionTools/Program.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/samples/GettingStarted/A2A/A2AAgent_AsFunctionTools/Program.cs

Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>

* address pr review comments

* rename local function

* add readmes

* fix broken links

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
2025-10-14 17:57:19 +00:00
64b57639b8 .NET: Mitigation for issue 1315 (#1432)
* Adding mitigation for issue 1315, will follow up with long-term plan.

* Apply suggestion from @lokitoth

Co-authored-by: Jacob Alber <jaalber@microsoft.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Extracting common updates to a helper method.

* Fixing spelling mistake.

* Update per PR feedback.

---------

Co-authored-by: Jacob Alber <jaalber@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 18:06:58 +00:00
Korolev DmitryandGitHub 7e8a3fa0e5 .NET: support .NET8 for hosting projects (#1426)
* support net8.0 for hosting projects

* enable CI to run on net8

* correctly setup tfms

* correct fixes (avoid net8)

* nit

* fix hosting.a2a.tests tfm

* update TFM for hosting.unitTests

* remove .net8 CI target

* revert hosting.tests
2025-10-13 13:05:49 +00:00
ChrisandGitHub 5fa153642e .NET Workflows - Update State Serialization for JSON Checkpointing (#1388)
* Checkpoint

* Checkpoint

* Namespace

* All ready

* Namespace

* Clean

* Fix
2025-10-10 20:10:17 +00:00
3730db3e94 .NET: Sanitize agent name (#1368)
* sanitize agent name

* simplify

* Update dotnet/src/Microsoft.Agents.AI/AgentExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Agents.AI/AgentExtensions.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI/AgentExtensions.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/tests/Microsoft.Agents.AI.UnitTests/AgentExtensionsTests.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* change regex to flag underscores as well so their sequence can be replaced with a single one.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-10-10 16:49:56 +00:00
ChrisandGitHub 7e1fd67e76 .NET Workflows - Capture the identifier of the LastMessage (the workflow input) (#1372)
* Fixed

* Test fix
2025-10-10 06:45:09 +00:00
Jacob AlberandGitHub 4cd81fe8e7 .NET: fix: Make State Persistence APIs work better with PortableValue (#1367)
* fix: Make State Persistence APIs work better with PortableValue

* test: Temporarily disable checking for T=object in ReadStateAsync
2025-10-09 20:24:55 +00:00
Christian GlessnerandGitHub 8967269d3e Fix: Add missing ChatMessage[] handler to ChatProtocolExecutor (#1337)
- Added ChatMessage[] handler to ConfigureRoutes to support array dispatch
- Workflow runtime can dispatch messages as either List<ChatMessage> or ChatMessage[]
- Added 10 comprehensive unit tests validating message routing behavior
- Tests ensure functionality and protect against future refactoring (issue #782)
- Updated code comments to reflect exact-type-matching requirement

Fixes issue where raw WorkflowBuilder with AIAgent nodes failed to receive
initial messages due to missing array type handler.
2025-10-09 10:00:09 +00:00
SergeyMenshykhandGitHub 15afc966ce .NET: Add missing workflow properties to the workflow.definition tag (#1261)
* add workflow edge data properties to the workflow.definition tag.

* use workflow info classes for workflow.definition tag value

* add unit test

* fix test

* fix formatting issue

* remove flaky unit test

* remove unused package dependency
2025-10-08 21:51:59 +00:00
ChrisandGitHub 988623e7b8 .NET Workflow - Update declarative code patterns (#1313)
* It hurts

* Fixed

* Namespace

* Namespace
2025-10-08 21:32:47 +00:00
Jacob AlberandGitHub 5902bcb10a .NET: [BREAKING] Propagate CancellationToken into Workflow Executors and message handlers (#1280)
* feat: Propagate CancellationToken to Executors

* Also adds cancellation propagation to `Executor`-accessible APIs
* Adds registrators for cancellable handlers to `RouteBuilder`
* [BREAKING]: Adds `CancellationToken` to `IMessageHandler.HandleAsync`

* test: Re-enable Concurrent Orchestration test

* refactor: Delete unused IInputCoordinator

* refactor: Remove superfluous argument qualifications
2025-10-08 00:28:44 +00:00
ChrisandGitHub eb049c43a6 .NET Workflows - Enhance support and validation for image input (#1274)
* Updated

* Comments

* Namespace

* Comment

* Cleanup

* Update agent definition

* Disable

* Config

* Enable
2025-10-08 00:00:34 +00:00
westeyandGitHub 127bf68748 Reference the correct JsonUtilities class (#1270) 2025-10-07 22:02:19 +00:00
westeyandGitHub 554e1617b3 Rename AsAIAgent to GetAIAgent and update for foundry as well (#1257) 2025-10-07 18:19:18 +00:00
SergeyMenshykhandGitHub 1cff86b4ff enable enum serialization as strings and relaxed json escaping (#1267) 2025-10-07 17:07:13 +00:00
Stephen ToubandGitHub 959e5842c2 Removing duplicating update coalescing logic in AgentRunResponseExtensions (#1169) 2025-10-07 13:42:01 +00:00
d10b44d6bb .NET: Enable access to hosted AIAgents via OpenAI Responses (#947)
* init

* wip

* wip wip wip

* wip wip

* open up API

* enable for multiple agents

* more wip

* make frontend respond.

* wip

* not sure if proper setup

* define type

* cleanup

* frontend streaming wip

* use System.Net.ServerSentEvents

* usings

* reformat via ichatclient

* merge main renaming + refactor

* fix main merge + fix sample (a2a change)

* fix sample

* some rebase (not working yet)

* make it at least build somehow

* make non-stream work without internal types

* Input without custom models

* implement streaming

* test frontend

* enable alerts and fix

* build fixes & rereview

* Update dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI.Responses/Microsoft.Agents.AI.Hosting.OpenAI.Responses.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI.Responses/Utils/ResponseItemJsonConverter.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix agent discovery

* rename

* rename project into Microsoft.Agents.AI.Hosting.OpenAI (no responses in name)

* PR address comments x1

* address PR comments x2

* correctly instantiate OpenAIResponse

* address PR comments x3

* reconfigure JSON serialization & handle AOT warnings

* fix build

* proper ref

* check update differently

* correct check

* exclude dotnet format diagnostics for IL2026 and IL3050

* space  :)

* re-review

* add comments

* remove unnecessary using

* always take last openai response item

* set responseItem Id explicitly

* add agent.name validation for uri

* cleanup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
2025-10-07 12:39:08 +00:00
SergeyMenshykhandGitHub 3fd5768b34 .NET: Improve structured output for chat client agent (#1172)
* improve structured output for chat client agent

* add comment to the result property

* remove code duplication and add tests

* refactor the CreateAIAgent extension methods to return specific types, so consumers can avoid unnecessary downcasting.

* fix type and remove unused using.

* add ChatClientAgentRunResponse and move AgentRunResponse to the abstractions package to reuse later.

* seal ChatClientAgentRunResponse

* update xml comment

* remove funcitons from sample

* rename agent for streaming
2025-10-07 12:04:26 +00:00
westeyandGitHub 3dc14dac79 .NET: Add a CreateAIAgent extension method to IChatClient (#1223)
* Add a CreateAIAgent extension method to IChatClient

* Fix unit tests

* Add tests with null chat clients to ensure appropriate failure

* Switch to similar constructor

* Add ChatClientBuilder BuildAgent extensions

* Address code review comments.
2025-10-07 09:47:33 +00:00
74905af778 .NET: Fix bug where ChatClientAgent throws when providing a ChatMessageStore with a service that requries service storage (#1229)
* Fix bug where ChatClientAgent throws when providing a ChatMessageStore with a service that requries service storage

* Update dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgentTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 08:31:34 +00:00
7ebe00ec3d [BREAKING] .NET: Workflow Off-Thread Execution Mode (#1233)
* Updates to async run loop.

* fix: Workflow Onwership can be release by nonowner

* fix: Incorrect handling of blockOnPending in StreamingRun

Depending on whether we are running in streaming on non-streaming mode, we may be using the StreamingRun in different ways. Unfortunately, the only place we can really know what is the actual state of execution is in the RunEventStream implementations.

This resulted in blocking where blocking was unneeded and occasionally not-blocking when blocking was needed.

The fix is to move the logic of handling this blocking into RunEventStream implementations.

* fix: Fix cleanup on error and end run

This ensures we clean up the background resources correctly.

* fix: Ensure we let the run loop proceed when shutting down

* fix: Add timeout for Input Waiting

* fix: Make the samples properly clean up `Run`s and `StreamingRun`s

* fix: Simplify Declarative Workflow Run disposal pattern

* Also fixes missing .Disposal() in Integration tests

---------

Co-authored-by: Ben Thomas <ben.thomas@microsoft.com>
2025-10-07 01:07:38 +00:00
0113e0466d .NET Workflows - Fix code generation cases (#1242)
* Updated

* Passing

* Ready

* Update dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Workflows/ConversationMessages.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Comment

* Code analysis

* Unit-tests/provider signature

* Comment

* Consistent

* Checkpoint

* Fixed

* Revert

* Test display name

* Enable tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 23:34:46 +00:00
f81b4a5abe .NET Workflows - Fix converation behaviors for declarative worfklows (#1237)
* Updated

* Passing

* Ready

* Update dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Workflows/ConversationMessages.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Comment

* Code analysis

* Unit-tests/provider signature

* Comment

* Consistent

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 22:04:41 +00:00
Michael McKechneyandGitHub f1694b0507 Correcting parameter assignment and using parameter naming vs relying on position (#1239) 2025-10-06 21:46:37 +00:00
CopilotGitHubstephentoubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Stephen ToubSergeyMenshykh
62854197aa .NET: Fix A2A conversion routines to ignore unknown content types instead of throwing exceptions (#1154)
* Initial plan

* Update A2A conversion routines to ignore unknown content types

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>

* Fix dotnet format

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
2025-10-06 10:29:43 +00:00
Victor DibiaandGitHub 5a7ca13af6 feat: Add name and description support to workflows (#1183)
Add optional name and description fields to workflows in both Python and .NET implementations, matching the existing agent API pattern.

Python changes:
- Add name/description parameters to WorkflowBuilder.__init__
- Add name/description attributes to Workflow class
- Include name/description in to_dict() serialization
- Add WORKFLOW_NAME and WORKFLOW_DESCRIPTION OTEL attributes
- Add tests in test_serialization.py and test_workflow_observability.py

.NET changes:
- Add Name and Description properties to Workflow and Workflow<T>
- Add WithName() and WithDescription() fluent methods to WorkflowBuilder
- Add WorkflowName and WorkflowDescription OTEL tags
- Add test in WorkflowBuilderSmokeTests.cs

This enables applications like DevUI to display human-readable workflow names (e.g., 'Data Processing Pipeline') instead of auto-generated UUIDs (e.g., 'Workflow 50fdd917').

Fixes: #1181
2025-10-04 15:20:17 +00:00
50c532b4ae docs: Update References to Agent2Agent protocol to use correct terminology (#1162)
Should be `Agent2Agent Protocol` not `Agent-to-Agent` unless talking about general agent to agent communication

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2025-10-03 19:10:05 +00:00
Jacob AlberandGitHub 32e7ff00b5 .NET: Add support for Subworkflows and many threading fixes (#1066)
* feat: Add support for Workflow-as-Executor

* Fixes routing of 'object' compile-typed variables to properly take in type information
* Fixes a concurrency issue in StepTracer

* fix: Make Subworkflow ExternalRequests work properly

* fix: Threading and Concurrency fixes; prep for OffThread Mode

* refactor: Remove dead code around OffStreamRunEventStream

Currently not used, and will be replaced with a rewrite when brought back, so having it in the change is not valuable.

* ci: Work around issues with dotnet-format not properly analyzing the source

* fix: Fix the logic of AsyncCoordinator and AsyncBarrier

* Prevent individual wait cancellations from canceling the entire barrier
* Propagate information about whether the wait was completed or cancelled, and whether any waiters were present when released

* fix: Remove superfluous acces to .Keys in InProcStepTracer

* refactor: Clean up AsyncCoordinator's use of AsyncBarrier
2025-10-03 17:26:30 +00:00
880a99ca05 .NET Workflows - Enable "human in the loop" case for declarative integration tests (#1171)
* Enabled

* Rollback visitor

* Update dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-03 17:24:22 +00:00
westeyandGitHub 3ee7461b59 Fix createdAt merging for agent run updates (#1161) 2025-10-03 16:04:06 +00:00
Jacob AlberandGitHub cfcb90bfe0 fix: Make CheckpointInfo constructor public (#1156)
In order to be able to restore checkpoints (and even implement ICheckpointStore)
2025-10-03 15:42:04 +00:00
cf831b0348 Update A2A library to 0.3.1-preview (#1141)
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
2025-10-03 09:31:31 +00:00
Stephen ToubandGitHub 4daeeb0f07 Add some DebuggerDisplays / DebuggerTypeProxys to abstraction types (#1144) 2025-10-03 08:51:49 +00:00
390cc541ea .NET Workflows - Clean-up declarative docs and product-context. (#1134)
* Clean-up

* Rollback sample

---------

Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
2025-10-02 20:06:40 +00:00
ChrisandGitHub 08ea625de0 .NET: NET Workflows - Skip conversation initialization when identifier is provided (#1087)
* Fix

* Code-gen case

* Tests

* Autosend logic

* Build fix

* Namespace

* Validation enhancement
2025-10-02 14:27:46 +00:00
westeyandGitHub cb62407fb8 .NET: Improve some core types xml docs (#1115)
* Improve some core types xml docs

* Consistent period usage
2025-10-02 14:18:22 +00:00
56beb52124 .NET: Fix lists in XML comments so they render properly in the documentation. (#1113)
* fix lists in XML comments so they render properly in documentation.

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/Extensions/A2ACardResolverExtensions.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Update dotnet/src/Microsoft.Agents.AI.A2A/A2AHostAgent.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-10-02 13:58:11 +00:00
b1282254df .NET: Move the AsAIAgent extension methods to the correct class (#1106)
* Move the AsAIAgent extension methods to the correct class

* Fix format issue

* Disable unit test, see issue #1109

---------

Co-authored-by: Mark Wallace <markwallace@microsoft.com>
2025-10-02 12:41:22 +00:00
Stephen ToubandGitHub 3ae9065b6b Tweak AgentAbstractionsJsonUtilities to better match AIJsonUtilities (#1094)
Functional change includes setting the encoder used by the options and employing JsonStringEnumConverter.
2025-10-02 05:19:27 +00:00
6d0f28eb9b .NET Workflows - Re-enable Declarative Integration Tests (#1080)
* Investigate

* Next

* Update initialization

* Should be ok

* Agent definition dx

* Link agent definitions

* Link agent definitions

* Path resolution #2

* Fix path resolution

* Another pass

* Another

* Better

* One more

* Whoopsie

* Update dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/AgentFactory.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Namespace

* Cleanup

* Temp config for pipeline

* Another temp workaround

* Test config: Bing Grounding Tool

* Update template

* Next pass

* Ok now

* Cleanup

* Test note

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-01 22:21:45 +00:00
a414461570 .NET: Re-enable ImplicitUsings in samples and clean up NoWarns (#1060)
* Re-enable ImplicitUsings in samples and clean up NoWarns

* Fix dotnet format

* More dotnet format

* More dotnet format

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
2025-10-01 19:37:03 +00:00
Stephen ToubandGitHub 0fef277c70 Remove System.Linq.Async dependency from src assemblies (#1069)
We shouldn't be shipping any more dependencies on this package, as it's becoming legacy, replaced by System.Linq.AsyncEnumerable.

We'll eventually want to replace it with System.Linq.AsyncEnumerable in all tests/samples, too, but that's hard to do until SK updates to use S.L.AsyncEnumerable once its 10.0.0 version is released. I did remove the package reference from tests/samples where it's not needed.
2025-10-01 17:17:21 +00:00
Dmytro StrukandGitHub 193503cab9 Added nuget-props to hosting packages (#1068) 2025-10-01 16:20:41 +00:00
ChrisandGitHub f5ca4f42c0 .NET Workflows -Fix Declarative Workflow Tests (#1065)
* Fixed

* Restore generated workflow

* Project

* Fine tune

* Update baseline

* Adjust test-case
2025-10-01 16:15:46 +00:00
Roger BarretoandGitHub f9a3918916 Address bug when agent rawrepresentation is a MEAI type and returns it with null RawRep (#1054) 2025-10-01 10:37:12 +00:00