Commit Graph

20 Commits

  • .NET: [BREAKING] Add session StateBag for state storage and support multiple providers on the Agent (#3806)
    * .NET: [BREAKING] Add session statebag to use for state storage instead of inside providers (#3737)
    
    * Add a StateBag to AgentSession and pass Agent and AgentSession to AIContextProvider and ChatHistoryProviders
    
    * Convert all AIContextProviders to use the statebag
    
    * Update InMemoryChatHistoryProvider to use StateBag
    
    * Update Comsos and Workflow ChatHistoryProviders
    
    * Update 3rd party chat history storage sample.
    
    * Remove serialize method from providers
    
    * Replacing provider factories with properties
    
    * Remove Providers from Session and flatten state bag serialization
    
    * Update samples to use getservice on agent
    
    * Updated additional session types to serialize statebag
    
    * Fix regression
    
    * Address PR comments
    
    * Address PR comments.
    
    * Fix formatting
    
    * Fix unit tests
    
    * Remove InMemoryAgentSession since it is not required anymore.
    
    * Address PR comments
    
    * Convert sessions for A2AAgent, ChatClientAgent, CopilotStudioAgent and GithubCopilotAgent to use regular json serialization.
    
    * Fix durable agent session jso usgae
    
    * Add jso to InMemory and Workflow ChatHistoryProviders
    
    * Update InMemoryChatHistoryProvider to use an options class for it's many optional settings.
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR feedback
    
    * Fix verification bug.
    
    * Improve state bag thread safety
    
    * Address PR comments and fix unit tests
    
    * Address PR comments
    
    * Fix unit test
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Add a public StateKey property to providers (#3810)
    
    * .NET: [BREAKING] Update providers in such a way that they can participate in a pipeline (#3846)
    
    * Make providers pipeline capable
    
    * Fix unit tests
    
    * Move source stamping to providers from base class
    
    * Also update samples.
    
    * Address PR comments
    
    * Rename AsAgentRequestMessageSourcedMessage to WithAgentRequestMessageSource
    
    * .NET: [BREAKING] Add consistent message filtering to all providers. (#3851)
    
    * Add consistent message filtering to all providers.
    
    * Remove old chat history filtering classes
    
    * Fix merge issues
    
    * Fix unit test
    
    * Enforce non-nullable property
    
    * Fix merging bug and make troubleshooting source info easier by adding tostring implementation
    
    * .NET: [BREAKING] Add support for multiple AIContextProviders on a ChatClientAgent (#3863)
    
    * Add support for multiple AIContextProviders on a ChatClientAgent
    
    * Address PR comments and fix tests
    
    * Address PR comments.
    
    * .NET: [BREAKING]Delay AIContext Materialization until the end of the pipeline is reached. (#3883)
    
    * Delay AIContext Materialization until the end of the pipeline is reached.
    
    * Address PR comments.
    
    * Address PR comments
    
    * Modify InvokedContext to be immutable (#3888)
    
    * .NET: Address Feedback on StateBag feature branch PR (#3910)
    
    * Address Feedback on statebag feature branch PR
    
    * Update dotnet/src/Microsoft.Agents.AI.DurableTask/CHANGELOG.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Address PR comments
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
  • .NET: [BREAKING] Provide agent and session to AIContextProvider & ChatHistoryProvider (#3695)
    * Add a StateBag to AgentSession and pass Agent and AgentSession to AIContextProvider and ChatHistoryProviders
    
    * Remove statebag code from this branch, to get the refactoring out of the way first
    
    * Apply suggestion from @rogerbarreto
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
    
    * Apply suggestion from @westey-m
    
    * Apply suggestion from @westey-m
    
    ---------
    
    Co-authored-by: Roger Barreto <19890735+rogerbarreto@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: Rename ChatMessageStore to ChatHistoryProvider (#3375)
    * Rename ChatMessageStore to ChatHistoryProvider
    
    * Fix merge issue
    
    * Fixed PR comments
    
    * Fix tests after property rename
    
    * Add unit tests and fix merge issues
    
    * Fix encoding
  • .NET: [BREAKING] Refactor ChatMessageStore methods to be similar to AIContextProvider and add filtering support (#2604)
    * Refactor ChatMessageStore methods to be similar to AIContextProvider
    
    * Fix file encoding
    
    * Ensure that AIContextProvider messages area also persisted.
    
    * Update formatting and seal context classes
    
    * Improve formatting
    
    * Remove optional messages from constructor and add unit test
    
    * Add ChatMessageStore filtering via a decorator
    
    * Update sample and cosmos message store to store AIContextProvider messages in right order. Fix unit tests.
    
    * Update Workflowmessage store to use aicontext provider messages.
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
    
    * Improve xml docs messaging
    
    * Address code review comments.
    
    * Also notify message store on failure
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • .NET [Breaking] Simplify and Refactor ChatclientAgentOptions Ctor + Instructions (#1517)
    * Point AgentOptions.Instructions to ChatOptions
    
    * Update tests and checks
    
    * Update xml docs
    
    * Removal of agentOptions.Instructions in favor of chatOptions.Instructions
    
    * Instructions and tool check consistency
    
    * Instructions and tool check consistency
    
    * Address comment
    
    * Update .github/upgrades/prompts/SemanticKernelToAgentFramework.md
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * Address PR Comment
    
    * Update latest changes to comply with the PR proposal
    
    * Address feedback
    
    * Update dotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/ChatClientAgentTests.cs
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    
    * Address instructions
    
    * Update declarative to use promptAgent.Instrucitons with chatOptions.Instructions
    
    ---------
    
    Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
    Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
  • 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: [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: Remove AgentThread.GetMessagesAsync (#668)
    * Remove AgentThread.GetMessagesAsync
    
    * Remove unecessary using
  • .Net: Add support for 3rd party thread storage and thread serialization (#203)
    * Add thread storage and serialization POC
    
    * Switch to using JsonElement and add unit tests
    
    * Add additional unit tests.
    
    * Exclude private debugger properties from CodeCoverage.
    
    * Rename IChatMessagesStorable to IChatMessageStore
    
    * Apply suggestions from code review
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Improve xml doc.
    
    * Update the message storing thread to always use external store for both local and remote storage.
    
    * Remove threadid from the IChatMessageStore interface, since the store should own the thread id itself, if it requires one.
    
    * Switch GetMessages to IEnumerable
    
    * Address pr comments.
    
    * Make jsonserializer options default consistent on DeserializeThreadAsync
    
    * Move message storing thread functionality into AgentThread and simplify AgentThread behavior.
    
    * Remove embedding generation from VectorStore chat history sample.
    
    * Remove unecessary code and fix formatting.
    
    * Make GetNewThread and DeserializeThread virtual with default implementations.
    Remove unsued json utilities.
    
    * Fix formatting
    
    * Remove problem test.
    
    * Add more unit tests
    
    * Remove unused using clause.
    
    * Address pr feedback.
    
    * Address PR comments.
    
    * Make InMemory store internal
    
    * Switch InMemoryChatMessageStore to implement IList instead of inheriting from List.
    
    * Rename store deserialize param.
    
    * Update serialization based on PR comments.
    
    * Remove confusing comment.
    
    * Address Deserialization PR comments in the same way as Serialization
    
    * Add State to IChatMessageStore Serialize and Deserialize names.
    Make Thread Deserialize internal.
    Make AgentThread type switching fobidden.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
  • Add ChatClientAgent constructor overload (#188)
    * Add ChatClientAgent constructor overload
    
    * Add unit tests for new constructor
    
    * Up code coverage with extra tests
    
    * Address PR comments.
    
    * Address PR comment
    
    * Add additional test to increase code coverage.
  • Renaming to use Microsoft.Extensions prefix (#120)
    * Rename the folders
    
    * Rename the .csproj files
    
    * Some build file updates
    
    * Update namespaces
    
    * Fix order of imports
    
    * Fix order of imports
    
    * Fix order of imports
  • .Net: Add Reasoning Model Integration tests (#100)
    * Add reasoning integration tests
    
    * Adding Reasoning Model config
  • Add function call integration tests (#90)
    * Add function call tests
    
    * Address PR comment
  • Remove AdditionalInstructions from AgentRunOptions since it is not well supported outside of ChatClientAgents (#87)
    * Remove additional instructions from AgentRunOptions since it is not well supported outside of ChatClientAgents
    
    * Fix typos and remove unused test.
    
    * Make further namespace fixes and update AzureAIAgent with new tests.
    
    * Expand tests to increase code coverage
  • Add additional integration tests and add OpenAIAssistant integration tests project. (#79)
    * Add additional integration tests and add OpenAIAssistant integration tests project.
    
    * Address PR comments.
    
    * Address PR comments.
  • Add test infrastructure for agent conformance tests (#77)
    * Add test infrastructure for agent conformance tests
    
    * Address PR comments.
    
    * Switch TargetFrameworks to have inline condition