Deploy a sandbox app • LiveKit Agents Docs • LiveKit Cloud • Blog
A simple example AI voice assistant using the LiveKit Swift SDK.
This example is made for iOS, iPadOS, macOS, and visionOS.
The easiest way to get started is to use the LiveKit CLI. Run the following command to bootstrap this template:
lk app create --template voice-assistant-swift [--sandbox <sandboxID>]
Then follow instructions to set up an agent for your app to talk to.
Clone the repository and then either create a VoiceAssistant/.env.xcconfig
with a LIVEKIT_SANDBOX_ID
(if using a hosted Token Server via Sandboxes), or open TokenService.swift
and add your manually generated URL and token.
Then follow instructions to set up an agent for your app to talk to.
In production, you will want to host your own token server to generate tokens in order for users of your app to join LiveKit rooms. But while prototyping, you can either hardcode your token, or use a hosted Token Server via Sandboxes).
This example app requires an AI agent to communicate with. You can use one of our example agents in livekit-examples, or create your own following one of our agent quickstarts.