File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
docs/storybook/stories/agents-ui Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments