Skip to main content
GET
JavaScript
Every dashboard, reconciliation loop, and “what is my agent doing” query starts here. The list is cursor-paginated and newest-first by default.

Filters

Every ID filter takes the external_id: form, so you can filter by an ID from your own system without resolving it first:

limit is a page size, not a cap

Both SDKs return an async iterator that pages transparently. limit controls how many objectives come back per HTTP request, not how many you get.
To stop at ten, break out of the loop, or read one page at a time from page.items and follow pagination.nextCursor yourself.
pagination.total is always 0. Do not use it to size a table or a progress bar. Count what you iterate, or track the cursor.

Ask for info when you need the numbers

Without includeInfo, an objective comes back with its metadata, state, configSnapshot, and the rendered prompts. That is enough to build a list view. Pass includeInfo: true and each record grows an info block with the counts you would otherwise have to compute: totalEvents, totalToolCalls, totalIterations, totalInputTokens, totalOutputTokens, totalContextWindows, plus the resolved agent, agentVariation, createdBy, and effectiveMemoryCascade.
It costs more of your rate limit, so reach for it on a detail view rather than an infinite scroll.

Useful shapes

What is stuck right now. A STATE_WAITING objective has answered and is holding its context window open for the next turn. A pile of them usually means nobody is calling continue.
What a schedule has been doing. This is the programmatic version of the agent’s Objectives tab.
What one run delegated. Sub-objectives point at their parent, so this is the fan-out of a single objective.
The oldest failures first, when you are working a backlog rather than watching a feed.

Create an objective

Where metadata.externalId and labels get set, so you can find the run later.

Continue an objective

What to do with everything sitting in STATE_WAITING.

Stream objective events

Watch one run instead of polling the list.

Use your own IDs

Address an objective by your ticket number.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
Example:

"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"

Query Parameters

limit
integer<int32>

Maximum number of results to return

cursor
string

Pagination cursor from previous response

agentId
string

Agent ID for filtering

Example:

"agent_01HXKD2E5NQM3T9AYWCFMGWT9Y"

parentObjectiveId
string

Optional filters

state
enum<string>

Filter by state

Available options:
STATE_UNSPECIFIED,
STATE_PENDING,
STATE_RUNNING,
STATE_WAITING,
STATE_FAILED,
STATE_CANCELLED,
STATE_FINALIZED,
STATE_TIMED_OUT
profileId
string
Example:

"profile_01HXKD2E5NQM3T9AYWCFS0AP08"

sortOrder
string

Sort order for results (asc or desc by creation time)

includeInfo
boolean

When set to true you may use more of your alloted API rate-limit

agentScheduleId
string

Filter to objectives produced by a specific AgentSchedule. Accepts canonical as_… form or external_id: form.

labels
string

Filters by metadata labels. Comma-separated key=value pairs, e.g. "env=prod,team=ai". A resource matches only if every pair matches exactly (AND semantics).

tenantId
string

Filter to objectives associated with a tenant. Accepts the canonical tenant_… form or the external_id:<value> form.

subjectId
string

Filter to objectives associated with a subject. Accepts the canonical subj_… form or the external_id:<value> form; the external_id form is scoped within a tenant and requires tenant_id to also be set.

widgetId
string

Filter to objectives whose conversation ran through a widget. Accepts the canonical wgt_… form or the external_id:<value> form.

widgetSessionId
string

Filter to objectives created by a specific widget session.

Response

OK

items
object[]
pagination
object

Page carries cursor-based pagination state. There is no total: the cursor walks the result set without ever counting it, and a count would cost a second query on every list.