-
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
Python: Document generator agent framework demo #10184
base: main
Are you sure you want to change the base?
Python: Document generator agent framework demo #10184
Conversation
return kernel | ||
|
||
@override | ||
async def invoke(self, history: ChatHistory) -> AsyncIterable[ChatMessageContent]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to override this method to wrap an agent invocation in a span whose name is the name of the agent. This is a requested feature which we can bring to the agent framework: #10174
cloned_history = history.model_copy(deep=True) | ||
cloned_history.add_user_message_str( | ||
"Now validate the Python code in the latest document draft and summarize any errors." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice in group chats, agents often struggle with following the system prompt. An agent will try to continue the conversation instead of executing the task it's given. Adding a user message here can prevent the agent from trying to continue the conversation.
if content: | ||
chat_history.add_message(message) | ||
|
||
chat_history.add_user_message_str( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In termination and selection strategies, having a user message here also helps to prevent the agent from continueing the conversation.
Motivation and Context
We currently don't have a demo sample that shows how to use the agent framework with multiple agents end-to-end. End-to-end means starting from a task, designing the agents, and observing the agents.
Description
This PR adds a demo app that shows how to use the agent framework with multiple agents to generate technical documents for Semantic Kernel. This automation will greatly improve our productivity in creating more contents.
This sample contains 3 agents, multiple plugins, and the necessary steps to make the agents observable.
Contribution Checklist