Skip to content

Commit dce9843

Browse files
Readme updates
1 parent d4c6251 commit dce9843

File tree

6 files changed

+93
-5
lines changed

6 files changed

+93
-5
lines changed
-3.21 MB
Binary file not shown.
42.9 KB
Loading
53.8 KB
Loading
21.6 KB
Loading
28 KB
Loading

README.md

Lines changed: 93 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,61 @@
1-
<img src="./.github/assets/app-icon.png" alt="Voice Assistant App Icon" width="100" height="100">
2-
31
# Web Embed Agent Starter
42

53
This is a starter template for [LiveKit Agents](https://docs.livekit.io/agents) that provides an example of how you might approach building web embed using the [LiveKit JavaScript SDK](https://github.com/livekit/client-sdk-js). It supports [voice](https://docs.livekit.io/agents/start/voice-ai) and [transcriptions](https://docs.livekit.io/agents/build/text/).
64

75
This template is built with Next.js and is free for you to use or modify as you see fit.
86

9-
![App screenshot](/.github/assets/frontend-screenshot.png)
7+
<picture>
8+
<source srcset="./.github/assets/readme-hero-dark.webp" media="(prefers-color-scheme: dark)">
9+
<source srcset="./.github/assets/readme-hero-light.webp" media="(prefers-color-scheme: light)">
10+
<img src="./.github/assets/readme-hero-light.webp" alt="App screenshot">
11+
</picture>
12+
13+
### Features:
14+
15+
- Real-time voice interaction with LiveKit Agents
16+
- Camera video streaming support
17+
- Screen sharing capabilities
18+
- Audio visualization and level monitoring
19+
- Virtual avatar integration
20+
- Light/dark theme switching with system preference detection
21+
- Customizable branding, colors, and UI text via configuration
22+
23+
This template is built with Next.js and is free for you to use or modify as you see fit.
24+
25+
### Project structure
26+
27+
```
28+
agent-starter-react/
29+
├── app/
30+
│ ├── (app)/
31+
│ ├── (iframe)/
32+
│ ├── api/
33+
│ ├── test/
34+
│ ├── favicon.ico
35+
├── components/
36+
│ ├── embed-iframe/
37+
│ ├── embed-popup/
38+
│ ├── livekit/
39+
│ ├── ui/
40+
│ ├── popup-page.tsx
41+
│ ├── root-layout.tsx
42+
│ └── theme-toggle.tsx
43+
│ └── welcome.tsx
44+
│ └── ...
45+
├── hooks/
46+
├── lib/
47+
├── public/
48+
├── styles/
49+
└── package.json
50+
```
1051

1152
## Getting started
1253

1354
> [!TIP]
1455
> If you'd like to try this application without modification, you can deploy an instance in just a few clicks with [LiveKit Cloud Sandbox](https://cloud.livekit.io/projects/p_/sandbox/templates/agent-starter-embed).
1556
57+
[![Open on LiveKit](https://img.shields.io/badge/Open%20on%20LiveKit%20Cloud-002CF2?style=for-the-badge&logo=external-link)](https://cloud.livekit.io/projects/p_/sandbox/templates/agent-starter-embed)
58+
1659
Run the following command to automatically clone this template.
1760

1861
```bash
@@ -34,15 +77,60 @@ You'll also need an agent to speak with. Try our starter agent for [Python](http
3477
> [!NOTE]
3578
> 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.
3679
80+
## Configuration
81+
82+
This starter is designed to be flexible so you can adapt it to your specific agent use case. You can easily configure it to work with different types of inputs and outputs:
83+
84+
#### Example: App configuration (`app-config.ts`)
85+
86+
```ts
87+
export const APP_CONFIG_DEFAULTS = {
88+
sandboxId: undefined,
89+
agentName: undefined,
90+
91+
supportsChatInput: true,
92+
supportsVideoInput: true,
93+
supportsScreenShare: true,
94+
isPreConnectBufferEnabled: true,
95+
96+
accent: '#002cf2',
97+
accentDark: '#1fd5f9',
98+
};
99+
```
100+
101+
You can update these values in [`app-config.ts`](./app-config.ts) to customize branding, features, and UI text for your deployment.
102+
103+
#### Environment Variables
104+
105+
You'll also need to configure your LiveKit credentials in `.env.local` (copy `.env.example` if you don't have one):
106+
107+
```env
108+
LIVEKIT_API_KEY=your_livekit_api_key
109+
LIVEKIT_API_SECRET=your_livekit_api_secret
110+
LIVEKIT_URL=https://your-livekit-server-url
111+
112+
NEXT_PUBLIC_CONN_DETAILS_ENDPOINT=http://localhost:3000/api/connection-details
113+
```
114+
115+
These are required for the voice agent functionality to work with your LiveKit project.
116+
37117
## Local Development
38118

39119
http://localhost:3000 will respond to code changes in real time through [NextJS Fast Refresh](https://nextjs.org/docs/architecture/fast-refresh) to support a rapid iteration feedback loop.
40120

41121
## Production deployment of embed-popup.js script
42122

43-
Any code changes you see locally will not be reflected in `embed-popup.js` until you run `pnpm build-embed-popup-script`.
123+
Once your environment is set up and you've made any configuration changes, you can copy the embed code generated on the welcome page of your LiveKit Sandbox and paste it into your website.
124+
125+
> [!IMPORTANT]
126+
> When implementing the iframe embed or popup embed into your own website, use the embed code generated on the welcome page of your LiveKit Sandbox.
127+
128+
## Debugging the build of embed-popup.js script
129+
130+
You can test and debug your latest build of `embed-popup.js` locally at http://localhost:3000/test/popup.
44131

45-
You can test your latest build of `embed-popup.js` at http://localhost:3000/popup.
132+
> [!IMPORTANT]
133+
> Code changes you make locally will not be reflected in the bundled `embed-popup.js` script until you run `pnpm build-embed-popup-script`.
46134
47135
## Contributing
48136

0 commit comments

Comments
 (0)