Commit Graph

38 Commits

  • .NET: [BREAKING] Workflows API Review Naming Changes (Part 1?) (#4090)
    * refactor: Normalize Run/RunStreaming with AIAgent
    
    * refactor: Clarify Session vs. Run -level concepts
    
    * Rename RunId to SessionId to better match Run/Session terminology in AIAgent
    * [BREAKING]: Will break existing checkpointed sessions in CosmosDb due to field rename
    
    * refactor: Rename and simplify interface around getting typed data out of ExternalRequest/Response
    
    * Also adds hints around using value types in PortableValue
    
    * refactor: Rename AddFanInEdge to AddFanInBarrierEdge
    
    This will prevent a breaking change later when we introduce a programmable FanIn edge, analogous to the FanOut edge's EdgeSelector.
    
    The goal, in the long run is to support a number of different FanIn scenarios, with naive FanIn (no barrier) by default, similar to FanOut.
    
    * refactor: AsAgent(this Workflow, ...) => AsAIAgent(...)
    
    * misc - part1: SwitchBuilder internal
    
    ---------
    
    Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
  • .NET: [BREAKING] Rename AgentThread to AgentSession (#3430)
    * Rename AgentThread to AgentSession
    
    * Add more renames
    
    * Update readme files
    
    * Revert nullable variable change and further fixes.
    
    * Revert change in header name
    
    * Fix some comments and tests
    
    * Update changelog.
    
    * Address PR feedback.
    
    * Fixing code review comments.
    
    * Fix new errors after merging latest code.
  • .NET: [Breaking] RenameAgentRunResponse and AgentRunResponseUpdate classes (#3197)
    * rename AgentRunResponse and AgentRunResponseUpdate classes - part1
    
    * rename varialbles, parameters, methods and tests
    
    * rollback unnecessary changes
  • .NET: Update to latest Azure.AI.*, OpenAI, and M.E.AI* (#2850)
    * Update to latest Azure.AI.*, OpenAI, and M.E.AI*
    
    Absorb breaking changes in Responses surface area
    
    * Update dotnet/samples/AgentWebChat/AgentWebChat.AgentHost/Utilities/ChatClientExtensions.cs
    
    * Update dotnet/samples/AgentWebChat/AgentWebChat.AgentHost/Utilities/ChatClientExtensions.cs
    
    * Update dotnet/samples/AgentWebChat/AgentWebChat.AgentHost/Utilities/ChatClientExtensions.cs
    
    * Update dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient/Program.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Using patch to remove the model is necessary, updated the response client to actually use the the ForAgent
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
  • .NET: Upgrade to .NET 10 (#2128)
    * Upgrade to .NET 10
    
    - Require .NET 10 SDK
    - Include net10.0 assets in all assemblies
    - Move net9.0-only targets to net10.0
    - Update LangVersion to latest
    - Remove complicated distinctions between debug target TFMs and release target TFMs
    - Remove unnecessary package dependencies when built into netcoreapp
    - Clean up some ifdefs
    - Clean up some analyzer warnings
    
    * Fix CI
  • .NET: Improve AIAgent and Workflow registrations for DevUI integration (#2227)
    * wip
    
    * resolve non-agent workflows as well!
    
    * add tests for devui registrations and resolving
    
    * fixes
    
    * devui for net8 as well!
    
    * simplify TFM
    
    * update tfm...
    
    * tfm rules....
    
    * wip
    
    * roll
    
    * verify entities are registered with a devui call
    
    * tests
    
    * add a proper support for non-keyed workflows
    
    * resolve default aiagent registration
    
    * sort usings :)
    
    * cleanup tests
  • .NET: assign AgentCard's URL to mapped-endpoint if not defined explicitly (#2047)
    * fix serialization in chat completions on tools
    
    * nit
    
    * write e2e test for agent card resolve + adjust behavior
    
    * nit
  • .NET: Add WithAITool extensions for Hosting AIAgents (#1990)
    * add extensions to register tools via fluentAPI
    
    * fix
  • .NET: Remove sequential\concurrent workflow extensions (#1731)
    * remove non-standard workflow extensions, create overloads for IHostedAgentBuilder
    
    * rework
    
    * rollback extensions in a2a
  • .NET: Improve fidelity of OpenAI ChatCompletions Hosting (#1785)
    * rename, support json serialization
    
    * wip
    
    * non-streaming
    
    * streaming?
    
    * proper streaming types
    
    * comments + fix audio parse
    
    * copilot suggestions
    
    * proper stopsequences type
    
    * build options as i could
    
    * annotations
    
    * proper generation of Id for chatcompletions
    
    * string length as in chatcompletions api ref
    
    * image url
    
    * support tools
    
    * rework API
    
    * introduce tests for chatcompletions
    
    * function calling / serialization tests / fixes
    
    * more tests and coverage
    
    * fix format
    
    * sort usings
    
    * nit
    
    * address PR comments
    
    * nits
  • .NET: API to manage AgentThreads in hosting scenarios (#1520)
    * 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
    
    * proto
    
    * fix worfklow build logic
    
    * build it / no reflection / no generics / extensions on aiagent
    
    * rollback + new overload on workflow builder
    
    * address PR comments
    
    * fix build
    
    * take from main
    
    * correct based on latest API
    
    * apply suggestion
    
    * address PR comments x1
    
    * address PR comments 2
    
    * renames
    
    * *With*
    
    * refactor api a bit
    
    * refactor + merge main + apply suggestions
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Refactor A2A and AIAgent hosting extensions (#1625)
    * a2a reformat
    
    * and refactor extensions on serviceCollection
    
    * units
    
    * fix build
    
    * add remark for agentcard overloads
  • .NET: Improve fidelity of OpenAI Responses hosting (#1550)
    * 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>
  • .NET: Use extension methods from A2A package for converting between MEAI & A2A model classes (#1600)
    * 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>
  • 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.
  • 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>
  • .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>
  • .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
  • .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>
  • 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>
  • Python: .NET: [BREAKING] Remove Actor-based runtime (#977)
    * Remove Actor-based runtime
    
    * Fix formatting
    
    * Remove cosmos db vestigials
    
    ---------
    
    Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
    Co-authored-by: Stephen Toub <stoub@microsoft.com>
  • .NET: Clean up some CancellationToken usage (#996)
    * Clean up some CancellationToken usage
    
    * Unused usings
  • .NET: Clean up stale mentions of M.E.AI.Agents (#997)
    * Clean up stale mentions of M.E.AI.Agents
    
    * Unused usings
  • .NET: Rename workflows projects (#975)
    * Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows
    
    * Removing local settings.
    
    * Removing remining old files from merge.
  • .NET: rename A2A extension methods (#915)
    * rename
    
    * simplify via agentProxy
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents.Hosting.A2A.AspNetCore/WebApplicationExtensions.cs
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Update dotnet/src/Microsoft.Extensions.AI.Agents.Hosting.A2A/Microsoft.Extensions.AI.Agents.Hosting.A2A.csproj
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: Change Runtime namespaces to Microsoft.Agents.AI.Runtime (#957)
    * Rename MEAI.Runtime to MAAI.Runtime.
    
    * Missed.
  • .NET: Change Hosting namespaces to Microsoft.Agents.AI.Hosting (#953)
    * Rename MEAI.Hosting to MAAI.Hosting.
    
    * dotnet format.
  • 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: 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: [BREAKING] Subclass AgentThread so that different agents have their own threads with their own typed settings. (#798)
    * Subclass AgentThread so that different agents have their own threads with their own typed settings.
    
    * Address PR comment.
    
    * Add unit tests for base abstract threads
    
    * Fix style warning
    
    * Fix stlying
    
    * FIx and suppress warnings as needed.
    
    * Remove covariant thread response types and fix some styling.
    
    * Remove unecessary json property name attributes and make OrchestratingAgentThread private
    
    * Fix break from merge from main.
    
    * Fix formatting
    
    * Fix deserialization bug in Memory sample
    
    * Remove thread deletion from basic samples.
    
    * Remove public constructors for thread subclasses and add more factory methods to concrete agent types.
    
    * Update AgentProxy thread constructors to be internal as well.
    
    * Revert AgentProxyThread to internal
    
    * Change AIContextProvider to internal set
    
    * Change conversation id and message store properties to internal set
    
    * Update styling.
    
    * Seal various thread types.
    
    * Add thread type check for thread deletion
    
    * Fix tests after latest merge from main
    
    * Add thread type checks for thread deletion.
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: feat: Microsoft.Extensions.AI.Agents.Hosting.A2A package (#390)
    * add timeout handling for message send
    
    * prepare a2a proj
    
    * fix it finally
    
    * add a holder for selected protocol
    
    * init types ;
    
    * see discoveredAgentCardJson
    
    * prettify json
    
    * correct usage
    
    * client setup for card
    
    * setp?
    
    * message:send
    
    * init task based communication
    
    * try call it via the agent thread
    
    * okay i got back the message wooooow!
    
    * nit
    
    * fix duplicates
    
    * yea matey!
    
    * fix knights-knaves for A2A-Task-based communication
    
    * fix a2a agents csproj
    
    * AI feedback
    
    * a2a does not support netstandard / netfx
    
    * try fix build + refactor
    
    * bump a2a for net9 only
    
    * rollback System.Net.ServerSentEvents & Microsoft.Bcl.AsyncInterfaces version upgrade; override in-place and retarget to net9;net8 for A2A
    
    * address PR comments x1
    
    * refactor a2a interfaces
    
    * address PR comments x2
    
    * fix cancel usage
    
    * separate project for A2A.AspNetCore
    
    * simplify
    
    * cleanup
    
    * cleanup dependencies
    
    * generate convertor tests / fix namespaces etc
    
    * setup actor client!
    
    * fix build
    
    * backoff conversations
    
    * fix duplicate message streaming
    
    * address PR comments x1
    
    * remove internalsvisibleto
    
    * dont implement agent card query on my own: give it to the user
    
    * nit
    
    * rename and move projects
    
    * fix dotnet-format
    
    * address PR comments x1
    
    * remove unreferenced project
    
    * rollback
    
    * rename
    
    * nit
    
    ---------
    
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • .NET: chore: support retries on Cosmos storage creation (#402)
    * support retries
    
    * tests + registration options
    
    * fix ordering ..
    
    * HK + update packages
    
    * fix paths
    
    * Update dotnet/tests/CosmosDB.IntegrationTests/Microsoft.Extensions.AI.Agents.Runtime.Storage.CosmosDB.Tests/CosmosTestFixture.cs
    
    * re create project and fix some pk usage
    
    * fix all tests
    
    * try workflow?
    
    * wip 1
    
    * fix definition
    
    * try with cosmos_use_emulator env?
    
    * try ignore SSL errors?
    
    * other cert verifications
    
    * hardcode to 8081?
    
    * proper valuation of ENV
    
    * logging
    
    * ensure db exsists for CI
    
    * bump
    
    * cleanup
    
    * fix usage
    
    * nit comment
    
    * try only release for stability?
    
    * try skip some flaky tests
    
    * merge fixes + rollback container
    
    * reimplement with iasyncdisposable pattern
    
    * remove example doc struct
  • .NET: Add agent hosting package and update sample (#296)
    * Add agent hosting package and update sample
    
    * Review feedback and cleanup
    
    * Include the narrator
    
    * wip
    
    * wip
    
    * Remove workaround for empty state writes.
    
    * Handle changes to AgentThread.
    
    * One more.
    
    * Fix.
    
    ---------
    
    Co-authored-by: Aditya Mandaleeka <adityam@microsoft.com>