Repository navigation
agent_simulation: fix stale comments on how the dispatch and scenario tags reach the agent - #1878
Merged
Merged
Conversation
… tags reach the agent SimulationDispatch is carried in the lk.simulator.dispatch attribute of the agent dispatch, which lands on the Job; it is not in the room metadata. Scenario tags travel inside that dispatch and are no longer copied onto the simulator participant's access token. Comment-only. livekit_agent_simulation.pb.go is regenerated with the pinned tooling (go tool mage proto, protoc 35.1).
|
JustinScitech
approved these changes
Oct 20, 2026
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.
What
Two comments in
protobufs/livekit_agent_simulation.protodescribe how simulation data reaches the agent under test, and both describe a transport the simulation pipeline no longer uses. This PR corrects the comments. Nothing on the wire or in the API changes.SimulationDispatchScenario.tagsHow the dispatch actually travels
SimulationDispatchand puts it, with thelk.simulatormarker, in theattributesof theRoomAgentDispatchit passes toCreateRoom. The server delivers those attributes on theJob. The simulator participant's token carries onlylk.simulator: true; scenario tags are not on it. Source (private repo): dispatch attributes on CreateRoom, the room creation, the simulator token.JobContext.simulation_context()parsesjob.attributes["lk.simulator.dispatch"]: livekit/agents job.py, the attribute key.JobContext.simulationContext()parses the same job attribute: livekit/agents-js job.ts, the attribute key.scenario, which both SDKs expose asSimulationContext.scenario.The
SimulationDispatchcomment was written with the message in #1609. The dispatch has moved twice since: to a simulator participant attribute (livekit/agents-private#85), then to the agent dispatch attributes (livekit/agents-private#179, read by livekit/agents#6089 and livekit/agents-js#2075). The worker stopped copying scenario tags onto the simulator's token in the first of those moves. Neither comment was updated.Notes
livekit/livekit_agent_simulation.pb.gois regenerated withgo tool mage protoand protoc 35.1, the version the Generate workflow pins. The two doc comments are the only change.Scenario.tagscomment is also the field description in the public API's OpenAPI spec, so the correction reaches that spec the next time it is regenerated.