WayloAIWaylo Docs
Web SDK

Overview

Connect a web page to a Waylo Voice agent.

import { WayloVoice } from '@waylovoice/client';

const wayloVoice = new WayloVoice({ sessionEndpoint: '/api/waylo/session' });
await wayloVoice.start({ agentId: 'your-agent-id' }); // from a click

@waylovoice/client connects a web page to a Waylo Voice agent. The page names the agent. The SDK asks your own server for a call session, joins the call, turns on the microphone and plays the agent's voice. Connection details never reach your page code.

It is framework-free TypeScript (ESM, types included) and works with any front end.

How a call connects

PartRuns inWhat it does
Web SDK (@waylovoice/client)The visitor's browserJoins the call, turns on the microphone, plays the agent's voice, reports status, captions and errors.
Session endpointYour serverChecks your own login, then creates a call session with the Waylo API and your API key.

The browser asks your server for a session. Your server asks the Waylo API. The browser then joins the call on the Waylo call server (WebRTC).

Requirements

  • Recent Chrome, Edge, Firefox or Safari, desktop or mobile.
  • The page served over HTTPS, or from localhost. Other plain-http pages get no microphone.
  • A bundler (Vite, esbuild, webpack…) to resolve the import.
  • A session endpoint on your server.

Install

npm i @waylovoice/client
# or
pnpm add @waylovoice/client

For AI coding assistants

The package ships llms.txt (node_modules/@waylovoice/client/llms.txt), a one-file summary of the SDK. A copy is at /sdk/llms.txt.

Security

  • Your Waylo API key stays on your server.
  • In your session endpoint, check the user's login, their permission to use the agent, and CSRF. metadata comes from the browser, so forward only the keys you expect.

On this page