Lava Filters - AgentToolHistoryContent

Category:AI Agent

Description:Replaces the content that will be used for the hidden chat history with the supplied value. This allows the normal payload to be used for this request by the agent to construct the response but a different content object to be stored in history when processing follow up chat messages.
Input:
Lava: {% assign message = 'The changes you requested have been made.' %} {% capture history %}Saved the group with IdKey {{ group.IdKey }}{% endcapture %} {{ 'Success' | AgentToolResult:message | AgentToolHistoryContent:history }}
Output: