> ## Documentation Index
> Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulation Runs

> Test your AI's conversational abilities with realistic, scenario-based simulations

## Evaluate agent performance with simulated sessions

Test your AI agent's performance using automated simulated conversations to get insights into how well your agent handles different scenarios and user interactions.

<Note>
  This tests a refund scenario where:

  * Customer needs refund for defective product
  * Agent verifies purchase
  * Policy guides the process
  * Must resolve in 5 turns
</Note>

<Steps>
  <Step title="Create a Dataset for testing">
    * Configure the agent dataset template with:
    * **Agent scenarios**: Define specific situations for testing (e.g., "Update address", "Order an iPhone")
    * **Expected steps**: List expected actions and responses

          <img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-dataset-template.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=6473d0528ae00187343722c38dbc8375" alt="Agent Dataset template" width="1608" height="1408" data-path="images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-dataset-template.png" />

          <img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-dataset-sample.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=74abe13689cf4820ee48f9b5353e3b13" alt="Agent Dataset sample data" width="2284" height="1628" data-path="images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-dataset-sample.png" />
  </Step>

  <Step title="Set up the Test Run">
    * Navigate to your http endpoint, click "Test", and select "Simulated session" mode
    * Pick your agent dataset from the dropdown
    * Configure additional parameters like persona, tools, and context sources
    * For advanced control, use [Custom Simulation](/simulations/text-simulation/custom-simulation) to define your own simulation prompt
    * Enable relevant evaluators

          <img src="https://mintcdn.com/maximai/5P7xuV4ChD8I7qhR/images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-testrun-setup.png?fit=max&auto=format&n=5P7xuV4ChD8I7qhR&q=85&s=c8994ad84b0c830f925f33a26b6f9830" alt="Configure simulation Test Run" width="2965" height="1594" data-path="images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/agent-testrun-setup.png" />
  </Step>

  <Step title="Execute Test Run">
    * Click "Trigger test run" to begin
    * The system simulates conversations for each scenario
  </Step>

  <Step title="Review results">
    * Each session runs end-to-end for thorough evaluation
    * You'll see detailed results for every scenario

          <img src="https://mintcdn.com/maximai/YdQNCf1tftKyYOR4/images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/simulation-testrun-result.png?fit=max&auto=format&n=YdQNCf1tftKyYOR4&q=85&s=8f2ed874dd1e81e55420ccdacd891726" alt="Simulation Test Run result" width="2975" height="1777" data-path="images/docs/evaluate/how-to/evaluate-workflows-via-api-endpoint/evaluate-simulated-sessions-for-agents/simulation-testrun-result.png" />
  </Step>
</Steps>
