Skip to main content
GET
List agents
Returns all agents in the current workspace with their tokens. Pass include=grants-summary to get each agent’s attached connections and secrets in the same request. See Agent access for what grants mean. Returns all agents in the current workspace, newest first, each with its gateway access token. Pass include=grants-summary to also get each agent’s granted credentials (which app connections and secrets are attached) in one request. Any other include value is rejected with 422.
Availability: Cloud · Community (self-hosted) · Enterprise (self-hosted)

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Query Parameters

include
enum<string>

grants-summary adds a grantsSummary object to each agent.

Available options:
grants-summary

Response

List of agents — plain, or with grantsSummary when include=grants-summary was sent.

One row of GET /agents.

id
string
name
string
identifier
string

Stable, URL-safe handle (lowercase letters, digits, hyphens).

accessToken
string

The agent's gateway access token (aoc_…). Returned by the list; not by POST /agents.

kind
enum<string>

byo runs on your own machine through the gateway; hosted runs in a OneCLI sandbox on a runner.

Available options:
byo,
hosted
imageUrl
string | null

Public avatar URL, or null for the default mark.

channels
object[]
lastSeenAt
string<date-time> | null

Newest gateway request from this agent inside the recent window; null when none.

workingInBackground
boolean

Hosted agents only. True while live background work (a schedule, a watch, a peer task) keeps the sandbox awake.

createdAt
string<date-time>