NylorunDocsBeta
Runtime APIAgents

List Agents

GET
/v1/agents

Every Agent with all the labels asked for, in state, made from manifest and outdated (moving to another version) when given, by id. A token caller sees only the Agents its grants reach, and a caller acting for a person only that person's sessions on each. limit opts into pages.

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Query Parameters

limit?integer

A page holds at most the Tenant's Runtime limit pageItems (default 200); a larger limit gets that many

Range1 <= value
cursor?string
label?|array<string>

key=value; repeat it to require several labels

state?string

Only Agents in this state (input_required, …)

manifest?string

Only Agents made from this agent manifest

outdated?string

true: only Agents moving to another version of their manifest (waiting for secrets or a start); false: only the others

Value in"true""false"

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Response Body

The Agents; limit opts into pagination

application/json
  1. response
agents*array<>
import { createClient } from "@nylorun/agents";const client = await createClient();const agents = await client.agents.list({ labels: { team: "ops" }, outdated: true });
{  "agents": [    {      "id": "string",      "manifest": "string",      "resolvedVersion": 1,      "manifestHash": "string",      "tracking": "tracking",      "targetVersion": 1,      "waitingFor": "secrets",      "failedVersion": 1,      "startCheck": {        "from": 1,        "startedAt": "string"      },      "kind": "virtual",      "harness": "string",      "owner": "string",      "labels": {        "property1": "string",        "property2": "string"      },      "state": "string",      "attention": [        {          "state": "paused",          "sessionId": "string",          "reason": "string"        }      ],      "desired": "on",      "nextWakeAt": "string",      "compute": {        "state": "string",        "pod": {          "desired": "running",          "observed": "creating",          "volumeGeneration": 0,          "hostEpoch": 0,          "reason": "string",          "imageDigest": "string"        }      },      "runtime": {        "image": "string",        "resources": {          "cpus": 0,          "memory": "string"        },        "storage": "string",        "network": {          "allowedHosts": [            "string"          ]        },        "harness": "string",        "lifecycle": {          "idle": "string",          "deleteAfter": "string"        },        "setup": [          {            "command": "string",            "cwd": "string",            "timeout": "string"          }        ],        "files": [          {            "artifactId": "string",            "version": 1,            "path": "string"          }        ],        "limits": {          "artifacts": {            "fileBytes": 1,            "totalBytes": 1          },          "skills": {            "totalBytes": 1          },          "disk": {            "versionBytes": 1,            "versionEntries": 1          },          "triggers": {            "count": 1,            "minIntervalMs": 1,            "runsPerHour": 1          }        },        "secrets": {          "property1": {            "type": "environment_secret",            "allowedHosts": [              "string"            ],            "inject": {              "header": "string",              "format": "string"            },            "required": true,            "description": "string"          },          "property2": {            "type": "environment_secret",            "allowedHosts": [              "string"            ],            "inject": {              "header": "string",              "format": "string"            },            "required": true,            "description": "string"          }        }      },      "limits": {        "artifacts": {          "fileBytes": 0,          "totalBytes": 0        },        "skills": {          "totalBytes": 0        },        "disk": {          "versionBytes": 0,          "versionEntries": 0        }      },      "sessions": [        {          "id": "string",          "ownerUserId": "string",          "status": "string",          "activeTurnId": "string"        }      ],      "slots": [        {          "name": "string",          "type": "string",          "required": true,          "set": true        }      ],      "disk": {        "latestVersion": 1,        "operation": {          "kind": "snapshot",          "version": 1,          "startedAt": "string"        }      },      "forkedFrom": {        "agent": "string",        "disk": 1      },      "lastUsedAt": "string",      "createdAt": "string",      "updatedAt": "string"    }  ]}