Suggested Topology
Run the SDK on your backend, then call it from your frontend. This extra hop is recommended because it keeps auth/token logic on the backend and makes persistence simpler.Backend requirements
Your backend layer needs to handle:- Long-running connections: prompts can take minutes.
- Session affinity: follow-up messages must reach the same session.
- State between requests: session metadata and event history must persist across requests.
- Graceful recovery: sessions should resume after backend restarts.