Skip to main content

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
Sessions end when the user disconnects, closes the tab, or the connection times out.
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.
When someone visits this URL with a valid agent ID, a session starts automatically. No code required. Use cases:
  • Share a link via email, SMS, or QR code
  • Embed in calendar invites
  • Quick demos and testing
Example:
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-widgets

Quick Start

Add the script tag and component to your HTML:
That’s it. When a user clicks the widget, a session starts automatically.

Via npm

Widget Options

Use cases:
  • Customer support widget on your website
  • Sales agent embedded in product pages
  • Interactive demos in documentation
The widget calls the /start-agent-session endpoint automatically when clicked. You don’t need to make any API calls yourself.

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

  1. Call the API to get connection credentials
  2. Use Daily.co SDK to join the room with your own UI
  3. Handle events for custom behavior

Step 1: Get Session Credentials

Response:

Step 2: Connect with Daily.co SDK

TypeScript/JavaScript:
React:

Daily.co SDK Resources

Use cases:
  • Custom video UI matching your brand
  • Mobile apps (iOS, Android, React Native)
  • Advanced features (recording, transcription, custom controls)
  • Integration with existing video infrastructure

Comparison


Session Management Pipeline

What happens under the hood when a user starts a session? iwy session management pipeline -- light mode

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

  1. Session Request - User clicks widget, visits URL, or your app calls the API
  2. Agent Provisioning - iwy loads the agent configuration
  3. Room Creation - Daily.co room is provisioned for WebRTC
  4. Model Orchestration - LLM, STT, TTS, and video models are initialized
  5. WebRTC Connection - Real-time audio/video stream established
  6. Conversation Loop - Speech → Text → LLM → Text → Speech → Video
  7. Analytics - Session data captured for insights
  8. Session End - Resources released, data persisted

Quick Reference


Support

Need help? Contact us