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"