BASE

Scenario

Scenario

Test automation · Free

An agent scenario testing framework with simulated conversations: it helps evaluate AI application behavior using reproducible cases.

Also known as: langwatch/scenario; scenario-testing; agentic-testing-framework

Resource illustration: Scenario

Open resource ↗

What you can use for free

Code and local use under Apache-2.0.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under Apache-2.0. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Test an AI agent through a simulated conversation
  • Run a simulated conversation with the agent and investigate scenario deviations

Example workflow

A possible workflow; this is not a report of hands-on testing.

Test an AI agent through a simulated conversation.

Before you start

  • One important workflow and its expected result.
  • A test environment with controlled data.

Steps

  1. Define the user situation, expected behavior, and evaluation criteria.
  2. Run a simulated conversation with the agent and investigate scenario deviations.
  3. Run the check locally and save the report in CI.

Check your result

  • The check detects a deliberately broken workflow.
  • The result can be reproduced without depending on a personal session.

Choosing Scenario

Test an AI agent through a simulated conversation

Choose this when

  • Test an AI agent through a simulated conversation
  • Run a simulated conversation with the agent and investigate scenario deviations

Requirements

  • Implement AgentAdapter.call and install Scenario with pytest or vitest; the example specifies a simulator model.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: Apache-2.0 for the code; third-party components retain their own terms.
  • User simulation and judging are separate roles; a specific scenario result does not establish the quality of every agent conversation.

Frequently asked questions

What can you use for free in Scenario?

Code and local use under Apache-2.0.

What additional costs might arise with Scenario?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for Scenario?

Apache-2.0 for the code; third-party components retain their own terms.

How do you get started with Scenario?

Define the user situation, expected behavior, and evaluation criteria. Run a simulated conversation with the agent and investigate scenario deviations. Run the check locally and save the report in CI.

Can I check a tool call midway through a conversation?

Yes. Script defines the order of user/agent steps and custom assertions. In the example, state.has_tool_call checks get_current_weather immediately after the agent response.

Is a ready-made evaluation framework mandatory?

No. Scenario permits custom evaluations and other LLM evaluation frameworks. Agent connection centers on call(), and a model is selected for the simulator.

License

Apache-2.0 for the code; third-party components retain their own terms.

Apache 2.0 — permissive license with patent terms

You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.

License terms

Technologies and topics

  • Scenario
  • test
  • Development

Sources

Other resources