Unity dev - CLI agent works, but not cloud agent

I’m very new to LiveKit and am currently working on an app in Unity with a LiveKit agent integration. The integration is to some degree based on the Agents example from the LiveKit Github repo. Agents deployed with the CLI works perfectly when running the Unity app, but agents that were configured in LiveKit cloud doesn’t seem to join the room when running the app, and it is not possible to talk to them.

What could be causing this?

Secondly, it seems like agents created with the CLI can’t be edited in the cloud. How come?

Any help would be greatly appreciated!

Hi, I can see you have an unnamed cloud agent associated with your project, which means it will be automatically dispatched when a participant joins a room. By default, the agents created with the web builder will be named, so need to be explicitly dispatched. Please see Agent dispatch | LiveKit Documentation, I believe that will explain the discrepancy.

Secondly, it seems like agents created with the CLI can’t be edited in the cloud. How come?

No real technical reason, but from Agent Builder | LiveKit Documentation

The LiveKit Agent Builder lets you prototype and deploy simple voice agents through your browser, without writing any code. It’s a great way to build a proof-of-concept, explore ideas, or stand up a working prototype quickly.

So, online code editing just isn’t how we currently position our agent builder

Thank you so much for the reply!

It seems that is the cause. Unnamed agents work with the Unity app, but not the named agents. However, I am failing to find where in the LiveKit Unity SDK the code for explicit dispatch is. But, maybe that’s a question for that GitHub..

As for my question regarding editing, I was wondering about the unnamed agents made with the CLI, and why these can’t be edited in the web agent builder. But perhaps they can be, if they are named?

However, I am failing to find where in the LiveKit Unity SDK the code for explicit dispatch is

The explicit dispatch isn’t part of the Unity SDK. There are multiple ways to dispatch an agent explicitly, but in your case I think including it in the token would be most appropriate: Tokens & grants | LiveKit Documentation

But, maybe that’s a question for that GitHub.

You mean GitHub copilot? Definitely recommend connecting to our MCP if you haven’t already done so, LiveKit Docs MCP Server | LiveKit Documentation. It knows more than me :slight_smile:

As for my question regarding editing, I was wondering about the unnamed agents made with the CLI, and why these can’t be edited in the web agent builder. But perhaps they can be, if they are named?

We just don’t support code editing in the builder full stop. The code display is to copy / paste / download, and it will update as you configure the agent with the UI, but it only works one way. It defaults to named agents because that is what we recommend - unnamed agents with automatic dispatch, though easier to get started with, can lead to a lot of confusion in production - there are a lot of questions like “I have a random agent joining my call and I don’t know where it has come from”