Session Basics
Each conversation has a unique session ID:Persisting Sessions
Web (localStorage)
React Native (AsyncStorage)
Loading a Session
UseloadSession to restore a previous conversation:
Listing Sessions
View all sessions for the current user:Session Details
Get full session information:Updating Sessions
Update session metadata:Deleting Sessions
Clearing Current Session
Start a new conversation without deleting the old one:Reconnection
If streaming was interrupted, reconnect to resume:Session State
Check session streaming state:Multi-Session UI
Build a chat interface with session history:Best Practices
Save session ID to persistent storage after it’s created
Check session status before reconnecting
Provide UI to switch between sessions
Allow users to rename and organize sessions
Implement session cleanup for old/unused sessions
Handle session loading errors gracefully