-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Net: SK Agents #4740
.Net: SK Agents #4740
Conversation
I am also curious if "user-proxy" agent might need to be addressed to fully support agent collaboration/chat patterns? |
FWIW - ADR "31" is already overloaded |
Perhaps we can consider the upcoming Azure support: Azure/azure-sdk-for-net#40817 |
Continuing on @crickman reply, adding some thoughts: Why not implementing all the Autogen agent types? as in https://github.com/microsoft/autogen/pull/924/files#diff-9860f01d79405521f2af05fe4040ed4f50498c9108956723f4bc5f89d88ab5ad :
IMHO this implementation is gold, and a basis for inspiration - the only issue I see is that is bound to OpenAI API. But let me get to the core, I mean Kernel ;) Why not pass the "central" kernel on its builder, and then use it? in case that we need parallelized execution - the main reason I believe that triggered this design decision - each agent has its own kernel (heart) - why not create a pool of kernels that are a clone from the main, central kernel (no configuration needed) and then each agent can take the next available, free, kernel/heart? ;) This way they can execute in parallel and this approach would simplify the architecture (read: reduce code) and increase performance by reusing ready-to-use kernels. This pool of kernels, could be easily coordinated by the kernel itself, keeping the kernel centricity. Maybe with a thread safe collection of kernels that have a flag if it is used and by who, each with a semaphore to avoid race conditions, et voila... we have a better solution than creating all the kernels beforehand. It also would scale better and be more performant. And also solve the multi-model compatability (sort of) - as the Kernel is supporting already different AI Models. So we could tell the agent what serviceId to use (as https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example62_CustomAIServiceSelector.cs) Thoughts? |
Yes, it may be necessary. Once the agents' abstraction is in place, we will begin adding concrete implementations for agents, and the "user-proxy" agent could be one of those implementations. There will be a user story to track the "user-proxy" agent for SK. |
Yes, thank you. I will change the number before submitting the PR to the main branch. |
Yep, definitely, we should migrate our agent to the new API when it's available. I'll create an issue to track this. |
Once the agent's abstraction is in place, it will be a matter of prioritizing the design and implementation for the agents in a way that aligns with SK's overall approach, including DI, filters, tools, and so on. |
Even though it is not stated in the ADR, and it should have been and will be, every feature we design or add to SK is supposed to be built around the kernel and leverage as much as possible of all the benefits SK provides or supports, such as DI, plugins, function calling, abstractions, etc. Therefore, agents are no exception in this regard. Regarding passing the kernel to agents, it is a good idea and aligns with the way we plan to implement agents. SK agents should be flexible and accept an instance of a kernel provided by the SK consumer code. Whether it is one instance of the kernel for all agents, or each agent gets its own instance, it is up to the SK consumer code to decide, depending on the scenario it wants to implement. Kernel/Agents Pool: It might make sense to arrange agents or kernels into a pool if the cost of creating or destroying them is high. For example, if the classes use expensive system resources that can be shared and reused, it would be logical to organize them in a pool to minimize system resource usage. Regardless, the SK consumer code has a few mechanisms to optimize the cost if it is high. A kernel/agent can be registered as a singleton and reused during the hosting app's lifetime to minimize the cost. If the singleton solution is not sufficient, nothing prevents it from pooling kernels or agents if that is what the hosting app requires. |
What is the rationale for the Agent class requiring the Assistant APIs? AutoGen uses the Chat Completion API which is implemented by multiple providers like vLLM, Llama.cpp, etc. Thanks, |
Hi Ash, But as the team said, they want to decouple from the OpenAI implementation, and after this "base work is done" - which is what this ADR is about, to provide a base architecture/structure from where to build the agent story for all models (and also OpenAI). |
Thanks @joslat Looking forward to test this |
### Motivation and Context This ADR outlines high-level ideas/design for SK agents.
Motivation and Context
This ADR outlines high-level ideas/design for SK agents.