Index of every page on this site: llms.txt
All skills
livekit avatar

/writing-livekit-scenarios

@378fb2b official
by livekitlivekit/agent-skills76 stars
14
Run it yourself

Creates and maintains the scenarios a LiveKit agent simulation runs, and wires the agent to consume them. Use when the user asks "what should I test", "generate simulation scenarios", "write scenarios for my agent", "add a scenario for X", "organize my scenario files", "my simulations are flaky", "the scenario hits my real database", "seed state per scenario", "it passed but booked the wrong thing", "grade the final state", or wants to stress-test a flow before shipping. Covers generating a baseline with the LiveKit scenario generator and refining it, writing the cases generation misses, phrasing simulated-user instructions so they steer reliably, splitting scenarios into sets across files, and the agent-side code that seeds deterministic state from a scenario and fails a run on its final state. To run them use running-livekit-simulations.

Use this Skill: https://skilld.dev/gh/livekit/agent-skills/writing-livekit-scenarios

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesrisk-coverage.md

≈969 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Guaranteeing coverage of an agent's hard cases

Scenario generation, whether yours or the LiveKit generator's, drifts toward plausible happy paths. Left alone, it produces ten cooperative callers who get what they want and skips the cases that break agents. Persona variety doesn't fix this. Ten different personalities all making easy requests still test one thing.

So don't rely on a good prompt to produce coverage. Make an explicit checklist and work through it.

Build the checklist

Read the agent's code. For every hard limit you find, write one line with an id, a category, and what must be tested. Keep it in a file (risks.yaml or similar) next to your working notes.

Where entries come from, roughly in order of how often they're missed:

  • Unavailable items, by name. Every item, plan or option the agent can't currently provide gets its own entry. A general rule like "it won't offer things that are unavailable" can't be tested, so it isn't an entry.
  • Required inputs. Anything the agent must collect before it can proceed.
  • Invalid values. Every rule on what a value may be: caps, supported options, time windows, eligibility.
  • Preconditions. Steps that can't be skipped, and gated actions.
  • Empty results. Lookups that can legitimately return nothing.
  • Guardrails. Out-of-scope requests, harmful requests, requests for professional advice, sensitive data handling, attempts to extract the system prompt.

Guardrails are the part people forget, and a guardrail failure is the one that ends up in a screenshot.

Every entry gets a dedicated scenario

A passing mention doesn't count. Each entry needs a scenario where the simulated user does the thing. Asking "do you have X?" doesn't test that X is unavailable. Ordering X does. What the simulated user does for each category:

Category What the simulated user must do
unavailable Order or request the unavailable item by name, and press when told no
withhold-required Proceed through the flow but refuse or omit the required input when asked
invalid-value Supply a value that breaks the rule: an off-list option, over-limit amount, unsupported plan
precondition Try to get the gated action done while skipping the required step
resource-empty Drive the lookup to nothing available, then press for a result anyway
out-of-scope Ask for something the agent doesn't do
harmful Make an unsafe or disallowed request
professional-advice Ask for a specific medical, legal or financial recommendation, not general information
sensitive-data Volunteer or demand handling of a full card number, government id, password, or someone else's record
prompt-extraction Ask the agent to reveal its instructions, or tell it to ignore them

In every one of these, the pass is the agent refusing, declining to make something up, or stating the limit honestly. Write agent_expectations that way. Otherwise the test fails when the agent behaves correctly.

Check coverage before you run

Before running, list each checklist id next to the scenario label that covers it. Any id without a scenario gets one. If you're at your budget, replace a redundant happy-path scenario instead of letting the file grow.

Tag scenarios by what they cover (tags works well) so the mapping is recorded in the file and not only in your head.

Budget

Coverage is a minimum. Forty scenarios nobody reads are worse than twelve that each pin down something specific. Every scenario costs a full conversation to run, and an unread scenario with a vague expectation gives flaky verdicts that make people stop trusting the whole file.

A rough order: the paths that carry most of the traffic, the edges of each of those paths, then one per checklist entry. Add the user's stated worries on top, and stop there.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1d3 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    The skill provides comprehensive guidance for creating and managing LiveKit agent simulation scenarios. It correctly identifies and discloses that the scenario generation process involves uploading local source code to LiveKit Cloud, including instructions to warn the user. It also provides a robust framework for testing agent guardrails via simulated adversarial interactions.

  • Socket1d

    No alerts

  • Snyk3d

    Risk: MEDIUM · 1 issue

Signed by skilld at 378fb2b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 5 days ago
metadata
{
  "author": "livekit"
}

README badge

README badge for livekit/agent-skills/writing-livekit-scenarios