LiveKit embed · SvelteKit
This is the hello-world integration. Fork it, run locally, and drop the same embed into your product shell.
From the repo root, ./start runs all examples (or ./start sveltekit / ./start nextjs / ./start react-vite for those frameworks). To run only this one:
cd examples/livekit-embed/sveltekit
npm install
npm run dev
# http://localhost:4009 Local URL: http://localhost:4009
The demo uses a single public experience id
(exp_01EXAMPLES_COFFEE_BARISTA) written directly in the page.
Import the Svelte component and pass one experience id:
<script>
import { Experience } from '@liforma/client/svelte';
</script>
<Experience experienceId="exp_01EXAMPLES_COFFEE_BARISTA" /> src/lib/helloByo.ts — copy into your product — startByoSpeech (thin SDK call)src/routes/+page.svelte — demo scaffolding only (Connect / Start UI)src/routes/api/livekit-token/+server.ts — demo token mintUse the Liforma LiveKit embed SvelteKit example as source material.
Source repo folder: examples/livekit-embed/sveltekit
Copy `src/lib/helloByo.ts` (`startByoSpeech` → `connectLiveKitAgent`) into your product — that is the integration.
`src/routes/+page.svelte` is demo scaffolding only.
Preserve:
- `<Experience />` from `@liforma/client/svelte` in presenter mode with `speechInputMode="off"`
- `startByoSpeech(experience, { url, token })` after audio unlock (thin wrapper over `connectLiveKitAgent`)
- participant token minted on a server route (never ship LIVEKIT_API_SECRET to browsers)
- peer dependency `livekit-client`
- TypeScript and normal CSS (no Tailwind)
Adapt:
- branding
- experience id
- LiveKit room / agent identity filter
- production token-mint backend