I would like to provide a similar interface as the agent test chat page here where the user can start a new chat, interact with an agent and also look at/continue past interactions. I am fairly new to Retool so I am not sure if there is an out of box solution that does all of this that I can publish as a standard app to a user?
As a workaround, I am a building an app with the agent chat component where I am storing the interactions in a database.
I can see the messages array in the state of the agent chat component and was wondering if there is a way to set this dynamically on an event? The idea is to be able to load the history of the conversation if that makes sense. I can see there are actions to approve a tool etc but not to load message history. Is there a way to do this via a script?
Hey Eric - out of curiosity, if you're looking for the same functionality that is present on the agent chat page, why not just have the user directly use that page?
To your specific question, right now, you could build a bespoke chat UI composed of Retool components that programmatically interacts with the Agent resource query, similar to the AI chat template (image below). However, there is a gap in being able to both a) use the agent chat, and b) manage messages and threads yourself.
I think the simplest solution is that we should optionally allow you to have the exact same thread UI present in the agent chat component as we have in the built-in agent chat. Would that solve the core issue here?
You are right. After reading the docs in more detail, I can set the user permission at the agent level and this should allow the user to access the agent chat page securely for the time being.
Regarding your last point, having the option to have the same agent component UI available in the AI chat template would be ideal. It would enable us to deploy different branded apps across the business while maintaining a consistent UX and supporting features like tool approval and details of agent reasoning.