Skip to Content
kosemdocs
ReferenceAPIAgents

List agents

Lists a project's agents that the caller may see, the most recently active first. Those the project sees, and the private ones shared with the caller, or theirs; all of them for those who hold agents.agents.accessPrivate on the project.

GET
/v1/projects/{project}/agents

Lists a project's agents that the caller may see, the most recently active first.

Those the project sees, and the private ones shared with the caller, or theirs; all of them for those who hold agents.agents.accessPrivate on the project.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$

Query Parameters

pageSize?integer

Maximum number of items to return. Defaults to 50; values above 500 are treated as 500.

Formatint32
Range0 <= value
pageToken?string

Page token from a previous response.

filter?string

Only the agents that one person created: creator = "user:usr_…", or creator = me for the caller's own.

Lengthlength <= 200

Response Body

OK

application/json
  1. response
agents*array<>

Agents, the most recently active first.

nextPageToken*string

Token for the next page; empty on the last page.

Example Request
curl -X GET 'https://api.kosem.ai/v1/projects/string/agents'
Example Response
{
  "agents": [
    {
      "activityTime": "2019-08-24T14:15:22Z",
      "awaitingCalls": [
        "string"
      ],
      "config": {
        "environment": {
          "diskGib": 0,
          "env": {
            "property1": "string",
            "property2": "string"
          },
          "idleTimeoutSeconds": 0,
          "image": "string",
          "memoryMib": 0,
          "runnerPool": "string",
          "secrets": [
            {
              "credential": "string",
              "env": "string",
              "file": "string",
              "scope": {
                "property1": null,
                "property2": null
              },
              "secret": "string",
              "state": "ACTIVE",
              "stateReason": "string"
            }
          ],
          "stoppedTtlSeconds": 0,
          "vcpus": 0
        },
        "instructions": "string",
        "maxModelCalls": 0,
        "model": "string",
        "reasoningEffort": "",
        "tools": [
          "string"
        ]
      },
      "createTime": "2019-08-24T14:15:22Z",
      "creator": "string",
      "environment": {
        "diskGib": 0,
        "environment": "string",
        "memoryMib": 0,
        "state": "PROVISIONING",
        "stateReason": "string",
        "updateTime": "2019-08-24T14:15:22Z",
        "vcpus": 0
      },
      "jobs": [
        {
          "command": "string",
          "job": "string",
          "startTime": "2019-08-24T14:15:22Z"
        }
      ],
      "lastSequence": 0,
      "lastStop": {
        "message": "string",
        "reason": "END_TURN"
      },
      "name": "string",
      "state": "IDLE",
      "title": "string",
      "unread": true,
      "updateTime": "2019-08-24T14:15:22Z",
      "usage": {
        "webSearches": 0
      },
      "visibility": "PROJECT"
    }
  ],
  "nextPageToken": "string"
}