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: For a more advanced scenario testing example, check out the customer support scenario for a more complex agent, including tool calls and advanced scenario features.

Basic Scenario Testing

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