simulate: identify runs by the livekit.toml agent name - #972
Open
u9g wants to merge 3 commits into
Open
Conversation
`lk agent create` and `lk agent config` write [agent] name alongside id. The prebuilt-image create path calls CreateAgent directly since the SDK's RegisterAgent wrapper drops the name from the response.
u9g
force-pushed
the
jason/toml-agent-name
branch
from
September 11, 2026 15:12
86d5c39 to
05dcc7a
Compare
Contributor
Author
|
Demo of the change: without a toml-agent-name-fixed.mp4 |
The run's agent_name is now [agent] name from livekit.toml, stable across runs so the dashboard can filter and group by agent; simulate refuses to spawn without it. The throwaway name a locally spawned worker registers under travels separately as dispatch_agent_name. With --agent-name, the live agent's name is dispatched to, and a livekit.toml in the working directory still supplies the identity when present.
Contributor
Author
|
Follow-up to the demo: the missing-toml error now scans the project's Python/JS source for the literal name the agent registers under ( OutputFalls back to |
u9g
force-pushed
the
jason/toml-agent-name
branch
from
September 11, 2026 15:16
05dcc7a to
e1bf524
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Simulation runs are filtered and grouped by
agent_namein the cloud dashboard, but whenlk agent simulatespawns the agent locally it sends the throwawaysimulation-<random>dispatch name in that field. Every run gets a unique name, so filtering by agent groups nothing. The random name itself is required: the local worker must not collide with the deployed agent's dispatch name.Depends on livekit/protocol#1793 (already pinned in go.mod at its branch SHA; re-pin once merged).
What
Commit 1:
[agent] namein livekit.toml.lk agent createandlk agent configwrite the agent's name next to its id. The prebuilt-image create path now callsCreateAgentdirectly because the SDK'sRegisterAgentwrapper drops the name from the response.Commit 2: simulate uses it.
agent_nameis[agent] namefrom livekit.toml, stable across runs.dispatch_agent_name; the spawned worker still registers under it viaLIVEKIT_AGENT_NAME_OVERRIDE.lk agent config; self-hosted users add:--agent-name(already-running agent), jobs dispatch to that name; a livekit.toml in the working directory still supplies the identity when present.Old runs keep their random names for their 30-day life.
Verification
go build ./cmd/lk,go vet ./cmd/lk,go test ./cmd/lkpass.