> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/agent-work/openapi.json](/docs/api/agent-work/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Agent work

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

The agent work queue: the work a workspace gave its own coding agent in the agent work settings, handed out through claims. An agent reads what waits, claims a batch of one kind, writes the answers on its own AI plan and submits them; Kenso checks the format and stores each accepted answer where its own AI would have. Work is built when it is claimed, and a claim holds its items until it expires, is released or every item is answered. Behind the `agent_work` feature, and never open to a Client seat. Each claim, answer and release needs the access the route that writes the same thing by hand declares: Campaigns edit for the campaign kinds, Meetings edit for `meeting_brief`, Accounts edit for `call_brief` and Workflows edit for `workflow_prompt`.

AI. 4 endpoints under `https://api.ken.so`. Every request sends `Authorization: Bearer <your API key>` and `Ken-Version: 2026-11-02`: see [Authentication](/docs/authentication.md), [Workspaces](/docs/workspaces.md) and [Errors](/docs/errors.md). OpenAPI for this resource only: [/docs/api/agent-work/openapi.json](/docs/api/agent-work/openapi.json).

- `GET /v1/agent-work` - Get the agent work queue (`agent-work.get`): [/docs/api/agent-work/get.md](/docs/api/agent-work/get.md)
- `POST /v1/agent-work/claims` - Claim agent work (`agent-work.create-claim`): [/docs/api/agent-work/create-claim.md](/docs/api/agent-work/create-claim.md)
- `POST /v1/agent-work/claims/{claimId}/answers` - Submit agent work answers (`agent-work.submit-answers`): [/docs/api/agent-work/submit-answers.md](/docs/api/agent-work/submit-answers.md)
- `DELETE /v1/agent-work/claims/{claimId}` - Release an agent work claim (`agent-work.release-claim`): [/docs/api/agent-work/release-claim.md](/docs/api/agent-work/release-claim.md)

## Get the agent work queue

`GET /v1/agent-work` - operationId `agent-work.get`

| Permission | Rate limit |
| --- | --- |
| Any workspace member except a Network member | 12,000 requests a minute per API key |

Returns every kind, always all eight in hand-out order, with its executor, the items waiting for your agent
(`waiting`), the items held by open claims (`claimed`), what holds the kind back (`heldBy`:
`billing_blocked`, `out_of_credits` or `ai_paused`, else null) and when an answer of it was last
accepted. With `campaignId`, the counts are that campaign's and `executor` is the campaign's: its override,
else the workspace's. Without it, `executor` is the workspace's switch and `waiting` counts every campaign
your agent takes, including a campaign that gives a kind to your agent while the workspace keeps it on
`kenso_ai`. So read `waiting`, not `executor`, to tell whether there is work. Kinds you may not write
are listed too. `scope` picks the campaigns the campaign kinds (`qualification`, `segmentation`,
`personalization`, `rewriting`) count: `all` (the default) is every campaign that is not deleted or
AI-paused, a Draft, finished or errored one included; `live` is only the campaigns Kenso's AI works on by
itself, so an unattended runner gets only work Kenso's AI would have done. The other kinds count the same in both.
The `waiting` counts are kept between reads and recounted in the background: `waitingCountedAt` says
when they were taken (up to 15 minutes ago). A kind whose count was not ready in time reads `waiting` 0 and
is named in `uncountedKinds`; ask again in a minute.

Errors:

- `400 validation_failed`: `scope` is not `all` or `live`.
- `404 not_found`: the workspace does not have the `agent_work` feature, or the campaign is not the
workspace's.
- `503 service_unavailable` with `Retry-After`: the agent work settings could not be read. Try again.

Open to any workspace member except a Client seat.

Needs the `agent_work` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/agent-work/GET/v1/agent-work)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `campaignId` | query | integer (int64) | no | Optional. One campaign's counts instead of the workspace's. |
| `scope` | query | string | no | Optional. `all` (the default) or `live`: only the campaigns Kenso's AI works on by itself. |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a `AgentWorkStatus`.

| Field | Type | Description |
| --- | --- | --- |
| `kinds` | array of AgentWorkKind | All eight kinds, always, in hand-out order (work with a deadline first). |
| `waitingCountedAt` | string (date-time) | When the `waiting` counts were taken, in UTC. Kenso keeps them between reads and recounts in the background, so they can be up to 15 minutes old; usually under a minute, or one poll behind for a caller that polls less often. Null when no kind waits for your agent. |
| `uncountedKinds` | array of string | The kinds your agent takes whose `waiting` was not counted for this answer, in hand-out order: counting them took longer than the read allows, or failed. Their `waiting` reads 0 and says nothing about their queue: ask again in a minute. Empty when every kind was counted. |

