Skip to main content
This example demonstrates how to use the Scenario framework for agentic simulation-based testing. Scenario enables you to simulate conversations between agents, user simulators, and judges, making it easy to test and evaluate agent behaviors in a controlled environment.
Tip: Want to see a more advanced scenario? Check out the Customer support scenario example for a more complex agent, including tool calls and advanced scenario features.

Code

cookbook/agent_concepts/other/scenario_testing.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Set your API key

3

Install libraries

4

Run Agent