- Issue created by @catia_penas
- πΊπΈUnited States Kristen Pol Santa Cruz, CA, USA
Switching to official tag :)
- Merge request !539Draft: Resolve #3514985 "Move assistants api" β (Open) created by marcus_johansson
- πΊπΈUnited States michaellander
if ($this->moduleHandler->moduleExists('ai_agents')) {
What's the plan with this and is it something I can help with now?
- π©πͺGermany marcus_johansson
@michaellander - its a recursive dependency now that is not nice.
The problem is that we never saw from the beginning that the assistant basically is an agent withsome added features (permissions, metadata, tokens, chat history setting) and that the agents framework is just surperior to this.
At the same time we want to keep backwards compability and not have breaking changes for anyone using the current system. At least until 2.0.x is released or we can confirm that all providers have function calling.
So for now we have added so that if the agents module is enabled, then you can use an agent as the assistant and just decorate it with some extra information. Its a bad solution since its a circular dependency.
Going forward I can think of some options here:
1. Easiest is making the AI Agents a dependency on AI Assistants API. We already see that creating an agent that does RAG is better than our current solution for RAG and for agents, its obviously better.
2. Moving agents into the AI core module as a submodule or even as a core part - in the end its just a LLM runner that can loop and that can use tools.
3. Making the assistant have a runner plugin, so anyone can connect as a third party to create a runner. Then the AI agents module can hook in using that. Feels overkill.
4. Rewrite assistants to use function calling and do looping. Also feel redundant.But any feedback would be great here.
- π¬π§United Kingdom MrDaleSmith
It sounds to be like the most robust solution is for v2.0 to abstract what it needs to out of ai_agents to provide the infrastructure to build and run agents, with the separate AI Agents module then housing the "core" agents. The AI Assistant and AI Chatbot modules could then be deprecated in favour of AI Agents introducing a Chatbot agent, probably with an upgrade path between the two to help the early adopters.
The AI module is ballooning and getting very complicated to use and understand: it's trying to do everything without breaking older versions of itself, and provides multiple things that in practice aren't really that different. The Core AI module should really just be an API to send data of the different supported types to an AI and then do something with the reply: the specific implementations like "put the response into a WYSIWYG field" or "show the response to a user" or "create an entity from the response" should be handled by external modules you can install and use if that's the specific way you want to use AI.
That's going to need very careful planning and management though if updates aren't going to brick a lot of sites.