Adding / Removing agents in live environment
Hi All,
Very new to mastra so apologies if this is a dumb question. Im investigating whether it would be possible to add or remove agents from an existing mastra instance? Im looking through the provided type interface of the Mastra class but havent found anything. Looking at the constructor, i found the following
I could replicate this in my code and just overwrite the private access definitions but id rather avoid that if possible
the last option would be to rebuild the mastra instance when changes happen but thats probably quite expensive,
Thanks for your help!
6 Replies
Hi @Crafty ! That's not something that's possible at the moment unfortunately
ah ok, thats a pain. is there anything that would bar it in the future? id be willing to put some time into this if theres nothing massive blocking it ๐
Could you open a feature request on our github? I could pass that onto the team to see if that's something they'd consider? https://github.com/mastra-ai/mastra/issues
GitHub
mastra-ai/mastra
The TypeScript AI agent framework. โก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra
thats all done ๐
https://github.com/mastra-ai/mastra/issues/8864
GitHub
[FEATURE] Ability to add or remove agents after Mastra Initialisati...
Problem Statement Id like to be able to dynamicly add or remove agents and workflows after the instantiation of the central Mastra class. This would enable several new usecases for mastra. In my ca...
It got closed, my bad, I didn't we were already tracking this request https://github.com/mastra-ai/mastra/issues/7824
Thanks for bringing that up!
GitHub
[FEATURE] Dynamically add agents ยท Issue #7824 ยท mastra-ai/mastra
Problem Statement Currently (or AFAIK), agents are being hardcoded into the system and there is no way to add a dynamically generated agents into the Mastra instance. Proposed Solution Would be goo...
All good, im working on a pr for that issue now ๐