-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Activate deactivate agents #4800
base: main
Are you sure you want to change the base?
Activate deactivate agents #4800
Conversation
Getting this up for review. I'll see if any other agents need something done and add documentation for this after the holidays |
Let's keep it to deactivation initially since there is currently no clear use case for activation but there is for deactivation |
Also matter of preference, but I would prefer |
@@ -532,6 +542,13 @@ async def stop(self) -> None: | |||
"""Stop the runtime message processing loop.""" | |||
if self._run_context is None: | |||
raise RuntimeError("Runtime is not started") | |||
|
|||
# deactivate all the agents that have been activated | |||
for agent_id in self._activated_agents: |
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.
Considering we just want shutdown, would be easier to just iterate _instantiated_agents
here instead
reminder to also update autogen studio code where close is called or create an issue so that victor updates it later |
Is there a particular reason not to have the activation portion in place? The behavior for everything right now is just passing, and I could foresee situations where you want a separate initialization component outside the constructor |
Initialization should happen in the agent's factory so the functionality is already provided and then just adds a different way to achieve the same thing without a clear use case. |
Why are these changes needed?
Create startup/shutdown functions
Related issue number
#4705
Checks