-
Notifications
You must be signed in to change notification settings - Fork 4k
.Net: Remote Chat Completion Agent Demo #11554
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: Remote Chat Completion Agent Demo #11554
Conversation
I was just having a conversation with a colleague about whether it makes sense to implement a remote Agent based on an API, and now I come across this PR. Is there any plan to include this in the Framework? |
…odotNET/semantic-kernel into demo/remote-chat-completion-agent
…odotNET/semantic-kernel into demo/remote-chat-completion-agent
…m/tommasodotNET/semantic-kernel into demo/remote-chat-completion-agent
any update on this? |
@markwallace-microsoft does #12050 makes this PR obsolete? |
Considering there are few emerging standard protocol for agent-to-agent communication, it makes sense to close this PR without merging it. |
Motivation and Context
This demo shows how we could implement a
RemoteChatCompletionAgent
that can be used to interact with a remote Semantic KernelChatCompletionAgent
.The new type
RemoteChatCompletionAgent
implements theChatHistoryKernelAgent
methods using a custom HTTP client to send requests to an API that hosts theChatCompletionAgent
functionality. This allows us to use the same interface as the localChatCompletionAgent
, but with the added benefit of being able to interact with a remote service.Description
Benefits of having a remote agent
Details about the sample
I am using an
AgentGroupChat
to show how to use different remote agents togethere in the same chat. It's a useful use case. Since theRemoteChatCompletionAgent
extends the typeChatHistoryKernelAgent
, it can be used in the same way as the local agent.In thie simple Group Chat, we have two agents:
TranslatorAgent
: this agent translates the text to English. Program.csSummaryAgent
: this agent summarize the text. Program.csThe Group Chat will call the
TranslatorAgent
first, and then theSummaryAgent
.I am also using .NET Aspire to have all the different microservices start and run together. I am also leveraging the .NET Service Discovery to have the correct endpoints for each agent.
.NET Aspire is not required. It just make it easier to run the sample and monitoring all the different microservices. You can run the
RemoteChatCompletionAgent
in any .NET application.Contribution Checklist