Commit Graph
219 Commits
Author SHA1 Message Date
Jacob AlberandGitHub 0ef4e739d5 refactor: [BREAKING] Remove generic Workflow<T> (#1551)
Remove input type checking in favour of explicit `.DescribeProtocolAsync()` flow. Also removes `.AsAgentAsync()` as the validation happens at workflow run time. This makes it easier to use Workflows with DI without resorting to async-over-sync.
2025-10-21 00:13:41 +00:00
Jose Luis Latorre MillasandGitHub 85921eda68 .NET: Sample 06_subWorkflows to showcase the sub workflows (workflow composability) (#1493)
* Sample 06_subWorkflows ready.

* minor fix
2025-10-16 18:11:43 +00:00
Jacob AlberandGitHub 331c750515 .NET: [BREAKING] Enable sharing of workflow instances across concurrently executing runs (#1464)
* refactor: remove unused internals

* feat: Execution Mode for sharing a workflow among concurrent runs

* feat: Update WorkflowHostAgent to support concurrent execution

* Also update AsAgent APIs to support injecting a CheckpointManager and an IWorkflowExecutionEnvironment

* fix: Make Read logic consistent in DeclarativeWorkflowContext
2025-10-15 21:34:17 +00:00
5333cce63c .NET: Remove Semantic Kernel Migration instructions (moved already to SK Repository) (#1485)
* Moved SK->AF migrations

* Update dotnet/samples/SemanticKernelMigration/README.md

Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>

* Removing extra jump for migration

---------

Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
2025-10-15 16:13:11 +00:00
Mark WallaceandGitHub d7094d5432 .NET: ChatClientBuilderExtensions should be in the M.E.AI namespace (#1484)
* ChatClientBuilderExtensions should be in the M.E.AI namespace

* ChatClientBuilderExtensions should be in the M.E.AI namespace
2025-10-15 14:58:41 +00:00
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 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
a4039134de .NET: Remove reflection samples (#1460)
* Removing usage of ReflectingExecutor<T> from workflow samples.

* Removing uneeded changes.

* Clean up.

* Update dotnet/samples/GettingStarted/Workflows/_Foundational/01_ExecutorsAndEdges/Program.cs

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

* Update dotnet/samples/GettingStarted/Workflows/_Foundational/01_ExecutorsAndEdges/Program.cs

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

* Update dotnet/samples/GettingStarted/Workflows/_Foundational/02_Streaming/Program.cs

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

* Update dotnet/samples/GettingStarted/Workflows/_Foundational/02_Streaming/Program.cs

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

* Updates per PR feedback.

* Undo changes to generated file.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-14 20:34:04 +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
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
westeyandGitHub d6fdb91480 .NET: Inline const values in samples where used only once (#1387)
* Inline const values in samples where used only once

* Fix some spacing issues and use consistent ordering of settings/params
2025-10-10 16:50:53 +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
wuwengandGitHub 362652b966 .NET: Add Azure Monitor OpenTelemetry Exporter samples (#1231)
* Add Azure Monitor OpenTelemetry Exporter to enhance observability in agent samples

* add another sample code for application isnights
2025-10-07 23:16:32 +00:00
ChrisandGitHub 1a81ed202e Updated (#1272) 2025-10-07 19:09:41 +00:00
Tao ChenandGitHub df5477921b .NET: Add Orchestration SK->AF migration samples (#1044)
* Add Orchestration SK->AF migration samples

* fix samples

* clean up

* Add handoff

* Comments

* Address comments

* Fix build error

* Comments
2025-10-07 18:54:41 +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
7506046f43 .NET: Add sample to show ChatReducer usage (#1221)
* Add sample to show ChatReducer usage

* Apply suggestion from @Copilot

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-07 08:17:31 +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
Andrew NikolinandGitHub 4c5c6d0f98 Align skill naming (#1207)
Fixing what looks like a simple copy-paste naming issue
2025-10-06 07:43:04 +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
westeyandGitHub 6a4e759965 Add sample showing how to use any foundry model (#1159) 2025-10-03 15:34:16 +00:00
SergeyMenshykhandGitHub ca9f6fe21d update a2a sample to work with latest a2a library (#1149) 2025-10-03 12:04:43 +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
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
074529e5a0 .NET: dotnet sample for OTEL -> Application Insights + Grafana (#1083)
* Add Azure Monitor OpenTelemetry Exporter to AgentOpenTelemetry sample

* Update README to include Application Insights setup and Grafana dashboard links

* Update dotnet/samples/GettingStarted/AgentOpenTelemetry/README.md

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-02 15:21:11 +00:00
79def868b6 .NET: Add Prompt to support and improve AI Agent SK->AF Migration Results (#1081)
* Prompt progress

* Enriched prompt + Added to SLN visibility

* Set starting point for Copilot Migration

* Address prompt detail + prepare copilot migration to work with Agent nugets

* Address more prompt details

* Prompt update

* Improve description for migration

* Improve description for migration

* Improve description for migration

* Improve description for migration

* SLnx Upgrade Assistant use-case

* Extra tweaks to the migration prompt

* Update prompt

* Adding the migration guida as a visible reference to the project

* Improvements

* IMprovement

* Small improvements

* AI Guidance Overhaul.

* Update migration guide with better straightforward examples

* Update breaking glass instructions

* Namespace change + address feedback

* ChatComletionService considerations

* Add middleware guidance + public packages

* Removing + ignoring future generated files

* Potential gh bug?

* Prompt progress

* Enriched prompt + Added to SLN visibility

* Set starting point for Copilot Migration

* Address prompt detail + prepare copilot migration to work with Agent nugets

* Address more prompt details

* Prompt update

* Improve description for migration

* Improve description for migration

* Improve description for migration

* Improve description for migration

* SLnx Upgrade Assistant use-case

* Extra tweaks to the migration prompt

* Update prompt

* Adding the migration guida as a visible reference to the project

* Improvements

* IMprovement

* Small improvements

* AI Guidance Overhaul.

* Update migration guide with better straightforward examples

* Update breaking glass instructions

* Namespace change + address feedback

* ChatComletionService considerations

* Add middleware guidance + public packages

* Removing + ignoring future generated files

* Potential gh bug?

* Version bump

* Address observation

* Address observation

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
2025-10-02 15:00:19 +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
westeyandGitHub 364188c44f .NET: Add link inspector (#1062)
* Add link inspector

* Comment out excludedirs while it's empty

* Fix broken links

* More links fixes

* Push further fixes

* Fix more links
2025-10-01 16:43:17 +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
Christian GlessnerandGitHub 74e2e2e21d .NET: OpenAI Reasoning Agent sample (#1047)
* OpenAI reasoning agent sample

* Refactor OpenAI agent sample: streamline warning handling and improve output formatting
2025-10-01 13:32:11 +00:00
SergeyMenshykhandGitHub 5f1417ab94 .NET: Align environment variable names (#1053)
* alignt environment variable names

* rename modelId variable names
2025-10-01 10:49:45 +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
SergeyMenshykhandGitHub 2680edff65 fix failing CheckpointWithHumanInTheLoop sample (#1034) 2025-10-01 08:40:07 +00:00
2b4ff5f076 .NET: Sample for the MCP and Foundry Agents documentation (#972)
* Foundry Agent MCP

* Foundry Agent MCP

* Use Foundry SDK directly

* Use raw representation factory

* Fix typo

---------

Co-authored-by: Mark Wallace <markwallace@microsoft.com>
2025-10-01 07:37:12 +00:00
Glenn CondronandGitHub 43fe7c6dbe Use IApplicationLifetime instead of a custom token (#1031) 2025-10-01 07:21:33 +00:00
Stephen ToubandGitHub 498fc06fd6 Hide/remove some JSON utility classes (#1039) 2025-10-01 05:38:46 +00:00
Stephen ToubandGitHub 9360780ce5 Remove defunct AgentExtensions.WithOpenTelemetry (#1033) 2025-10-01 00:24:13 +00:00
Tao ChenandGitHub 042099009f .NET: Workflow observability (#959)
* Add basic Workflow telemetry

* Add sample

* Add source propagation for executor spans

* Fix tests and address comments

* Fix formatting

* Fix declarative unit tests

* Address comments

* Remove Microsoft.Extensions.AI.Agents.EnableTelemetry

* Formatting

* Formatting

* Formatting

* fix solution

* Address comments

* Add workflow json definition for serialization

* Formmating

* Address comments
2025-09-30 23:40:04 +00:00
Stephen ToubandGitHub 2539282d30 .NET: Fix some more static analysis diagnostics (#1025)
* S1006

* S2219

* S3236

* S3260

* S1125

* IDE0063

* IDE0062

* IDE0028
2025-09-30 22:50:22 +00:00
77404d165c .NET Workflows - Code Generation for Declarative Workflow (#655)
* Notes

* Readme typo

* Update readme

* Checkpoint

* Namespace fix

* Fix ID and namespace

* Checkpoint

* Verified

* Comments

* Isolate "Kit"

* Address note: static

* Checkpoint

* Checkpoint "Executor<>"

* Prefix and internal executors

* Test passing

* Cleanup

* Rename "session" concept

* Revert workflow debug

* Fix template base / pragma

* Tune system scope

* Update dotnet/src/Microsoft.Agents.Workflows.Declarative/CodeGen/ResetVariableTemplate.tt

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

* Fix empty template

* Add validation for codegen ut

* Fix test

* Codegen baselines

* Constant

* Prep

* Mark TODO

* Fix

* Namespace

* One more

* Update baselines

* Checkpoint

* Checkpoint

* Checkpoint

* fme

* Checkpoint

* Another step

* Fixed up

* Roslyn

* Fix

* More cleaning

* Async

* Fix

* Enum checkpoint

* Refine enum

* Checkpoint

* Sync templates

* Checkpoint

* Streamline

* Pre-merge analyzer updates

* Foreach

* Placeholders

* Checkpoint

* Clean-up

* Sample path resolution

* Checkpoint

* Checkpoint - Workflow Code Building

* Validation

* Test cleanup

* Update test basline

* Update test baseline

* Fix DefaultTemplate usage

* Validation checkpoint

* Fix break/continue edges

* Verify generated code builds

* Fix merge

* Fix build validation

* Update template handling of literal string values.

* Test for metadata case

* Update baselines

* Fix merge

* Checkpoint

* Checkpoint: Conditions

* Invoke Agent Checkpoint

* Namespace

* Address code-analysis issues

* Cross platform test support

* Invoke agent checkpoint

* Clean sample

* Checkpoint: Agent Invoke Input Messages

* Checkpoint - Passing

* Checkpoint

* Regenerate all template + port conversation fix

* Checkpoint: Tests good

* Fix test for unbuntu

* Fix build command

* Checkpoint - E2E

* Test fix

* Update integration tests

* Fix merge

* Update

* Checkpoint !!!

* Baby steps

* Checkpoint

* Checkpoint E2E !!!

* So close...

* Integrate test validation

* Fix merge

* Rebase tests

* Namespace

* Namespace

* Test cleanup

* Sample comment cleanup

* Checkpoint: List conversion

* Include these

* CheckPoint: ParseValue

* Namespace

* Fix sampel

* More namspace

* Comments

* Test updates

* Test fix

* Better build

* Shared code

* Sort solution

* Fix build

* Prune solution

* One more

* Conversion matrix

* Final table conversion

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-30 21:56:14 +00:00
SergeyMenshykhandGitHub 69284e9dfc align env. varibale names (#1022) 2025-09-30 18:29:41 +00:00
Ben ThomasandGitHub df3e12b2ed .Net: Visualizing dotnet workflows (#882)
* Adding more test for workflow vizualization.

* Improving README for sample.

* More cleanup.

* Removing rendering of workflow visualization and adding basic support for mermaid format.

* Adding basic mermaid tests.

* Improving sample. Switching to another branch.

* About to merge from main.

* Formatting.

* More fromatting.

* Removng uneeded call to ToUpper.

* Adding README.

* Moving samples under workflow to workflows.

* Removing uneeded README for map-reduce sample.
2025-09-30 16:29:19 +00:00