---
title: "Get an agent"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cloudraker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an agent

Path: CloudRaker Paperwork API › Agents

`GET /v1/agents/{id}`

Returns one agent: its steps, the actions it may take, their approval gates, and the `version` a new run will snapshot.

Read this before starting a run to know which steps will come back to you as human work, and which actions will ask for a sign-off.

> **Note:** An agent's `id` is opaque — treat it as a string and do not parse it.

    **Learn more:** [Agents guide](/paperwork/capabilities/agents)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`getAgent.path.id`; string, required)
  - minLength 1

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.cloudraker.com/v1/agents/<id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

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

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/agents/<id>"

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

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

print(response.text)
```

## Responses

### 200

The agent.

#### Example

```json
{
  "object": "agent",
  "id": "string",
  "name": "string",
  "description": "string",
  "version": 0,
  "tasks": [
    {
      "id": "task-1",
      "title": "string",
      "executor": "agent",
      "dependsOn": [
        "string"
      ]
    }
  ],
  "actions": [
    {
      "name": "string",
      "approval": "auto"
    }
  ],
  "updatedAt": "string"
}
```

- `object` (`getAgent.response.200.object`; string, required)
- `id` (`getAgent.response.200.id`; string, required)
- `name` (`getAgent.response.200.name`; string, required)
- `description` (`getAgent.response.200.description`; string, required)
- `version` (`getAgent.response.200.version`; number, required)
- `tasks` (`getAgent.response.200.tasks`; array<object>, required)
  - `id` (`getAgent.response.200.tasks.id`; string, required)
    - example `"task-1"`
  - `title` (`getAgent.response.200.tasks.title`; string, required)
  - `executor` (`getAgent.response.200.tasks.executor`; string, required) — Who performs the step: `agent` runs by itself, `human` waits for a person to complete it.
    - one of `"agent"`, `"human"`
  - `dependsOn` (`getAgent.response.200.tasks.dependsOn`; array<string>, required)
- `actions` (`getAgent.response.200.actions`; array<object>, required)
  - `name` (`getAgent.response.200.actions.name`; string | null, required)
  - `approval` (`getAgent.response.200.actions.approval`; string, required) — When a person has to sign off on this step. - `auto` — no sign-off. - `before` — approve the proposed inputs before it runs. - `output` — approve the result before it is used. - `both` — both gates.
    - one of `"auto"`, `"before"`, `"output"`, `"both"`
- `updatedAt` (`getAgent.response.200.updatedAt`; string, required)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`getAgent.response.400.success`; boolean, required)
  - one of `false`
- `error` (`getAgent.response.400.error`; array<unknown>, required)
- `data` (`getAgent.response.400.data`; unknown, required)

### 401

Missing or invalid credentials.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`getAgent.response.401.code`; string, required)
- `message` (`getAgent.response.401.message`; string, required)
- `retryable` (`getAgent.response.401.retryable`; boolean, required)
- `requestId` (`getAgent.response.401.requestId`; string, required)
- `docUrl` (`getAgent.response.401.docUrl`; string, optional)

### 403

The credential is valid but cannot administer this organization.

#### Example

```json
{
  "code": "string",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`getAgent.response.403.code`; string, required)
- `message` (`getAgent.response.403.message`; string, required)
- `retryable` (`getAgent.response.403.retryable`; boolean, required)
- `requestId` (`getAgent.response.403.requestId`; string, required)
- `docUrl` (`getAgent.response.403.docUrl`; string, optional)

### 404

Unknown agent id, or an agent that is not active.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`getAgent.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`getAgent.response.429.message`; string, required)
- `retryable` (`getAgent.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`getAgent.response.429.requestId`; string, required)
- `docUrl` (`getAgent.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/agents/get-agent/index.md
