My agent webapp using copilotkit+ag-ui(crewai), about 20% of conversions disconnected when user uses it. This has seriously affected normal use. Some Info:
- frontend deployed on vercel and backend deployed on aws
- long-term task above 1 min is easy to disconnect
- The network is good, when disconnection happened, backend is still running, but frontend disconnected
- I checked the source code of copilotkit, seems that you are not following the standard SSE protocol. The frontend only uses fetch to establish a connection with the backend service, but there is no disconnection retry mechanism or other means to ensure that the frontend can receive messages correctly.
How to solve this issue?