Python
import requests
url = "https://app.langwatch.ai/api/v1/agents/{id}/test"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/agents/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/agents/{id}/test \
--header 'X-Auth-Token: <api-key>'{
"scenarioRunId": "<string>",
"batchRunId": "<string>",
"setId": "<string>"
}Agents
Create Test
Run one scripted scenario against an agent: the user sends “ping”, the agent answers, and the run succeeds when the answer arrives. No model is used, and no scenario, run plan or test suite is added to the project. Answers at once with the run ids; the run itself is asynchronous.
POST
/
api
/
v1
/
agents
/
{id}
/
test
Python
import requests
url = "https://app.langwatch.ai/api/v1/agents/{id}/test"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/agents/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/agents/{id}/test \
--header 'X-Auth-Token: <api-key>'{
"scenarioRunId": "<string>",
"batchRunId": "<string>",
"setId": "<string>"
}Authorizations
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
The agent id.
Minimum string length:
1Last modified on August 31, 2026
Was this page helpful?