Skip to contentSkip to page list

Docs

List Agents

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

{  "data": [    {      "id": "string",      "name": "string",      "type": "signature",      "config": {},      "environment": "string",      "ownerUserId": "string",      "hostLabel": "string",      "lastSeenAt": "2026-01-01T00:00:00Z",      "parameters": [        {          "name": "string",          "description": "string",          "defaultValue": "string",          "secret": false,          "type": "string",          "options": [            null          ],          "required": false        }      ],      "owner": {        "userId": "string",        "name": "string"      },      "status": "online",      "instances": [        {          "instanceId": "string",          "hostname": "string",          "username": "string",          "pid": 0,          "label": "string",          "sdk": {            "name": null,            "version": null,            "language": null          },          "connectedAt": "2026-01-01T00:00:00Z",          "inflight": 0,          "maxConcurrency": 0        }      ],      "selectable": false,      "notSelectableReason": "owned_by_another_person",      "version": 0,      "labels": [        {          "label": "string",          "version": 0        }      ],      "createdBy": {        "id": "string",        "name": "string"      },      "updatedBy": {        "id": "string",        "name": "string"      },      "createdAt": "2026-01-01T00:00:00Z",      "updatedAt": "2026-01-01T00:00:00Z",      "platformUrl": "string"    }  ],  "pagination": {    "page": -9007199254740991,    "limit": -9007199254740991,    "total": -9007199254740991,    "totalPages": -9007199254740991  }}
api-reference/agents/list-agents

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

pageinteger
Maximum 9007199254740991
limitinteger
Maximum 1000

Responses

200

Success

application/json

dataobject[]required
idstringrequired
namestringrequired
typestringrequired

The kind of agent. A connected agent is registered from code by the SDK and cannot be created or reconfigured through this API.

One of"signature""code""workflow""http""connected""voice"
configobject | nullrequired
environmentstring | nullrequired

The environment a connected agent registered with, for example production or development. Null for every other kind.

ownerUserIdstring | nullrequired

The user a personal development agent belongs to. Only that user can run simulations against it. Null when the agent is shared.

hostLabelstring | nullrequired

The machine a development agent registered from with a project or service key. Null when the agent is personal or shared.

lastSeenAtstring (date-time) | nullrequired

When an instance of a connected agent was last connected. Null for every other kind.

parametersobject[]required

The run parameters a connected agent declares from its function signature: name, type, options, default and description. Empty for every other kind.

ownerobject | nullrequired

The person a personal development agent belongs to. Null when the agent is shared or host-scoped.

statusstringrequired

online while at least one process running the connected agent is connected; offline otherwise, and always for every other kind.

One of"online""offline"
instancesobject[]required

The processes currently connected for a connected agent: hostname, user, pid, SDK and how many calls each has in flight. Empty for every other kind.

selectablebooleanrequired

Whether the credential making this request can run simulations against the agent. False for a personal development agent that belongs to somebody else, which is listed all the same so it can be told apart from the other agents of the same name.

notSelectableReasonstring | nullrequired

Why the agent cannot be run by this credential. Null when it can.

versioninteger | nullrequired

The version this response shows: the latest, unless a label or a version was asked for. Null for connected agents, which are versioned by their code.

labelsobject[]required

The deploy labels the agent carries, such as production, and the version each points at.

createdByobject | nullrequired

The user who created the agent. Null when an API key created it, or it predates creators being recorded.

updatedByobject | nullrequired

The user who changed the agent last. Null when an API key changed it.

createdAtstring (date-time)required
updatedAtstring (date-time)required
platformUrlstring (uri)required
paginationobjectrequired
pageintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
limitintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
totalintegerrequired
Minimum -9007199254740991Maximum 9007199254740991
totalPagesintegerrequired
Minimum -9007199254740991Maximum 9007199254740991

Documentation