Commit Graph

41 Commits

  • .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
  • .NET Workflows - Enhance support and validation for image input (#1274)
    * Updated
    
    * Comments
    
    * Namespace
    
    * Comment
    
    * Cleanup
    
    * Update agent definition
    
    * Disable
    
    * Config
    
    * Enable
  • .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
  • [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>
  • .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
  • .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>
  • .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>
  • .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
  • .NET Workflows -Fix Declarative Workflow Tests (#1065)
    * Fixed
    
    * Restore generated workflow
    
    * Project
    
    * Fine tune
    
    * Update baseline
    
    * Adjust test-case
  • .NET: Align environment variable names (#1053)
    * alignt environment variable names
    
    * rename modelId variable names
  • .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
  • .NET: Fix some more static analysis diagnostics (#1025)
    * S1006
    
    * S2219
    
    * S3236
    
    * S3260
    
    * S1125
    
    * IDE0063
    
    * IDE0062
    
    * IDE0028
  • .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>
  • .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.
  • .NET Workflows - Fix "Human In Loop" sample and update "AutoSend" behavior (#991)
    * Fix sample and autosend
    
    * Specify "ConversationId"
    
    * Namespace
    
    * Perf fix
    
    * Namespace
    
    * Filter for appropriate message
  • .NET: Clean up some CancellationToken usage (#996)
    * Clean up some CancellationToken usage
    
    * Unused usings
  • Update M.E.AI and MCP versions (#992)
    But not yet M.E.AI.OpenAI, which depends on the latest OpenAI, which conflicts with the latest Azure.AI.OpenAI.
  • .NET: Rename workflows projects (#975)
    * Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows
    
    * Removing local settings.
    
    * Removing remining old files from merge.
  • .NET: Change Runtime namespaces to Microsoft.Agents.AI.Runtime (#957)
    * Rename MEAI.Runtime to MAAI.Runtime.
    
    * Missed.
  • Rename AI Agent packages to use Microsoft.Agents.AI (#913)
    * Rename AI Agent packages to use Microsoft.Agents.AI
    
    * Fix for build
    
    * Fix formatting
    
    * Fix formatting
    
    * Ignore in VSTHRD200 in migration samples
    
    * Ignore in VSTHRD200 in migration samples
    
    * Add some missing projects and run format
    
    * Fix build errors
    
    * Address code review feedback
    
    * Fix merge issues
    
    ---------
    
    Co-authored-by: Mark Wallace <markwallace@microsoft.com>
  • .NET: Update Workflow Input/Output Redesign (#881)
    * feat: Make Executor id field mandatory
    
    When checkpointing is involved, it is critical to keep executor ids consistent between runs, even when recreating a new object tree for the workflow.
    
    The default id-setting mechanism generated a guid for part of the id, making it not work when restoring from a checkpoint.
    
    This change prevents this situation from arising.
    
    * feat: Enable running untyped Workflows
    
    With the change to enable delay-instantiation of executors and support for async Executor factory methods, we must instantiate the starting executor to know what are the valid input types for the workflow.
    
    To avoid forcing instantiation every time, and to better support workflows with multiple input types, we enable support for build and interacting with the base Workflow type without type annotations, and remove the requirement to know a valid input type when initiating a run.
    
    * feat: Support Output from any executor and multiple outputs.
  • .NET: Add AgentWorkflowBuilder group chat (#861)
    * Add AgentWorkflowBuilder group chat
    
    And fix a variety of issues along the way:
    - Use DateTime{Offset}.UtcNow rather than Now
    - AIAgentHostExecutor shouldn't be publishing empty messages
    - Sequential workflows should be flowing all history and not just the output from the previous agent as the input into the next agent
    - Renamed some of the new agent workflow methods... still not super happy with the shape, though
    - Simplified handoffs builder, e.g. using a hashset with a custom comparer instead of a dictionary
    - Improved multi-service use by trying to change assistant->user role for messages created by other agents
    - Changed MessageMerger to rely on M.E.AI's coalescing more and to avoid empty contents / text
    - Ensured that messages from ChatClientAgent include MessageId and CreatedAt timestamps
    - Avoided including instructions for agents in a handoff workflow that don't have any handoffs
    - Removed the unnecessary end function in handoffs
    - Improved naming of executors to include agent name for debuggability
    - Use "N" formatting with Guid.ToString everywhere, to avoid the unnecessary extra dash character which is also not valid in various places (like function tool names)
    - Replace `params T[]` with `params IEnumerable<T>` to make public APIs more flexible in what they consume
    
    * Address feedback
    
    - Fix unintentional provider change in sample
  • .NET Workflows - Improvements to Declarative Framework (#838)
    * Closure
    
    * Verified
    
    * Update dotnet/src/Microsoft.Agents.Workflows.Declarative/Interpreter/DeclarativeWorkflowContext.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Sample folder
    
    * System scope fix
    
    * Fix link
    
    * Integrate Foundry SDK fix
    
    * File naming fix
    
    * Update dotnet/src/Microsoft.Agents.Workflows.Declarative/Interpreter/DeclarativeWorkflowContext.cs
    
    Co-authored-by: Tao Chen <taochen@microsoft.com>
    
    * Namespace
    
    * Optimize bind
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Tao Chen <taochen@microsoft.com>
  • .NET Workflows - Integrate Element Aliasing (#835)
    * Checkpoint
    
    * Update test workflows
    
    * Update workflows/MathChat.yaml
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update folder
    
    * Cleanup
    
    * Signed package version
    
    * Rollback nuget.config
    
    * Cleanup
    
    * Set `ProductContext`
    
    * Move product initialization.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET Workflows - Rename folder containing sample workflows (#836)
    * coolio
    
    * Update dotnet/samples/GettingStarted/Workflows/Declarative/README.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Support Checkpoint Serialization (#735)
    * feat: Support Checkpoint Serialization
    
    * Implements serialization roundtripping for checkpoints.
    * Adds support for JSON serialization
    * Adds FileSystem-based checkpoint persistence
    
    * fix: Executor State does not deserialize correctly
    
    The StateManager was not properly handling delay-deserialized values.
    
    * Fix PortableValue handling in StateManager (this makes it delegate to PortableValue the uwnrapping)
    * Fix UnitTest to actually test checkpoint serialization
    * Additional review comment fixes
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET Workflow - Declarative Workflow Event Fix (#765)
    * Checkpoint
    
    * Update workflows/DeepResearch.yaml
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Comment
    
    * Fix comment
    
    * Update package version
    
    * Fix nuget haxx
    
    * Checkpoint
    
    * Code complete
    
    * Testing
    
    * Message content workaround
    
    * Add sequential flow
    
    * Checkpoint
    
    * Integration test project
    
    * Checkpoint
    
    * Checkpoint cleanup
    
    * Complete
    
    * Checkpoint
    
    * Fix tests
    
    * Comment cleanup
    
    * Namespace
    
    * Formatting
    
    * Analyzer updates
    
    * Workflow update
    
    * Fixed!
    
    * Update dotnet/tests/Microsoft.Agents.Workflows.Declarative.UnitTests/DeclarativeWorkflowTest.cs
    
    Co-authored-by: Tao Chen <taochen@microsoft.com>
    
    * Fix build error
    
    * Purge "immutable" set and dictionary
    
    * Fix as task
    
    * Collection expression
    
    * Another
    
    * Frozen => Readonly (perf)
    
    * Fix
    
    * Namespace
    
    * Checkpoint
    
    * Add test
    
    * Fix
    
    * Rollback workflow edit
    
    * nitty
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Tao Chen <taochen@microsoft.com>
  • .NET Workflow - Integrated updated CPS Object Model (#681)
    * Checkpoint
    
    * Update workflows/DeepResearch.yaml
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Comment
    
    * Fix comment
    
    * Update package version
    
    * Fix nuget haxx
    
    * Checkpoint
    
    * Code complete
    
    * Testing
    
    * Message content workaround
    
    * Add sequential flow
    
    * Checkpoint
    
    * Integration test project
    
    * Checkpoint
    
    * Checkpoint cleanup
    
    * Complete
    
    * Update package
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Workflow getting started samples in .Net (Second batch) (#650)
    * Add loop and agents in workflows samples
    
    * Add foundry agent and workflow as agent samples
    
    * Checkpoint sample WIP
    
    * Checkpoint sample 1 Done
    
    * Add HIL samples
    
    * Fix formatting
    
    * Force folder name change step 1
    
    * Force folder name change step 2
    
    * Fix formatting
    
    * Fix formatting
    
    * Add checkpoint and rehydrate sample
    
    * _Foundational
    
    * Fix formatting
  • .NET Workflows - Add declarative action events (#679)
    * Updated
    
    * Typos
    
    * Update sample
    
    * Typo
    
    * Add parent and prior action ids to event
  • .NET Workflows - Update structure of samples (#645)
    * Updated
    
    * Typos
    
    * Update readme fwiw