NylorunDocsBeta
Runtime APIAgentsTriggers

List an Agent's runs

GET
/v1/agents/{agentId}/runs

Each time one of its triggers fired or was run by hand, newest first: when it was due, whether it was late, and what came of it (started, queued, skipped or failed, with a reason), with the session and turn.

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).

Path Parameters

agentId*string

The Agent id, percent-encoded

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
triggerId?string

Only this trigger's runs

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

A page of runs

application/json
  1. response
runs*array<>
nextCursor*string|null
import { createClient } from "@nylorun/agents";const client = await createClient();const runs = await client.agents.runs("users/alice/assistant", {  triggerId: "nightly",  limit: 20,});
{  "runs": [    {      "id": "string",      "triggerId": "string",      "kind": "schedule",      "dueAt": "string",      "firedAt": "string",      "late": true,      "status": "started",      "reason": "string",      "sessionId": "string",      "turnId": "string",      "queuedMessageId": "string"    }  ],  "nextCursor": "string"}