Skip to main content
GET
/
agents
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const agentSummary of client.agents.list()) {
  console.log(agentSummary.id);
}
{
  "agents": [
    {
      "activeThreadCount": 123,
      "awaitingThreadCount": 123,
      "createdAt": "<string>",
      "defaultModel": "<string>",
      "fleetId": "<string>",
      "id": "<string>",
      "metadata": {
        "project": "alpha"
      },
      "orgId": "<string>",
      "updatedAt": "<string>",
      "userId": "<string>"
    }
  ],
  "cursor": "<string>",
  "hasMore": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Query Parameters

active
enum<string>

When set to true, lists only agents with active or awaiting threads.

Available options:
true,
false
Example:

"true"

cursor
string

Opaque pagination cursor returned by a previous request.

Example:

"cursor_abc123"

fleetId
string

Fleet to list agents from. Defaults to the API key's default fleet when omitted.

Example:

"fleet_abc123"

limit
string

Maximum number of items to return. Defaults to 20 and preserves parseInt semantics.

Example:

"20"

Response

Agents page.

agents
object[]
required
cursor
string | null
required
hasMore
boolean
required