* Porting Mem0Provider to AF from SK
* Switch integration tests to manual
* Address issues
* Move Mem0Provider to separate project.
* Move integration tests to new project
* Address PR comments.
Concurrent run support was recently added to workflows, but Orchestrations did not fully update to support it. A few executors were missing Cross-Run Shareable annotations, and the ConcurrentEnd executor needed to be factory-instantiated.
This also ports the fix for #1613 from #1637, to avoid waiting on that PR.
Checkpointing is used by the WorkflowHostAgent to be able to support resume from a provided thread. When a CheckpointManager is not specified, we use the InMemoryCheckpointManager and serialize its state into the thread's Serialize()ed JsonElement.
At some point InMemoryCheckpointManager became not serializable, breaking this behaviour. This change restores serializability, and adds a test.
* Improve conformance of OpenAI Responses API serving
* Update dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Responses/AgentRunResponseExtensions.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Responses/AgentRunResponseExtensions.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Sort packages
* Relax adherence where acceptable
* nit
* PromptCacheKey is not obsolete
* format
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* use extension methods from A2A package for converting between MEAI and A2A model classes.
* Update dotnet/tests/Microsoft.Agents.AI.A2A.UnitTests/A2AAgentTests.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* remove unused using
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
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.
* Add support for getting and creating Assistant and Foundry agents with ChatClientAgentOptions
* Fix options cloning and agent creation
* Fix inconsistency
* Add support for mapping more tools and integration tests for ensuring CreateAIAgent works with those tools.
* Add support for additional openai tools with tests.
* Remove special casing for function tools, since it's either not supported yet, or requires a lot of code duplication.
* Removed unused using.
* Fix broken unit tests
* Change integration test to reduce flakiness.
* unit test for using create agent option by constructor
* remove this for prevent duplicate when ChatClientAgentOption and ChatOption has same Instruction
* update unit test for ChatClientAgentOptions
* 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
* 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>
- 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.
* 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
* 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>
* 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>
Capitalize instruction and relax assertion to accept any non-empty response instead of requiring exact text match. Fixes flaky test failures with reasoning models.
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
* 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