simulate_ab_test
Start async A/B simulation test comparing two agent configurations. Executes multi-turn simulated conversations for BOTH configurations against identical personas and scenarios, then compares performance metrics. Returns a jobId immediately - use get_simulation_status to poll for results. Three ways to specify the variant: (1) variantPrompt — full prompt content; (2) variantPromptId — reference an existing stored prompt; (3) variantOverrides — array of find/replace ops applied on top of the resolved baseline (no need to send full content, server applies the diff). Same for baseline (variantOverrides has no baseline equivalent — baseline must come from baselinePrompt or baselinePromptId).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | Provider run ID for the runtime context snapshot. Required with conversationId when runtimeContextId is not provided. | |
| maxTurns | No | Maximum turns per conversation (default: 10) | |
| customerId | No | (Converra superadmin only) Target customer ID to act on behalf of | |
| personaCount | No | Total number of personas to use | |
| scenarioCount | No | Total number of scenarios to use | |
| variantPrompt | No | The challenger agent's full system prompt content. Use this OR variantPromptId OR variantOverrides. | |
| baselinePrompt | No | The baseline agent's system prompt content. Either this or baselinePromptId must be provided. | |
| conversationId | No | Conversation ID containing the runtime context snapshot. Required with runId when runtimeContextId is not provided. | |
| simulationType | No | Simulation type: standard, context_grounded_probe (one-turn context probe), or context_grounded_dialogue (multi-turn context-grounded dialogue). Context-grounded types require baselinePromptId plus runtimeContextId or conversationId with runId. | |
| includePersonas | No | Optional specific personas to include | |
| variantPromptId | No | Alternative to variantPrompt: ID of stored agent to use as variant. | |
| baselinePromptId | No | Alternative to baselinePrompt: ID of stored agent to use as baseline. Also fetches LLM settings. | |
| includeScenarios | No | Optional specific scenarios to include | |
| runtimeContextId | No | Runtime context snapshot ID to bind for both A/B arms. Use this OR conversationId with runId. | |
| variantOverrides | No | Construct the variant by applying find/replace overrides on top of the resolved baseline content. Avoids sending the full prompt when the change is small. Each override's `find` string must occur exactly once in the prompt (after prior overrides have been applied) — multiple or zero matches throw a validation error. Order matters: each find runs against the result of prior overrides. Anchors are case-sensitive and match any substring (including inside larger words) — include surrounding whitespace/punctuation to disambiguate short anchors. Example: [{find: "Be concise.\n", replace: "Be concise and warm.\n"}]. Use this OR variantPrompt OR variantPromptId. | |
| conversationsPerPersona | No | Conversations per persona (default: 1) |