Skip to content

Commit 38de718

Browse files
add introduction.mdx
1 parent bd6d79d commit 38de718

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { Meta } from '@storybook/addon-docs/blocks';
2+
3+
<Meta title="Agents UI/Introduction" />
4+
5+
# Agents UI
6+
7+
Agents UI is a set of components for building voice-first agents using LiveKit.
8+
9+
## Setup
10+
11+
Configure our registry in your project by adding the following to your projects `components.json` file:
12+
13+
```json | components.json
14+
{
15+
"registries": {
16+
"@agents-ui": "https://ui.livekit.io/r/{name}.json"
17+
}
18+
}
19+
```
20+
21+
## Installation
22+
23+
```bash
24+
pnpm dlx shadcn@latest add @agents-ui/{componentName}
25+
```
26+
27+
## Implementation Example
28+
29+
```tsx
30+
import { useSession } from '@livekit/components-react';
31+
import { TokenSource } from 'livekit-client';
32+
import { AgentSessionProvider } from '@agents-ui/agent-session-provider';
33+
import { AgentControlBar } from '@agents-ui/agent-control-bar';
34+
35+
export default function Example() {
36+
// using a sandbox token server for prototyping
37+
const session = useSession(TokenSource.sandboxTokenServer('token-XXXXXX'));
38+
39+
return (
40+
<AgentSessionProvider session={session}>
41+
<AgentControlBar />
42+
</AgentSessionProvider>
43+
);
44+
}
45+
```

0 commit comments

Comments
 (0)