What is a Session?
A session is a single conversation between a user and an agent. When a user clicks “Start” or loads your agent, a session begins. The session includes:- Real-time video/audio - WebRTC connection via Daily.co
- Conversation state - The ongoing dialogue between user and agent
- Tool executions - Any tools the agent calls during the conversation
Single-Use vs Permanent agents: Single-Use agents can only have one session—the agent expires after it ends. Permanent agents can have unlimited sessions using the same agent ID.
Deployment Options
There are three ways to deploy your agents:Hosted Page
Instant deployment via meet.iwy.ai
Embeddable Widgets
Drop-in components for your website
Custom Integration
Full control with the Daily.co SDK
Option 1: Hosted Page
The fastest way to deploy—just share a URL.- Share a link via email, SMS, or QR code
- Embed in calendar invites
- Quick demos and testing
Works with both Single-Use and Permanent agent IDs.
Option 2: Embeddable Widgets
Drop-in web components that you embed directly in your website. The widgets handle all session management automatically—users just click to start. Repository: github.com/iwy-ai/live-widgets npm: @iwy/live-widgetsQuick Start
Add the script tag and component to your HTML:Via npm
Widget Options
| Attribute | Required | Description |
|---|---|---|
agentid | Yes | Your agent’s UUID (Single-Use or Permanent) |
- Customer support widget on your website
- Sales agent embedded in product pages
- Interactive demos in documentation
Option 3: Custom Integration
For full control over the UI and experience, use the/start-agent-session endpoint directly with the Daily.co SDK.
How It Works
- Call the API to get connection credentials
- Use Daily.co SDK to join the room with your own UI
- Handle events for custom behavior
Step 1: Get Session Credentials
| Field | Description |
|---|---|
roomUrl | Daily.co room URL for SDK connection |
dailyToken | Authentication token for the room |
webLink | Browser-accessible link (no SDK required) |
Step 2: Connect with Daily.co SDK
TypeScript/JavaScript:Daily.co SDK Resources
| Resource | Link |
|---|---|
| JavaScript SDK | docs.daily.co/reference/daily-js |
| React SDK | docs.daily.co/reference/daily-react |
| React Native SDK | docs.daily.co/reference/daily-react-native |
| iOS SDK | docs.daily.co/reference/ios |
| Android SDK | docs.daily.co/reference/android |
- Custom video UI matching your brand
- Mobile apps (iOS, Android, React Native)
- Advanced features (recording, transcription, custom controls)
- Integration with existing video infrastructure
Comparison
| Feature | Hosted Page | Widgets | Custom Integration |
|---|---|---|---|
| Setup time | None | 5 minutes | Hours |
| Custom UI | No | Limited | Full control |
| Code required | No | Minimal | Yes |
| Mobile apps | Browser only | Browser only | Native SDKs |
| Branding | iwy branded | Customizable | Fully custom |
| Best for | Quick sharing | Website embed | Custom apps |
Session Management Pipeline
What happens under the hood when a user starts a session?Sequence diagram showing iwy’s session management pipeline: agent provisioning, model orchestration, real-time WebRTC streaming, and analytics data flow. © iwy.ai 2025
Pipeline Steps
- Session Request - User clicks widget, visits URL, or your app calls the API
- Agent Provisioning - iwy loads the agent configuration
- Room Creation - Daily.co room is provisioned for WebRTC
- Model Orchestration - LLM, STT, TTS, and video models are initialized
- WebRTC Connection - Real-time audio/video stream established
- Conversation Loop - Speech → Text → LLM → Text → Speech → Video
- Analytics - Session data captured for insights
- Session End - Resources released, data persisted
Quick Reference
| Deployment | When to Use | Getting Started |
|---|---|---|
meet.iwy.ai/{id} | Share a link, quick demos | Just share the URL |
<live-avatar> widget | Embed on website | Add script + component |
/start-agent-session API | Custom UI, mobile apps | Call API + use Daily.co SDK |