From 7209345b5b1e84f7f886a8253bf25bd219e11b84 Mon Sep 17 00:00:00 2001 From: Jason Lernerman Date: Tue, 20 Oct 2026 07:25:44 -0400 Subject: [PATCH] agent_simulation: fix stale comments on how the dispatch and scenario 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). --- livekit/livekit_agent_simulation.pb.go | 7 ++++--- protobufs/livekit_agent_simulation.proto | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/livekit/livekit_agent_simulation.pb.go b/livekit/livekit_agent_simulation.pb.go index adbe4da5e..7404e0e43 100644 --- a/livekit/livekit_agent_simulation.pb.go +++ b/livekit/livekit_agent_simulation.pb.go @@ -520,7 +520,7 @@ type Scenario struct { Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` Instructions string `protobuf:"bytes,2,opt,name=instructions,proto3" json:"instructions,omitempty"` AgentExpectations string `protobuf:"bytes,3,opt,name=agent_expectations,json=agentExpectations,proto3" json:"agent_expectations,omitempty"` - // Set as participant attributes on the simulation participant's access token. + // Surfaced to the agent under test as SimulationContext scenario tags. Tags map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Arbitrary JSON-encoded object, surfaced to the agent under test as // SimulationContext userdata (e.g. inputs and benchmark target state). @@ -667,8 +667,9 @@ func (x *ScenarioGroup) GetId() string { return "" } -// Carried (protojson-encoded) in the simulation room's metadata so the agent -// under test can read the scenario + run identity synchronously at connect. +// Carried (protojson-encoded) in the Job's lk.simulator.dispatch attribute, set +// on the agent dispatch, so the agent under test can read the scenario + run +// identity synchronously at job start. type SimulationDispatch struct { state protoimpl.MessageState `protogen:"open.v1"` SimulationRunId string `protobuf:"bytes,1,opt,name=simulation_run_id,json=simulationRunId,proto3" json:"simulation_run_id,omitempty"` diff --git a/protobufs/livekit_agent_simulation.proto b/protobufs/livekit_agent_simulation.proto index 42f92893c..251d74bfc 100644 --- a/protobufs/livekit_agent_simulation.proto +++ b/protobufs/livekit_agent_simulation.proto @@ -423,7 +423,7 @@ message Scenario { string label = 1; string instructions = 2; string agent_expectations = 3; - // Set as participant attributes on the simulation participant's access token. + // Surfaced to the agent under test as SimulationContext scenario tags. map tags = 4; // Arbitrary JSON-encoded object, surfaced to the agent under test as // SimulationContext userdata (e.g. inputs and benchmark target state). @@ -451,8 +451,9 @@ enum SimulationMode { SIMULATION_MODE_AUDIO = 2; } -// Carried (protojson-encoded) in the simulation room's metadata so the agent -// under test can read the scenario + run identity synchronously at connect. +// Carried (protojson-encoded) in the Job's lk.simulator.dispatch attribute, set +// on the agent dispatch, so the agent under test can read the scenario + run +// identity synchronously at job start. message SimulationDispatch { string simulation_run_id = 1; string job_id = 2;