- Issue created by @marcus_johansson
The current Agent system only allows you to setup an agent via code and the Drupal plugin system. This is a good solution for agents that might be complex or might need to do something out of the ordinary and need dependencies that are hard to have in configurations.
However most agents have some resusable parts:
1. Context - this is the system prompt mostly.
2. Dynamic Context - these are known context that should also be added into the system prompt, but that are dynamically loaded. For instance an list of all content types on the website.
3. Tools or structured responses - these can either be tools that executes actions or returns data on Drupal websites or other agents. Or structured responses to fill out configurations.
4. "Hard coded" forwarding, when you know that after its done it should call a tool.
All of these things could be plugins and be possible to be filled out via GUI. We could make Agents into a config entity, where you set these three things.
Create an config entity called AI Agent.
Add the field for system message.
Add a multiple field for Context, where any tool can be added and where you have to either file out with hard coded parameters, or where the provider should try to fill out.
Add a multiple field for the tools.
The plugin manager will have to also be able to load those configurations and wrap them in an object that can run the different agent stuff.
This requires the Function Calling and Normalized Structure to be there to work.
Active
1.0
Code