Skip to contentSkip to page list

Docs

Create Frames

POST/api/v1/agents/connect/frames
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/agents/connect/frames"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {    "frames": [        {            "protocol": 1,            "type": "ack",            "callId": "string",        },    ],}​response = requests.post(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · Generated from schema

{  "accepted": -9007199254740991}
api-reference/agents/create-frames

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.

Request body

application/json · Required

framesobject[]required
Option 1protocol: 1object
protocolnumberrequired
Always1
typestringrequired
Always"ack"
callIdstringrequired
At least 1 character
Option 2protocol: 1object
protocolnumberrequired
Always1
typestringrequired
Always"result"
callIdstringrequired
At least 1 character
outputstring | object | object[]
sessionany
stateobject | null
errorobject
Option 3protocol: 1object
protocolnumberrequired
Always1
typestringrequired
Always"deregister"

Responses

200

Success

application/json

acceptedintegerrequired
Minimum -9007199254740991Maximum 9007199254740991

Documentation