I am building an agent using deepagents and the auto-summarization middleware is useful for long threads, but from what I can tell, there is no way to differentiate the human messages created by this summarization middleware from an actual human message.
This makes it impossible to differentiate these in the client (frontend using useStream()) and hide these from the user. Is there some sort of way to identify or filter these out agent-side or client-side?
[{
"content": "now Langchain",
"additional_kwargs": {},
"response_metadata": {},
"type": "human",
"name": null,
"id": "4bf61c30-bdfd-47f4-ae12-347e3a8f6d36"
},
{
"content": "Here is a summary of the conversation to date:\n\n# Extracted Context\n\n## User's Request Pattern\nUser is requesting one-paragraph investment briefs for fintech/enterprise software companies, following this format:...<remainder of summary omitted>",
"additional_kwargs": {},
"response_metadata": {},
"type": "human",
"name": null,
"id": "a45c61dc-a363-4da8-9a9b-2ef49d476bbd"
}]