Closed joslat closed 4 weeks ago
I'll follow with a PR - thanks for the adjustments @markwallace-microsoft !!
Initial PR submitted: https://github.com/microsoft/semantic-kernel/pull/8720
@joslat - Thank you for this suggesting and demonstrating the change in the PR. If we were to move forward with this, I wonder if it would make sense to explore the form agent-subclassing might take. For instance, how/where is customer logic applied and what problem does it solve.
I've been working with some other customers that have been able to make use of a composition pattern based on ChatHistoryKernelAgent
instead of subclassing (like middle-ware). We might want to compare either approach.
Let's continue this discussion!
Thanks @crickman!
I like the middleware pattern, that would work. Basically you inject there "anything". AutoGen.NET is doing this...
Essentially what I did is to create custom AgentGroupChat(s), see https://github.com/joslat/SemanticKernelAgenticChatWorkflowsExtension/tree/main/SemanticKernel based in IAgentGroupChat where I wrapped AgentGroupChat in AgentGroupChatExt (which implements the interface IAgentGroupChat), so I can finally extend it - created several classes as example implementing:
Don't look at the MiddlewareAgentChat, that didn't work well ;) - left it there for reference.
On the ChatHistoryKernelAgent extensibility, how did you do that middleware injection? I would love to see an operative, working, sample of this...
Closing this in conjunection with the PR.
Thanks @crickman ! Do you have any example of what you mentioned earlier? "composition pattern based on ChatHistoryKernelAgent instead of subclassing (like middle-ware)."?
I would be very interested on peeking at it :)
I propose unsealing the AgentGroupChat, AgentChat, and AggregatorAgent classes and having them implement corresponding interfaces (IAgentGroupChat, IAgentChat). This change will greatly enhance the extensibility and flexibility of the Semantic Kernel, allowing developers to extend and customize these classes to suit various application needs.
Benefits:
I believe these changes will benefit the community and align with the project's goals. I'm open to feedback and willing to adjust the proposal as needed.