Registry / llm-agents / langwatch-scenario

langwatch-scenario

JSON →
library0.7.31pypypiunverified

LangWatch Scenario is an end-to-end agent testing library for Python (>=3.10) that lets you define, run, and evaluate LLM agent scenarios. It supports async execution, built-in judges, red-teaming, and integration with LangWatch observability. Current version: 0.7.26, released 2026-04-28. Active development with frequent releases.

pip install langwatch-scenario
INSTALL
IMPORT
SIG · LANGWATCH-SCENARIO
L
langwatch-scenario
llm-agentspythonv0.7.31
Install
29.3s avg
Import
Disk
449MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.31 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 459.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 29.3s · import 0.000s · 513MB
449MB installed
● package 449MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ScenarioRunner
from langwatch_scenario.scenario import ScenarioRunner
from langwatch_scenario import ScenarioRunner

Create a ScenarioRunner with your API key and run a predefined scenario asynchronously.

from langwatch_scenario import ScenarioRunner import asyncio async def main(): runner = ScenarioRunner(api_key=os.environ.get('LANGWATCH_API_KEY', '')) result = await runner.run('example-scenario') print(result) if __name__ == '__main__': asyncio.run(main())
Debug
Known issues
gotchaThe package import uses underscore: from langwatch_scenario import ..., not from langwatch.scenario.
fix
Use underscore: pip install langwatch-scenario, import langwatch_scenario.
affects: all
gotchaAsync functions are required: run() and arun() are async. Calling them without await leads to RuntimeWarning.
fix
Use asyncio.run() in scripts or await inside async functions.
affects: >=0.7.24
gotchaRelicensed from AGPLv3 to Apache 2.0 in v0.7.25 – ensure your project's license is compatible.
fix
No code changes needed, but update license notices in your project if you were complying with AGPL terms.
affects: >=0.7.25
Upgrade
Version history
0.7.31latest on PyPI · released Jun 11, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
2
Resources
langwatch-scenario — pip install langwatch-scenario · libregistry