How to connect my react native frontend to agent r...
# ask-ai
s
How to connect my react native frontend to agent running locally using
uv run main.py dev
t
Thanks for reaching out, Kostya. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi there! To help you connect your React Native frontend to a locally running agent using
uv run main.py dev
, here’s a simple step-by-step guide: 1. Start with the React Native starter template for LiveKit, which already has the SDK integrated for you. You can easily create a new app using the LiveKit CLI like this:
Copy code
lk app create --template agent-starter-react-native --sandbox <token_server_sandbox_id>
1. Next, install the dependencies and run the app on your device or simulator:
Copy code
npm install

# Android
npx expo run:android

# iOS
npx expo run:ios
1. Then, update the connection details in
hooks/useConnectionDetails.ts
so they point to your LiveKit project. For development, you can either use a sandbox token server or generate a URL and token manually. 2. Make sure your agent is up and running with
uv run main.py dev
, connected to the same LiveKit project. When you’re ready for production, you’ll want to set up your own token server and update those connection details accordingly. If you run into any questions or need a hand with any of these steps, just let me know—I’m here to help! Sources: README.md | Voice AI quickstart | LiveKit Docs | README.md | README.md