Preview Scenario Prompt
Preview the scenario editor’s live prompt, built from the same code simulated calls use.
Declared ahead of GET /scenarios/{scenario_id} (and its siblings) so a literal
preview-prompt path segment is never captured as a scenario_id path parameter.
No DB writes; situation may be empty since the user is mid-typing.
This is only the scenario’s own instruction body (build_scenario_instruction_body).
At actual call time, build_simulation_system_prompt additionally wraps it with the
LangSmith-fetched caller-persona prefix, any customer-profile-facts block, and the
inbound/outbound caller footer — none of that is part of this preview.
Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
Tuner's internal numeric ID for the agent.
Workspace ID. Find this in Workspace > General Settings.
Body
Input for the scenario editor's live prompt preview (POST /scenarios/preview-prompt).
Deliberately not ScenarioAuthoringRequest: situation here may be empty (the user is
mid-typing in the editor), whereas creating/updating a library scenario requires a
non-blank situation. Trimming behavior is otherwise identical, reusing the same
validator helpers for consistency (DRY).
Response
Successful Response
Response for the scenario editor's live prompt preview.
prompt is the exact text build_scenario_instruction_body would produce for these
inputs -- byte-identical to what a simulated call built from this same scenario would
use as its instruction body.