Multiple agent instances are being created and stored under the "Agents" tab in the Azure AI Foundry portal. #19
-
We are encountering a persistent issue in the Multi-Agent Custom Automation Engine Solution Accelerator where multiple agent instances are being created and stored under the "Agents" tab in the Azure AI Foundry portal. These agent instances are not being deleted automatically after each application run or upon shutdown, resulting in agent duplication across sessions. Over time, this leads to an unnecessarily large number of agents, consuming resources and cluttering the Foundry interface. There appears to be no built-in mechanism to clean up agents after they are no longer in use. Even though the code uses an in-memory cache during execution, it does not prevent new agents from being created on every run, and it does not remove the old ones from the Foundry portal. Desired Outcome Automatically delete all agents when the application shuts down or finishes its run, Preserve only one instance of each agent type per user (reusing them across sessions if applicable). This would ensure that the Agents tab (accessible from the Foundry project > Foundry Portal > Agents in the left-hand sidebar) remains clean and manageable. The critical goal is to prevent agents from being recreated repeatedly without cleanup, which currently leads to potential quota issues and operational confusion. Looking for help in this , Please give some valid recommendation |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi this issue has also been reported on the semantic kernel repo microsoft/semantic-kernel#11936 |
Beta Was this translation helpful? Give feedback.
-
See #18 this is by design see code example of how to perform cleanup |
Beta Was this translation helpful? Give feedback.
See #18 this is by design see code example of how to perform cleanup