Python
import requests
url = "https://app.langwatch.ai/api/v1/agents/connect/poll"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/agents/connect/poll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/agents/connect/poll \
--header 'X-Auth-Token: <api-key>'{
"frames": [
{
"protocol": 1,
"type": "call",
"callId": "<string>",
"agentId": "<string>",
"threadId": "<string>",
"messages": [
{
"role": "<string>"
}
],
"newMessages": [
{
"role": "<string>"
}
],
"params": {},
"traceparent": "<string>",
"deadlineAt": 123,
"run": {
"scenarioRunId": "<string>",
"scenarioName": "<string>",
"batchRunId": "<string>"
},
"session": "<unknown>"
}
]
}Agents
List Poll
Wait for the next call and cancel frames of a registered instance, up to 25 seconds, then answer with what is waiting or with an empty list. Each poll refreshes the instance presence, so a process that polls reads Online. Addressed with the instance token in the X-Agent-Instance-Token header.
GET
/
api
/
v1
/
agents
/
connect
/
poll
Python
import requests
url = "https://app.langwatch.ai/api/v1/agents/connect/poll"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/agents/connect/poll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/v1/agents/connect/poll \
--header 'X-Auth-Token: <api-key>'{
"frames": [
{
"protocol": 1,
"type": "call",
"callId": "<string>",
"agentId": "<string>",
"threadId": "<string>",
"messages": [
{
"role": "<string>"
}
],
"newMessages": [
{
"role": "<string>"
}
],
"params": {},
"traceparent": "<string>",
"deadlineAt": 123,
"run": {
"scenarioRunId": "<string>",
"scenarioName": "<string>",
"batchRunId": "<string>"
},
"session": "<unknown>"
}
]
}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.
Response
The frames waiting for the instance, possibly none
The call and cancel frames waiting for the instance; empty once the poll wait passes with none.
- Option 1
- Option 2
Show child attributes
Show child attributes
Last modified on August 31, 2026
Was this page helpful?