Skip to contentSkip to page list

Docs

Read one run plan

Read one run plan. An id the project does not hold, and a test suite id, both answer 404 suite_not_found.

GET/api/v1/run-plans/{id}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/run-plans/<id>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,}​response = requests.get(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "id": "string",  "name": "string",  "slug": "string",  "scope": {    "mode": "all"  },  "scenarioIds": [    "string"  ],  "targets": [    {      "type": "prompt",      "referenceId": "string",      "scenarioMappings": {},      "runParameters": {},      "runSecretParameterNames": [        "string"      ]    }  ],  "repeatCount": 0,  "simulatorModel": "string",  "judgeModel": "string",  "traceQuietPeriodMs": -9007199254740991,  "traceWaitTimeoutMs": -9007199254740991,  "labels": [    "string"  ],  "evaluators": [    {      "id": "string",      "evaluatorId": "string",      "required": false,      "mappings": {}    }  ],  "archivedAt": "string",  "createdAt": "string",  "updatedAt": "string",  "platformUrl": "string"}
api-reference/run-plans/get-run-plans

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

idstringrequired

The run plan id.

At least 1 character

Responses

200

Success

application/json

idstringrequired

The run plan id.

namestringrequired

The run plan name. This is the plan's identity: a run started under this name joins this plan.

slugstringrequired

The plan's address in the platform. It is kept when the plan is renamed, so run history never moves.

scopeobjectrequired

What the run plan covers: all (every active scenario), test_suites (the scenarios filed in the named test suites), labels (the scenarios carrying any of the labels), or scenarios (the scenarioIds sent with the configuration). A dynamic scope is resolved again at every run, so a scenario written later runs without editing the plan.

Option 1mode: "all"object
modestringrequired
Always"all"
Option 2mode: "test_suites"object
modestringrequired
Always"test_suites"
testSuiteIdsstring[]required
Option 3mode: "labels"object
modestringrequired
Always"labels"
labelsstring[]required
Option 4mode: "scenarios"object
modestringrequired
Always"scenarios"
scenarioIdsstring[]required

The scenarios the last run of this plan covered.

targetsobject[]required

What the plan runs against, in the order the results show. A target carrying runParameters runs with those values.

typestringrequired
One of"prompt""http""code""workflow""connected""voice"
referenceIdstringrequired
At least 1 character
scenarioMappingsobject
runParametersobject
runSecretParameterNamesstring[]
repeatCountnumberrequired

How many times each scenario and target pairing runs.

simulatorModelstring | nullrequired

The model that plays the user, or null for the scenario or project default.

judgeModelstring | nullrequired

The model that judges the run, or null for the scenario or project default.

traceQuietPeriodMsinteger | null

Milliseconds the agent's trace must stay unchanged before the judge reads it, or null for the scenario setting or the project's recommendation. Absent on servers that predate judge trace settings.

Option 1integer
Option 2null
traceWaitTimeoutMsinteger | null

Milliseconds the judge waits for the agent's trace before a verdict, or null for the scenario setting or the project's recommendation. Absent on servers that predate judge trace settings.

Option 1integer
Option 2null
labelsstring[]required

The labels the plan carries.

evaluatorsobject[]

The plan's own evaluators. Absent on servers that predate evaluators on this family.

idstringrequired

The attachment id. Stable across edits of the attachment.

At least 1 characterUp to 64 characters
evaluatorIdstringrequired

The id of the saved evaluator this attachment runs.

At least 1 character
requiredbooleanrequired

Whether a failing result fails the scenario. A score-only evaluator reports and never gates.

mappingsobjectrequired

Where each evaluator input reads its value, keyed by input name. Inputs left out are unmapped; a required input left unmapped refuses the run.

archivedAtstring | nullrequired

When the plan was archived, or null while it is active.

createdAtstringrequired

When the plan was created.

updatedAtstringrequired

When the plan was last written.

platformUrlstring (uri)required

Where to open this run plan in the LangWatch platform.

404

Not Found

application/json

errorstringrequired
messagestring

Documentation