### Request

```bash
curl -X GET "https://api.ken.so/v1/agent-work" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": {
    "kinds": [
      {
        "kind": "meeting_brief",
        "executor": "kenso_ai",
        "waiting": 1,
        "claimed": 1,
        "heldBy": "billing_blocked",
        "lastAcceptedAt": "2026-09-23T15:02:11Z"
      }
    ],
    "waitingCountedAt": "2026-09-23T15:02:11Z",
    "uncountedKinds": [
      "string"
    ]
  }
}
```

## Claim agent work

`POST /v1/agent-work/claims` - operationId `agent-work.create-claim`

| Permission | Rate limit |
| --- | --- |
| Any workspace member except a Network member | 120 requests a minute and 1,800 an hour per workspace |

Hands out up to `limit` items (1 to 50, default 10) of the first kind, in hand-out order, that waits for your
agent and that you may write: only the kinds in `kinds` when you send it, only `campaignId`'s work when you
send it. A kind on `kenso_ai`, one Kenso cannot hand out yet, or one held back (`heldBy`) is skipped. With
`scope` `live` a campaign kind hands out only the campaigns Kenso's AI works on by itself, never a Draft,
finished or errored one; `all`, the default, hands out every campaign's. One claim holds one kind, and one
campaign for a campaign kind. The claim holds its items for `leaseMinutes`
(5 to 240, default 30): Kenso's AI and other claims leave them alone until then. Each item carries its target, the
prompt Kenso's AI would have run and what the answer must look like (`answer.format` `json` or
`text`, and `answer.schema`, a JSON Schema object or null). Nothing waiting is `200` with
`id` null and no items, and stores no claim. A claim stops short of `limit` when its items would pass about
900 KB; the rest stay in the queue. Send an `Idempotency-Key` to retry safely: a resend with the same key
returns the same claim.

Errors:

- `400 validation_failed`: an unknown kind, an empty `kinds`, `limit` or `leaseMinutes` out
of range, or a `scope` other than `all` or `live`. Each problem is one `details[]` entry,
such as `kinds[1]`.
- `404 not_found`: the workspace does not have the `agent_work` feature, or the campaign is not the
workspace's.
- `429 rate_limited`: more than 120 claims a minute or 1,800 an hour for the workspace.
- `503 service_unavailable` with `Retry-After`: the agent work settings could not be read. Nothing was
handed out. Try again.

Open to any workspace member except a Client seat; hands out only the kinds the caller may write.

Needs the `agent_work` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/agent-work/POST/v1/agent-work/claims)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |
| `Idempotency-Key` | header | string | no | A unique value, such as a UUID, that makes a retry safe. Send the same key when you retry. For 24 hours, a repeat of the same request with the same key gets the first response again, with the `Idempotent-Replayed: true` header, and Kenso does not run the action twice. The same key with a different request answers `422 idempotency_key_reused`. Keys are per workspace and at most 200 characters long. A repeat sent while the first request is still running can get `503 service_unavailable` with `Retry-After`. Retry it with the same key. Kenso does not store a `5xx` response, so a retry after one runs the action again. It does not store a `408`, a `429` or another `4xx` that carries `Retry-After` either: retry with the same key after that time and Kenso runs the action again. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kinds` | array of string | no | The kinds to take, in any order; left out for every kind. Kinds are still handed out in hand-out order. |
| `campaignId` | integer (int64) | no | Only this campaign's work (campaign kinds). The campaign must be the workspace's. |
| `limit` | integer (int32) | no | The most items to take, 1 to 50. Default 10. |
| `leaseMinutes` | integer (int32) | no | How long the claim holds its items, in minutes, 5 to 240. Default 30. |
| `scope` | string | no | Which campaigns' work a campaign kind hands out: `all` (the default) is every campaign that is not deleted or AI-paused, a Draft, finished or errored one included; `live` is only the campaigns Kenso's AI works on by itself. Kinds outside a campaign hand out the same in both. |

### Response 200

`data` is a `AgentWorkClaim`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The claim id (`awc_` and 22 URL-safe characters). Null when nothing was waiting. |
| `kind` | string | The one kind this claim holds; null when nothing was waiting. |
| `campaignId` | integer (int64) | The campaign of a campaign kind's claim; null otherwise. |
| `expiresAt` | string (date-time) | When the claim lets go of its unanswered items, in UTC; null when nothing was waiting. |
| `items` | array of AgentWorkItem | The items to answer. Empty when nothing was waiting. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/agent-work/claims" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "kinds": [
    "string"
  ],
  "campaignId": 812,
  "limit": 1,
  "leaseMinutes": 1,
  "scope": "all"
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": "awc_2bX9kq4LmR7tW3vY",
    "kind": "string",
    "campaignId": 812,
    "expiresAt": "2026-09-23T15:02:11Z",
    "items": [
      {
        "id": "awi_2bX9kq4LmR7tW3vY",
        "kind": "string",
        "target": {
          "type": "contact",
          "id": "string",
          "campaignId": 812
        },
        "prompt": {
          "system": "string",
          "user": "string"
        },
        "answer": {
          "format": "string",
          "schema": null,
          "instruction": "string"
        }
      }
    ]
  }
}
```

