* 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
* 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>
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>
* 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
* 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>
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.
* 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.
* Addressing a SK bug where threads can't be reused + threads should be capture after the request, not created before
* Using storedenabled to align with AF default behavior
* Address copilot comment
* Address Azure + OpenAI remaining sample improvements
* Update OpenTelemetryAgent to latest spec
It was stale. Rather than try to keep it up-to-date manually, I've changed it to piggy back on OpenTelemetryChatClient, so that it inherits everything OpenTelemetryChatClient does and then augments it just with agent-specific tags.
* Address feedback / merge
* Make serialize methods sync and rename one to match others.
* Remove unnecessary async postfixes.
* Remove nullability of ChatMessageStore.Serialize return type, since the default JsonElement already represents an undefined json element.
* Fix unit test