livekit-simulations

Generate and run coverage-enforced simulation scenarios for LiveKit voice and chat agents.

3|1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/PALabs-v1/AI_friend --skill livekit-simulations-palabs-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: livekit-simulations
Source: https://github.com/PALabs-v1/AI_friend/tree/main/.claude/skills/livekit-simulations
Command: npx skills add https://github.com/PALabs-v1/AI_friend --skill livekit-simulations-palabs-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Testing a LiveKit voice or chat agent before shipping is hard: ad-hoc manual calls miss edge cases, refusals, and regressions. This Skill reads the agent's actual code locally, builds a risk checklist from its constraints, and generates a diverse suite of simulation scenarios that can be run with lk agent simulate and reused as a regression suite. ## Core Features & Use Cases - Code-grounded scenario generation: Reads the deployed agent's code locally (nothing is uploaded) to produce a test-oriented description and a risk checklist covering constraints, guardrails, and adversarial cases. - Coverage-enforced assembly: The build_scenarios.py script validates authored scenarios and fails the build in strict mode if any risk-checklist item lacks a dedicated scenario. - User-steered testing: Captures what the user wants stress-tested (flows, refusals, edge cases) and biases scenario authoring toward that focus without dropping coverage. - Use Case: Before shipping a drive-thru ordering agent, generate ~10 scenarios covering unavailable items, withheld required inputs, and prompt-extraction attempts, then run them with lk agent simulate and re-run the saved suite after every prompt or model change. ## Quick Start Ask the assistant to generate simulation scenarios for your LiveKit agent and stress-test the flows you are most worried about.

Frequently Asked Questions about livekit-simulations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test my LiveKit voice agent before shipping?

Generate simulation scenarios grounded in your agent's actual code, then run them with lk agent simulate --scenarios scenarios.yaml. Each scenario defines a simulated user's persona and goals plus pass criteria, and an LLM judge scores the agent's behavior across the conversations.

How do I create simulation scenarios for a LiveKit agent?

Read the agent's code locally to write a description and risk checklist, author scenarios in authored.yaml, then run build_scenarios.py assemble with --risks and --strict to validate coverage and emit the scenarios.yaml file the CLI loads.

Does scenario generation upload my agent code to the cloud?

No. The agent's code is read locally with standard file tools and never uploaded. Scenario generation runs entirely on your machine with no extra API keys or services required.

What version of livekit-agents is required to run simulations?

Running simulations requires the 1.6 line of the livekit-agents SDK, plus a project enabled for simulations and a current lk cloud auth session. Confirm the installed version and exact CLI flags with lk agent simulate --help.

Why does the scenario assembly step fail with uncovered risks?

The assemble command with --strict fails when any risk-checklist item in risks.yaml lacks a scenario tagged with its id in the covers field. Write a dedicated scenario for each uncovered risk and re-run until the coverage check passes.

When should I not use simulation scenario generation?

Do not use it for building a new agent from scratch, load-testing, or ordinary unit tests. It is designed for behavioral verification of an existing LiveKit agent across realistic conversations, not for throughput or code-level testing.