This is a starter template for LiveKit Agents that provides an example of how you might approach building web embed using the LiveKit JavaScript SDK. It supports voice and transcriptions.
This template is built with Next.js and is free for you to use or modify as you see fit.
Tip
If you'd like to try this application without modification, you can deploy an instance in just a few clicks with LiveKit Cloud Sandbox.
Run the following command to automatically clone this template.
lk app create --template agent-starter-embed
Then run the app with:
pnpm install
pnpm build-embed-popup-script # Builds the embed-popup.js script
pnpm dev
Open http://localhost:3000 in your browser to experience the 2 embeddable demos.
You'll also need an agent to speak with. Try our starter agent for Python, Node.js, or create your own from scratch.
Note
If you need to modify the LiveKit project credentials used, you can edit .env.local
(copy from .env.example
if you don't have one) to suit your needs.
http://localhost:3000 will respond to code changes in real time through NextJS Fast Refresh to support a rapid iteration feedback loop.
Any code changes you see locally will not be reflected in embed-popup.js
until you run pnpm build-embed-popup-script
.
You can test your latest build of embed-popup.js
at http://localhost:3000/popup.
This template is open source and we welcome contributions! Please open a PR or issue through GitHub, and don't forget to join us in the LiveKit Community Slack!