Hii, I installed the CLI, created the sandbox in m...
# ask-ai
d
Hii, I installed the CLI, created the sandbox in my account. Running
lk app create --template agent-starter-flutter --sandbox <sandbox-ID>
results in "template not found: agent-starter-flutter" output. When I just ran the command:
lk app create --sandbox <sandbox-ID>
, the only template available is '`agent-starter-embed`' Am I doing anything wrong? Please advise.
t
Thanks for reaching out, Inna. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like you're seeing the error "template not found: agent-starter-flutter" because the
agent-starter-flutter
template is meant to be used within a LiveKit Sandbox environment. To make it work, you'll need to use the
--sandbox
flag along with a valid sandbox ID. Let's walk through the steps together to get this sorted out: 1. First, make sure you're logged in by running
lk cloud auth
and completing the login process. 2. Next, check your LiveKit Cloud dashboard under the Sandbox section to confirm your sandbox exists and copy its ID. 3. Then, run the command with your sandbox ID like this:
lk app create --template agent-starter-flutter --sandbox <sandbox-ID>
4. If you're still running into trouble, try listing the available templates using
lk app list-templates
to see if the template is accessible. 5. Also, double-check that you're using the latest version of the LiveKit CLI to avoid any compatibility issues. If after all this the problem continues, no worries! You can manually clone the template from GitHub (agent-starter-flutter) and set it up locally. Please feel free to reach out if you need any more help—I’m here for you! Sources: README.md | README.md | autocomplete/fish_autocomplete | Sandbox | LiveKit Docs | Docs::Home
d
give me an example of sandbox ID
t
Hey there! A sandbox ID usually looks like a unique name or identifier you chose when setting up your sandbox in the LiveKit Cloud dashboard. For example, it might be something like: •
my-sandbox
test-environment
flutter-sandbox
You can easily find your sandbox ID by heading over to the Sandbox section in the LiveKit Cloud dashboard. If you’d like, I’m here to help you find it—just let me know!
d
lk app create --template agent-starter-flutter --sandbox example-1bxwp2 Using project [innazh] template not found: agent-starter-flutter
t
It looks like you're encountering the error "template not found: agent-starter-flutter," which can happen if the template isn't set up as a child template for your specific sandbox. No worries—let's work through this together! Here are some helpful steps to try: 1. First, try creating the app without using the
--sandbox
flag to check if the template is generally available:
lk app create --template agent-starter-flutter my-flutter-app
2. If that works, the next step is to configure your app to use your sandbox by setting the
LIVEKIT_SANDBOX_ID
environment variable in a local
.env
file or by passing it as a command-line argument when you run the app. 3. If you’re still running into issues, please make sure your CLI is up-to-date and that your network connection allows access to the template repository. Please don’t hesitate to reach out if you need any more help—I’m here to support you! Sources: templates.yaml | cmd/lk/app.go | .env.example
d
Now when I launch the call, I don't hear anything. It lingers for a few seconds and then reverts back to the welcome screen.
t
I'd love to help you get to the bottom of why the call is reverting to the welcome screen. Could you please share a bit more about your setup? For example: • Are you working with the
agent-starter-flutter
template, or have you built a custom implementation? • Is this happening on a particular platform, like iOS, Android, or the web? • Do you see any error messages or logs when the issue pops up? • Have you had a chance to double-check that your sandbox and token server are set up correctly? With these details, I’ll be better equipped to help you find the right solution. Looking forward to your response!
d
working with agent-starter-flutter template. This is happening on iPhone16 I'm not seeing any errors. I've created a sandbox, what's a token server? What do I have to do? Here are my logs: flutter: 164025: [SignalEvent] Instance of 'SignalParticipantUpdateEvent' flutter: 164025: LocalParticipant.updateFromInfo(info: sid: PA_dJgo4Pk7DZhP flutter: identity: seamless-kernel flutter: state: ACTIVE flutter: tracks: { flutter: sid: TR_AMasP8p8yhQyHU flutter: name: microphone flutter: source: MICROPHONE flutter: mimeType: audio/opus flutter: mid: 1 flutter: codecs: { flutter: mimeType: audio/opus flutter: mid: 1 flutter: cid: CF825434-4B4C-4335-B179-6FC2D018B787 flutter: } flutter: disableRed: true flutter: stream: camera flutter: version: { flutter: unixMicro: 1757882425701643 flutter: } flutter: } flutter: joinedAt: 1757882425 flutter: version: 4 flutter: permission: { flutter: canSubscribe: true flutter: canPublish: true flutter: canPublishData: true flutter: canUpdateMetadata: true flutter: } flutter: region: oashburn1b flutter: isPublisher: true flutter: joinedAtMs: 1757882425247 flutter: ) 2 flutter: 164025: [EngineEvent] Engine#79483507 Instance of 'PublisherDataChannelStateUpdatedEvent' 2 flutter: 164025: [EngineEvent] Engine#79483507 Instance of 'SubscriberDataChannelStateUpdatedEvent' flutter: 164030: [SignalEvent] Instance of 'SignalConnectionQualityUpdateEvent' flutter: 164035: [SignalEvent] Instance of 'SignalRoomUpdateEvent' flutter: 164035: Event => RoomContext: RoomMetadataChangedEvent sbx-1bxwp2-aVLmUmxCq2wnC4BD5ofQ8f metadata = flutter: 164035: UI > ParticipantSelector for sbx-1bxwp2-aVLmUmxCq2wnC4BD5ofQ8f flutter: 164035: UI => participant seamless-kernel, index: 0 flutter: 164035: UI => TrackSource.microphone track TR_AMasP8p8yhQyHU for seamless-kernel flutter: 164035: UI > ParticipantSelector for sbx-1bxwp2-aVLmUmxCq2wnC4BD5ofQ8f flutter: 164035: UI => participant seamless-kernel, index: 0 flutter: 164035: UI => TrackSource.microphone track TR_AMasP8p8yhQyHU for seamless-kernel
t
Let's get this issue sorted out together by setting up a token server for your sandbox. Here’s a simple guide to help you through the process: 1. Create a Sandbox Token Server: Head over to your LiveKit Cloud dashboard and enable a Sandbox Token Server for your project. This step is key to getting things up and running smoothly. 2. Set Up the Flutter App: If you haven’t done this yet, just run the following command to connect your app with the sandbox:
lk app create --template agent-starter-flutter --sandbox <your-sandbox-id>
3. Manual Configuration: If you’d rather set things up manually, no worries! Here’s how: ◦ Clone the repository by running:
git clone <https://github.com/livekit-examples/agent-starter-flutter.git>
◦ Create a
.env
file in the root of your project and add your sandbox ID like this:
LIVEKIT_SANDBOX_ID=<your-sandbox-id>
◦ This tells the app to fetch the connection details directly from the LiveKit Cloud sandbox API. 1. Run the App: Finally, install the dependencies and launch your app with:
flutter pub get
flutter run
If you have any questions or hit any bumps along the way, just let me know—I’m here to help! Sources: .env.example
d
are sandbox and token server the same thing then?
t
Thanks for reaching out! I’d love to help clarify the difference between a sandbox and a token server—they’re related but serve different purposes: • Sandbox: Think of the sandbox as your safe testing playground within LiveKit Cloud. It lets you try out features and tweak configurations without worrying about impacting your live environment. It’s a great space to develop and experiment freely. • Token Server: This is the service that creates the authentication tokens your clients need to join LiveKit rooms. When you’re working in the sandbox, LiveKit conveniently provides a built-in token server to make things easier, so you don’t have to set up your own during testing. For your setup, since the sandbox already includes a token server, you’ll want to make sure your app is configured to use that token server for authentication. If anything feels unclear or you want to dive deeper, just let me know—I’m here to help!
d
template agent-starter-flutter soooo i can see my speech is beaing detected & I can send messages in text also buuuut, isn't an ai agent supposed to be talking to me back? He's not there. I cannot hear anything.
t
Hey there! To get the AI agent in the
agent-starter-flutter
template up and running smoothly, you'll need a backend voice AI agent to handle speech-to-text, language modeling, and text-to-speech. Here’s a friendly guide to help you enable AI agent responses: 1. Deploy a Backend AI Agent: You can choose from compatible backend templates like:Just run this command to set it up:
lk app create --template agent-starter-python my-python-agent
◦ Python:
agent-starter-python
◦ Node.js:
agent-starter-node
1. Configure Backend Environment: Don’t forget to add your necessary API keys (like Deepgram, OpenAI, Cartesia) into the backend’s
.env.local
file. This step is super important! 2. Connect Both Frontend and Backend to the Same Room: Make sure your Flutter app and backend agent join the same LiveKit room. This way, the backend can listen to your microphone track and respond to you in real time. 3. Use the Sandbox Token Server: For development, the sandbox token server makes authentication much easier. Just ensure both frontend and backend use the same sandbox ID. If you’d like, I’m here to help you with setting up the backend or configuring the environment—just let me know! Sources: README.md | Bootstrapping an application | LiveKit Docs | templates.yaml | Web and mobile frontends | LiveKit Docs
d
how can I make sure they connect to the same room? my token server - https://xxxxx-1e7723.sandbox.livekit.io/ what are LIVEKIT_URL= LIVEKIT_API_KEY= LIVEKIT_API_SECRET=? Where do I get those?
t
To make sure your frontend and backend connect smoothly to the same LiveKit room, it’s important that both use the exact same
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
. Here’s a simple way to get everything set up: 1. Obtain Credentials: Head over to your LiveKit Cloud dashboard, find your project, and you’ll see these values in the project settings. 2. Set Environment Variables: Add these credentials to the
.env
files for both your frontend and backend:
LIVEKIT_URL=<your-sandbox-url>
LIVEKIT_API_KEY=<your-api-key>
LIVEKIT_API_SECRET=<your-api-secret>
3. Use the Same Room Name: Make sure both frontend and backend use the same room name when connecting. This way, they’ll join the exact same session. 4. Verify Configuration: Double-check that these environment variables are properly loaded in both parts to prevent any connection hiccups. If you’d like, I’m here to help you find these credentials or walk through setting up the environment files. Just let me know! Sources: web/.env.sample | .env.example | .env.example | .env.example | complex-agents/drive-thru/frontend/.env.example
d
let me clarify, if I have my own elevenlabs agent, can I connect it to the room or does livekit provide its own agents with the sdk only? also, how do I get the room name? it's only known at creation time?
t
Absolutely, you can connect a custom ElevenLabs agent (or any custom agent) to a LiveKit room. Here’s a friendly guide on how to do it: 1. Dispatching the Agent: You have a couple of ways to dispatch the agent to a room: ◦ Access Token: You can include the agent dispatch in the participant's access token configuration. This way, when the participant joins, the agent will be automatically dispatched to the same room. ◦ API: Alternatively, you can use the LiveKit API to create an agent dispatch request, just specify the agent name and the target room. 1. Room Name: It’s important to know the room name at the time of creation. This could be predefined or generated by your application logic when you request a token or start a session. Unfortunately, there isn’t an API to discover a room name after creation. 2. Agent Room Access: While running, the agent can access the room name programmatically using
ctx.room.name
. If you’d like, I’m here to help you set up the dispatch or work through generating tokens for your custom agent. Just let me know! Sources: Dispatching agents | LiveKit Docs | Agent dispatch | LiveKit Docs | examples/agent_dispatch.py | ivr-nagivator/frontend/src/App.tsx | complex-agents/ivr-agent/ivr-agent-frontend/src/App.tsx
d
Does livekit support multiple rooms / connections out of the box? For example: I have an app, a user can decide to initiate a call / room any time. In the room it's only a user and agent. There can be many rooms like this at the same time.
t
Absolutely, LiveKit is built to support multiple rooms and simultaneous connections right from the start. It’s designed to comfortably handle a large number of concurrent rooms, especially when set up with Redis for smart routing and load balancing. For your situation, where each room includes one user and one agent, LiveKit can easily manage many of these rooms at the same time. Each room works independently, and agents can be assigned to join specific rooms whenever needed. Plus, the platform allows you to run multiple agent instances at once to smoothly manage all these sessions. Please feel free to reach out if you’d like some help with setting up or scaling your application for this scenario—I’m here to support you! Sources: Anatomy of an Agent | LiveKit Docs | test/lktest/livekit.go | Quotas and limits | LiveKit Docs | Distributed Setup | LiveKit Docs | Anatomy of an Agent | LiveKit Docs