Repository navigation
agent simulate: read simulator flow nodes from scenarios.yaml - #1031
Open
chenghao-mou wants to merge 13 commits into
Open
chenghao-mou wants to merge 13 commits into
chenghao-mou wants to merge 13 commits into
Conversation
This was referenced Oct 12, 2026
chenghao-mou
marked this pull request as ready for review
October 21, 2026 11:50
Read the top-level `steps` map and the per-scenario `start` and `max_duration` keys, and send them in the ScenarioGroup. Each step is decoded with protojson, so field names, enum names, durations, and unknown-key errors match the server's parser. Check only clear user errors locally: a scenario must set exactly one of `start` and `instructions`, and `start` must name a step or a built-in. The server validates the rest at CreateSimulationRun. Bump github.com/livekit/protocol to b440b893 for the new fields. Addresses AGT-3725
Follows the protocol rename: scenarios.yaml takes a top-level `nodes` map, and errors say node. A node can no longer be a voicemail box; scenarios reach one through the built-in livekit/voicemail.
Menus now repeat at most three times inside the simulator, so the schema no longer has max_visits.
chenghao-mou
force-pushed
the
chenghao/feat/AGT-3725-public-simulator-flow-schema
branch
from
October 21, 2026 11:50
abb92b6 to
62f05ec
Compare
…5-public-simulator-flow-schema # Conflicts: # go.mod # go.sum
…5-public-simulator-flow-schema # Conflicts: # go.mod # go.sum
…5-public-simulator-flow-schema # Conflicts: # go.mod # go.sum
Read nodes from the YAML tree so every value keeps its source text, and reject keys with no value. Check every start, then, and to that a scenario can reach, leave livekit/ names to the server, and reject a scenario with neither start nor instructions when the file has nodes.
Walk each node's YAML with its proto descriptor. An anchor that contains itself fails instead of overflowing the stack, merge keys expand, an enum takes its number as well as its name, a null behind an alias is rejected, explicit tags other than str and int are rejected, and unknown fields name their YAML line. Reject a timeout.after of zero or less.
chenghao-mou
added a commit
that referenced
this pull request
Nov 17, 2026
Merge chenghao/feat/AGT-3725-public-simulator-flow-schema (8f65684), keeping the per-file node loop and its file names in errors. - Resolve every directory on an include path through symlinks before any `..` applies, so `link/../x.yaml` is the file beside link's target, not a file beside link. - Identify files with os.SameFile, so one file under two letter cases or two spellings loads once. - Allow top-level `x-` keys for YAML anchors in scenarios and included files; read only the keys when checking them, so the schema-aware reader reports anchors that contain themselves. - Refuse to write scenario ids into a file with no `scenarios`, which would break every file that includes it.
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.
lk agent simulatereads simulator flows fromscenarios.yaml: a top-levelnodesmap andstarton a scenario. They go to the server in theScenarioGroupadded by livekit/protocol#1856.node "menu": ....startandinstructions(one with neither is a plain persona, as onmain), andstartnames a node or a built-in (livekit/hangup,livekit/voicemail,livekit/unavailable). The server compiles and validates the rest atCreateSimulationRun.nodesandstartback, and adding scenario ids leavesnodesuntouched. Files without flows are unchanged.Warning
Depends on livekit/protocol#1856;
go.modpoints at its branch until it ships.Not in this PR: the public OpenAPI client in
pkg/public/oapi, which regenerates after the protocol change ships. Copying a flow scenario from a run in the TUI still yields a stub without its nodes.Addresses AGT-3725