Skip to contentSkip to page list

Docs

List Poll

GET/api/v1/agents/connect/poll
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/agents/connect/poll"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

{  "frames": [    {      "protocol": 1,      "type": "call",      "kind": "turn",      "callId": "string",      "agentId": "string",      "threadId": "string",      "messages": [        {          "role": null        }      ],      "newMessages": [        {          "role": null        }      ],      "params": {},      "session": null,      "state": {},      "traceparent": "string",      "deadlineAt": -9007199254740991,      "run": {        "scenarioRunId": "string",        "scenarioName": "string",        "batchRunId": "string"      }    }  ]}
api-reference/agents/list-poll

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.

Query parameters

inFlightstring
Up to 200000 characters

Responses

200

Success

application/json

framesobject[]required
Option 1protocol: 1object
protocolnumberrequired
Always1
typestringrequired
Always"call"
kindstringrequired
One of"turn""setup""teardown"
Default: "turn"
callIdstringrequired
agentIdstringrequired
threadIdstringrequired
messagesobject[]required
newMessagesobject[]required
paramsobjectrequired
sessionany
stateobject | null
traceparentstring | nullrequired
deadlineAtintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
runobjectrequired
Option 2protocol: 1object
protocolnumberrequired
Always1
typestringrequired
Always"cancel"
callIdstringrequired
At least 1 character

Documentation