- My goal: I need to establish a new chat session when the user changes context (dropdown selection)
- Issue: There does not appear to be a “Clear Chat” component control.
- Steps I've taken to troubleshoot: Retool Docs AI assistant suggests
agentChat.messages = []but this appears to be a read-only property. - Additional info: There is a similar thread here: Agent Chat Component - Clear History / Reset but I don’t want to bump a it as it dates back to last year.
Summary
Looking for a way to clear or reset the in-app Agent Chat component to start a fresh session when the context changes (e.g., a dropdown selection), since there's no obvious 'Clear Chat' control and setting agentChat.messages = doesn't work because the property is read-only.
AI Response
There is currently no native control, event handler, or method to clear or reset the in-app Agent Chat component. Retool staff have explicitly confirmed that the clearHistory() method works only for the LLM Chat component and is not available for the Agents Chat component, and an internal feature request has been filed to add this capability. Neither the product documentation nor the community threads surface a supported way to reset the Agent Chat in place, so until this is added the practical option is to trigger a page reload to start a new session.
Sources
Agent Chat Component - Clear History / Reset
Retool staff confirm clearHistory() does not work for the Agents Chat component (only the LLM Chat component) and that a feature request for a clear/reset capability has been filed internally.
The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a
,
, or
. Or by marking this post as the "Solution"! Let us know if you have any feedback here. ![]()
Hello there @beanaroo welcome to the Community! ![]()
Unfortunately there isn't an update for this (Agent Chat Component - Clear History / Reset) request yet. I'll add a +1 to the internal ticket, though to be upfront it's in our backlog for now, so I can't promise a timeline. I'll follow up here if anything changes. ![]()