Register this process's agents
import requests
url = "https://app.langwatch.ai/api/v1/agents/connect/register"
payload = {
"protocol": 1,
"type": "register",
"sdk": {
"name": "<string>",
"version": "<string>",
"language": "<string>"
},
"instance": {
"id": "<string>",
"hostname": "<string>",
"username": "<string>",
"pid": 4503599627370495,
"startedAt": "<string>",
"label": "<string>",
"inFlightCallIds": [],
"maxConcurrency": 123
},
"agents": [
{
"name": "<string>",
"environment": "<string>",
"parameters": {},
"concurrency": 123,
"timeoutMs": 123,
"sticky": True
}
]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocol: 1,
type: 'register',
sdk: {name: '<string>', version: '<string>', language: '<string>'},
instance: {
id: '<string>',
hostname: '<string>',
username: '<string>',
pid: 4503599627370495,
startedAt: '<string>',
label: '<string>',
inFlightCallIds: [],
maxConcurrency: 123
},
agents: [
{
name: '<string>',
environment: '<string>',
parameters: {},
concurrency: 123,
timeoutMs: 123,
sticky: true
}
]
})
};
fetch('https://app.langwatch.ai/api/v1/agents/connect/register', 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/connect/register \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"protocol": 1,
"type": "register",
"sdk": {
"name": "<string>",
"version": "<string>",
"language": "<string>"
},
"instance": {
"id": "<string>",
"hostname": "<string>",
"username": "<string>",
"pid": 4503599627370495,
"startedAt": "<string>",
"label": "<string>",
"inFlightCallIds": [],
"maxConcurrency": 123
},
"agents": [
{
"name": "<string>",
"environment": "<string>",
"parameters": {},
"concurrency": 123,
"timeoutMs": 123,
"sticky": true
}
]
}
'{
"frame": {
"protocol": 1,
"type": "registered",
"agents": [
{
"name": "<string>",
"environment": "<string>",
"id": "<string>",
"url": "<string>",
"parameterNotes": [
"<string>"
],
"scope": {
"kind": "shared"
}
}
],
"heartbeatIntervalMs": 123,
"instanceId": "<string>"
},
"instanceToken": "<string>"
}Agents
Create Register
Returns a registered frame and instance token, or refuses at the status of the reason.
POST
/
api
/
v1
/
agents
/
connect
/
register
Register this process's agents
import requests
url = "https://app.langwatch.ai/api/v1/agents/connect/register"
payload = {
"protocol": 1,
"type": "register",
"sdk": {
"name": "<string>",
"version": "<string>",
"language": "<string>"
},
"instance": {
"id": "<string>",
"hostname": "<string>",
"username": "<string>",
"pid": 4503599627370495,
"startedAt": "<string>",
"label": "<string>",
"inFlightCallIds": [],
"maxConcurrency": 123
},
"agents": [
{
"name": "<string>",
"environment": "<string>",
"parameters": {},
"concurrency": 123,
"timeoutMs": 123,
"sticky": True
}
]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocol: 1,
type: 'register',
sdk: {name: '<string>', version: '<string>', language: '<string>'},
instance: {
id: '<string>',
hostname: '<string>',
username: '<string>',
pid: 4503599627370495,
startedAt: '<string>',
label: '<string>',
inFlightCallIds: [],
maxConcurrency: 123
},
agents: [
{
name: '<string>',
environment: '<string>',
parameters: {},
concurrency: 123,
timeoutMs: 123,
sticky: true
}
]
})
};
fetch('https://app.langwatch.ai/api/v1/agents/connect/register', 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/connect/register \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"protocol": 1,
"type": "register",
"sdk": {
"name": "<string>",
"version": "<string>",
"language": "<string>"
},
"instance": {
"id": "<string>",
"hostname": "<string>",
"username": "<string>",
"pid": 4503599627370495,
"startedAt": "<string>",
"label": "<string>",
"inFlightCallIds": [],
"maxConcurrency": 123
},
"agents": [
{
"name": "<string>",
"environment": "<string>",
"parameters": {},
"concurrency": 123,
"timeoutMs": 123,
"sticky": true
}
]
}
'{
"frame": {
"protocol": 1,
"type": "registered",
"agents": [
{
"name": "<string>",
"environment": "<string>",
"id": "<string>",
"url": "<string>",
"parameterNotes": [
"<string>"
],
"scope": {
"kind": "shared"
}
}
],
"heartbeatIntervalMs": 123,
"instanceId": "<string>"
},
"instanceToken": "<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.
Body
application/json
Last modified on August 31, 2026
Was this page helpful?