## Submit agent work answers

`POST /v1/agent-work/claims/{claimId}/answers` - operationId `agent-work.submit-answers`

| Permission | Rate limit |
| --- | --- |
| Any workspace member except a Network member | 300 requests a minute and 6,000 an hour per workspace |

Takes in up to 50 answers to the claim's items: `{ "agent": { "cli", "model" }, "answers": [ { "itemId",
"output" } ] }`. `output` is a JSON object for a `json` item and a string for a `text` item, at most
64 KB. Returns one result per answer, in the order sent: `accepted` (stored where Kenso's AI would have stored
it); `rejected` with a `reason` (`invalid_format`, `too_large`, `unknown_item` or a check
the answer failed; the item is closed and its work goes back to the queue); `expired` (the claim ran out or was
released, or the record no longer needs an answer); `duplicate` (the item already has an answer, or one is being
taken in). Each result also has `retryable`: true only when Kenso could not take the answer in and the item is
still held (`rejected` with `failed_checks`), so send that answer again; false for every other result.
Always `200` when the claim exists, whatever each answer's result. Answer items of a claim in as many calls as you like: the claim closes once
every item is answered. The agent's `cli` and `model` are saved on the claim. Send an
`Idempotency-Key` to retry safely: an answer stored once is never stored twice.

Errors:

- `400 validation_failed`: no answers, more than 50, an answer that is not an object, or an agent name over
100 characters.
- `403 forbidden`: you may not write the claim's kind.
- `404 not_found`: the workspace does not have the `agent_work` feature, or the claim is not the
workspace's.
- `429 rate_limited`: more than 300 submits a minute or 6,000 an hour for the workspace.

Open to any workspace member except a Client seat who may write the claim's kind.

Needs the `agent_work` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/agent-work/POST/v1/agent-work/claims/%7BclaimId%7D/answers)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `claimId` | path | string | yes |  |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |
| `Idempotency-Key` | header | string | no | A unique value, such as a UUID, that makes a retry safe. Send the same key when you retry. For 24 hours, a repeat of the same request with the same key gets the first response again, with the `Idempotent-Replayed: true` header, and Kenso does not run the action twice. The same key with a different request answers `422 idempotency_key_reused`. Keys are per workspace and at most 200 characters long. A repeat sent while the first request is still running can get `503 service_unavailable` with `Retry-After`. Retry it with the same key. Kenso does not store a `5xx` response, so a retry after one runs the action again. It does not store a `408`, a `429` or another `4xx` that carries `Retry-After` either: retry with the same key after that time and Kenso runs the action again. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `agent` | AgentWorkAgentBody | no | The agent that wrote the answers, saved on the claim. Optional. |
| `answers` | array of AgentWorkAnswerBody | no | 1 to 50 answers, each to an item of this claim. |

### Response 200

`data` is a `AgentWorkSubmit`.

| Field | Type | Description |
| --- | --- | --- |
| `results` | array of AgentWorkAnswerResult | One result per answer, in the order sent. |
| `accepted` | integer (int32) | How many answers were accepted. |
| `rejected` | integer (int32) | How many answers were rejected. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/agent-work/claims/01JC8Z3K6Q2W4M7N9P5R1T3V5X/answers" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": {
    "cli": "claude-code",
    "model": "string"
  },
  "answers": [
    {
      "itemId": "string",
      "output": null
    }
  ]
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "results": [
      {
        "itemId": "string",
        "status": "string",
        "reason": "invalid_format",
        "message": "string",
        "retryable": true
      }
    ],
    "accepted": 1,
    "rejected": 1
  }
}
```

## Release an agent work claim

`DELETE /v1/agent-work/claims/{claimId}` - operationId `agent-work.release-claim`

