Error occurred while integrating CopilotKit with agno v2.0

I am using CopilotKit + agui to integrate with agno, following the official examples. When the agent has no tools configured, everything works successfully. However, as soon as any tool is configured (even just one), regardless of whether the output is streaming or non-streaming, I encounter the following error:

Cannot send event type ‘TOOL_CALL_START’ after ‘TEXT_MESSAGE_START’: Send ‘TEXT_MESSAGE_END’ first.

I am using agno v2.0, and the CopilotKit versions are:

"@ag-ui/agno": "^0.0.2",
"@copilotkit/react-core": "^1.10.4",
"@copilotkit/react-ui": "^1.10.4",
"@copilotkit/runtime": "^1.10.4",
"next": "15.5.3"

Hey @tom, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.If it’s urgent, please let us know. We appreciate your patience!

Hey @tom ! We recently released fix for this in our new 2.0.5 release

It works after the update. Thank you very much!