ai_agents_debugger
Note that extensive parts of this module, most of the React app and some of the backend was generating via AI coding agents under supervision.
The Agent Explorer that is included in the Agents module, was initially built for the coded agents and was retrofitted for the new ReACT agents that we are using now. This means it was always limited with how we could use it, but it will be kept for backwards compability.
This new debugger is better in every possible way. It offers three different views on how you can see the flow of the agent:
List View - Everything happening sequentially from start to finish, including things that was not obvious to see in the Agents Explorer like tool output etc.
Graph View - Watch in a graph how the different actions affect each other, to get a visual understanding of what is happening.
Sequence Diagram - If you have agents talking to other agents, this will visualize the flow of conversation between the agents.
The list view in action
The graph view in action
Example of a Sequence Diagram where an assistant is talking to multiple agents.
Features
Outside of showing what the agents are doing the following extra functionality currently exists:
- Click on any action to get verbose data.
- Spoof tokens for any agent that takes tokens that might not be available.
- Use any model of choice.
- Import and export any run, meaning you can run it on production and rerun it in dev.
- Edit the system prompts directly in the debugger to retry with other system prompts.
- Talk to your flow - if you have the AI Agent Handler Agent installed, you can ask it to improve your agent based on the context from the run or ask it questions about it
Post-Installation
- Give the right permissions.
- Visit the agent list.
- Click Debug.
Recommended modules/libraries
Documentation
Currently there is just a video: https://youtu.be/2RC13FFo1rQ
Roadmap
The following are ideas to add to the debugger:
- Step through - so you can move back and forth through the loops and rerun them.
- Spoof tool output text - try different tool output text to see how it affects the agent.
- Chatbot extractor - will add a button to the chatbot to export a file, so you can import it into the debugger.
Note, we need https://www.drupal.org/project/ai/issues/3572838 to be merged into AI for chat history to work.