| Permission | Rate limit |
| --- | --- |
| Any workspace member except a Network member | 4,800 requests a minute per API key |

Gives the claim's unanswered items back to the queue now and closes the claim; answers already stored stay. Returns
how many items went back. Releasing a claim that is already closed (answered, released or expired) is `200`
with `released` 0.

Errors:

- `403 forbidden`: you may not write the claim's kind.
- `404 not_found`: the workspace does not have the `agent_work` feature, or the claim is not the
workspace's.

Open to any workspace member except a Client seat who may write the claim's kind.

Needs the `agent_work` feature on your workspace. Until it is on, calls answer 404.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/agent-work/DELETE/v1/agent-work/claims/%7BclaimId%7D)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `claimId` | path | string | yes |  |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Response 200

`data` is a `AgentWorkRelease`.

| Field | Type | Description |
| --- | --- | --- |
| `released` | integer (int32) | How many held items went back to the queue. 0 for a claim already closed. |

### Request

```bash
curl -X DELETE "https://api.ken.so/v1/agent-work/claims/01JC8Z3K6Q2W4M7N9P5R1T3V5X" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID"
```

### Example response

```json
{
  "success": true,
  "data": {
    "released": 1
  }
}
```

## Types

Each named type the tables above use, nested ones included.

### AgentWorkKind

One kind of agent work.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string | no | `meeting_brief`, `call_brief`, `workflow_prompt`, `qualification`, `segmentation`, `personalization`, `rewriting` or `background_ai`. |
| `executor` | string | no | `kenso_ai` or `my_agent`, as the agent work settings set it. |
| `waiting` | integer (int32) | no | Items waiting for your agent now. 0 for a kind on `kenso_ai` or one Kenso cannot hand out yet. |
| `claimed` | integer (int32) | no | Items held by open claims right now. |
| `heldBy` | string | no | Why nothing of this kind is handed out now, or null: `billing_blocked`, `out_of_credits` or `ai_paused`. A claim skips a held kind. |
| `lastAcceptedAt` | string (date-time) | no | When an answer of this kind was last accepted, in UTC; null when none was. |

### AgentWorkItem

One item to answer.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | The item id (`awi_` and 22 URL-safe characters): the `itemId` of its answer. |
| `kind` | string | no | The item's kind, the claim's kind. |
| `target` | AgentWorkTarget | no | What the answer is for. |
| `prompt` | AgentWorkPrompt | no | The prompt Kenso's AI would have run. |
| `answer` | AgentWorkAnswerFormat | no | What the answer must look like. |

### AgentWorkTarget

What an item's answer is for.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | no | The kind of record, such as `contact` or `meeting`. |
| `id` | string | no | The record's id, as text. |
| `campaignId` | integer (int64) | no | The record's campaign, or null. |

### AgentWorkPrompt

The prompt to run.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `system` | string | no | The system prompt, or null when the kind has none. |
| `user` | string | no | The user prompt. |

### AgentWorkAnswerFormat

What an item's answer must look like.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `format` | string | no | `json` (send `output` as a JSON object) or `text` (send `output` as a string). |
| `schema` | object | no | The JSON Schema object a `json` answer follows, or null. |
| `instruction` | string | no | How to write the answer, in a sentence or two. |

### AgentWorkAgentBody

The agent that wrote the answers.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cli` | string | no | The agent's CLI, such as `claude-code` or `codex`. At most 100 characters. |
| `model` | string | no | The model that wrote the answers. At most 100 characters. |

### AgentWorkAnswerBody

One answer.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `itemId` | string | no | The item's id from the claim. |
| `output` | object | no | The answer: a JSON object for a `json` item, a string for a `text` item. At most 64 KB. |

### AgentWorkAnswerResult

One answer's result.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `itemId` | string | no | The answer's `itemId`, as sent. |
| `status` | string | no | `accepted` (stored); `rejected` (see `reason`; the item is closed and its work goes back to the queue, unless `retryable` is true); `expired` (the claim ran out or was released, or the record no longer needs an answer); `duplicate` (the item already has an answer, or one is being taken in). |
| `reason` | string | no | Why a `rejected` answer was refused: `invalid_format`, `schema_mismatch`, `wrong_language`, `leaked_reasoning`, `failed_checks`, `human_written`, `unknown_item` or `too_large`. Null otherwise. |
| `message` | string | no | A sentence for a person, or null. |
| `retryable` | boolean | no | True only when the answer was not taken in and its item is still held, so send it again (a `rejected` result with `failed_checks`). False for every other result: do not send that answer again. |

All resources: [/docs.md](/docs.md).
