> This page is for Workspace app.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cloudraker.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cloudraker.com/_mcp/server.

# List the org agent directory

GET https://api.cloudraker.com/agents

Lists the paperwork agents this organization owns, one keyset page at a time, newest-updated first. Authorization: any authenticated org member (session + tenant context only, no admin required). Optional query `status` is one of `all` | `published` | `draft` (default `all`); any other value is ignored and the default applies. Optional `includeArchived=true` adds archived agents. A `private` agent is listed only for its owner; it is absent from every other member's directory. Paging: `limit` is 1-200 (default 100), and `cursor` takes the previous response's `nextCursor` — an opaque string the caller never parses; an out-of-range or non-numeric `limit` falls back to the default instead of failing. Response is `{ data: Agent[], nextCursor }` and `nextCursor` is null on the last page. Each Agent carries its id, handle, name, role, avatar, visibility, `publishedVersionId` (the `agv_` id runs are started with), `draftVersionId` and `sourcePlaybookId`.

Reference: https://docs.cloudraker.com/workspace/api/workspace-agents/list-org-agent-directory

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `status` (enum, optional, default: all) — Filter by lifecycle state.
  - Allowed values: `all`, `published`, `draft`
- `includeArchived` (enum, optional, default: false) — Include archived agents.
  - Allowed values: `true`, `false`
- `limit` (integer, optional, default: 100) — Agents per page.
- `cursor` (string, optional) — The previous page's `nextCursor`.

## Response

### 200

One page of org agents.

- `data` (list of Agent, required)
- `nextCursor` (string, required, nullable) — Pass back as `cursor` for the next page — opaque, never parsed. Null on the last page.

## Types

### Agent

- `id` (string, required)
- `handle` (string, required) — Unique per org, derived from the name when not given (`mike`, `mike-2`, …).
- `name` (string, required)
- `role` (string, required)
- `avatar` (AgentAvatar, required)
- `visibility` (enum, required)
  - Allowed values: `org`, `private`
- `ownerUserId` (string, required)
- `publishedVersionId` (string, required, nullable) — The `agv_` id a run is started with. Null until the agent is published.
- `draftVersionId` (string, required)
- `emailTriggerId` (string, required, nullable)
- `sourcePlaybookId` (string, required, nullable) — Set on agents created by the playbook migration; null otherwise.
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `createdBy` (string, required)
- `archivedAt` (datetime, required, nullable)
- `documentAgent` (boolean, optional)

### AgentAvatar

- `kind` (enum, required)
  - Allowed values: `initials`, `generated`
- `color` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "string",
      "handle": "string",
      "name": "string",
      "role": "string",
      "avatar": {
        "kind": "initials",
        "color": "string"
      },
      "visibility": "org",
      "ownerUserId": "string",
      "publishedVersionId": "string",
      "draftVersionId": "string",
      "emailTriggerId": "string",
      "sourcePlaybookId": "string",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "createdBy": "string",
      "archivedAt": "2024-01-15T09:30:00Z",
      "documentAgent": true
    }
  ],
  "nextCursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.cloudraker.com/agents"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.cloudraker.com/agents';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.cloudraker.com/agents"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.cloudraker.com/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.cloudraker.com/agents")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.cloudraker.com/agents', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.cloudraker.com/agents");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cloudraker.com/agents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```