# Agent API

The agent API for agent identities (kanso_agt_ tokens): knowledge items, decisions, meetings and one ticket by key.

24 operation(s) for tokens, 0 app-only. The full schemas are in [openapi.json](https://docs.youniton.com/openapi.json) (search the operation ID).

## Propose a ticket change for a person's exact approval; nothing changes before it

`POST /agent/actions`

- Operation ID: `proposeAgentAction`
- Call with: Agent token
- Feature: F-AST-19

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AgentActionRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | The pending proposal, with the link that a reviewer opens. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 503 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The state of the identity's proposal and, after execution, its results

`GET /agent/actions/{proposalId}`

- Operation ID: `getAgentAction`
- Call with: Agent token
- Feature: F-AST-19

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `proposalId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The proposal's state. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One page as Markdown — the published revision, or the head for an identity that may write it

`GET /agent/doc-pages/{pageId}`

- Operation ID: `getAgentDocPage`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `pageId` | path | string (uuid) | yes | A doc page id; a hidden, foreign or (for readers without edit_docs) trashed page answers 404 doc_page.not_found. |
| `source` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The page. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Replace a page's body from a named base — written at once or proposed, by the write mode

`PUT /agent/doc-pages/{pageId}/body`

- Operation ID: `writeAgentDocPageBody`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `pageId` | path | string (uuid) | yes | A doc page id; a hidden, foreign or (for readers without edit_docs) trashed page answers 404 doc_page.not_found. |

Request body (application/json, required): `DocBodyWriteRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The outcome. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Open a page-level thread as the identity

`POST /agent/doc-pages/{pageId}/comments`

- Operation ID: `postAgentDocComment`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `pageId` | path | string (uuid) | yes | A doc page id; a hidden, foreign or (for readers without edit_docs) trashed page answers 404 doc_page.not_found. |

Request body (application/json, required): `DocCommentRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | The new thread. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Propose the publication of an exact version for a person's approval

`POST /agent/doc-pages/{pageId}/publish-proposals`

- Operation ID: `proposeAgentDocPublication`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `pageId` | path | string (uuid) | yes | A doc page id; a hidden, foreign or (for readers without edit_docs) trashed page answers 404 doc_page.not_found. |

Request body (application/json, required): `DocPublishProposalRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 202 | The proposal waiting for approval. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Search the pages the identity may read

`GET /agent/doc-search`

- Operation ID: `searchAgentDocs`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `q` | query | string | yes |  |
| `spaceId` | query | string (uuid) | no |  |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | A page of hits. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The spaces the identity may read

`GET /agent/doc-spaces`

- Operation ID: `listAgentDocSpaces`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | A page of spaces. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The pages of one space that the identity may read, in tree order

`GET /agent/doc-spaces/{spaceId}/page-index`

- Operation ID: `listAgentDocSpacePageIndex`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `spaceId` | path | string (uuid) | yes | A space id; a hidden, foreign or purged space answers 404 doc_space.not_found. |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | A page of the index. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Create a page from Markdown or rich text — written at once or proposed, by the write mode

`POST /agent/doc-spaces/{spaceId}/pages`

- Operation ID: `createAgentDocPage`
- Call with: Agent token
- Feature: F-DOC-24

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `spaceId` | path | string (uuid) | yes | A space id; a hidden, foreign or purged space answers 404 doc_space.not_found. |

Request body (application/json, required): `DocAgentPageRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | The outcome (written with the page and version, or proposed with the change). | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Deliver one meeting (contract version 1) into a project's memory

`POST /agent/meetings`

- Operation ID: `submitAgentMeeting`
- Call with: Agent token
- Feature: F-MEM-09

The meeting's segment (segmentKey, else the fallbacks of F-MEM-13.R08) must be in the identity's segments ∩ the owner's readable segments; otherwise 422 validation.failed with memory.segment_not_allowed, and nothing is stored.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `MeetingIntakeV1`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The stored result of the same revision and digest, or of a higher revision applied to the items. | application/json | `object` |
| 201 | The items of a new meeting. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 413 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 503 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The item-type registry with the tenant's active types

`GET /agent/memory/item-types`

- Operation ID: `listAgentItemTypes`
- Call with: Agent token
- Feature: F-MEM-06

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The type catalogue. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Search or list the knowledge items that the identity may read

`GET /agent/memory/items`

- Operation ID: `searchAgentKnowledgeItems`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |
| `projectKey` | query | string | no |  |
| `q` | query | string | no |  |
| `mode` | query | string | no |  |
| `type` | query | array of string | no |  |
| `tag` | query | array of string | no |  |
| `linkedTicketKey` | query | string | no |  |
| `updatedFrom` | query | string (date-time) | no |  |
| `mine` | query | boolean | no | Only the items that this identity wrote. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | A page of up to 50 rows (20 in semantic mode). | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Add a knowledge item as the identity

`POST /agent/memory/items`

- Operation ID: `createAgentKnowledgeItem`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |

Request body (application/json, required): `AgentKnowledgeItemInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The existing item of the same external id and body (R10). | application/json | `object` |
| 201 | The new item, active (direct mode) or proposed (review mode). | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 413 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One knowledge item with its provenance and visible links

`GET /agent/memory/items/{itemKey}`

- Operation ID: `getAgentKnowledgeItem`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The item as the identity may read it. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Revise an item that this identity wrote

`PATCH /agent/memory/items/{itemKey}`

- Operation ID: `reviseAgentKnowledgeItem`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |

Request body (application/merge-patch+json, required): `KnowledgeItemPatch`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The revised item, or the item with a pending revision in review mode. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Accept a proposed decision that this identity wrote (decisions:accept)

`POST /agent/memory/items/{itemKey}/decision-status`

- Operation ID: `acceptAgentDecision`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |

Request body (application/json, required): `DecisionStatusRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The accepted decision. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Link an item that this identity wrote

`POST /agent/memory/items/{itemKey}/links`

- Operation ID: `addAgentKnowledgeLink`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |

Request body (application/json, required): `KnowledgeLinkInput`

| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | The item with its visible links. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Remove a link of an item that this identity wrote

`DELETE /agent/memory/items/{itemKey}/links/{linkId}`

- Operation ID: `removeAgentKnowledgeLink`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |
| `linkId` | path | string (uuid) | yes |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | The link is gone. |  |  |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The passages of a meeting transcript item, in order

`GET /agent/memory/items/{itemKey}/passages`

- Operation ID: `listAgentTranscriptPassages`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |
| `fromPassage` | query | integer | no |  |
| `limit` | query | integer | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Up to 500 passages from fromPassage. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Retract an item that this identity wrote

`POST /agent/memory/items/{itemKey}/retract`

- Operation ID: `retractAgentKnowledgeItem`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | yes | Durable command receipt key (05-api §7.2); the generated client sends one UUIDv7 per user intent. |
| `If-Match` | header | string | yes | The resource version in quotes (05-api §7.1); missing answers 428, different answers 412. |
| `itemKey` | path | string | yes | A knowledge item key, upper-cased and resolved through the project key aliases; hidden and missing are one 404. |

Request body (application/json, required): `KnowledgeReasonRequest`

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The retracted item. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 409 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 412 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 428 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The project's decision log as the identity's owner may see it

`GET /agent/projects/{projectKey}/decisions`

- Operation ID: `listAgentProjectDecisions`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `projectKey` | path | string | yes | A project key, upper-cased and resolved through the key aliases (04 §5.3); hidden and missing are one 404. |
| `page[cursor]` | query | string | no | The opaque cursor of the previous page's links.next (05-api §5). |
| `status` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | A keyset page of up to 50 decisions. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## One ticket of the identity's projects, in the owner's mask (tickets:read)

`GET /agent/tickets/{ticketKey}`

- Operation ID: `getAgentTicket`
- Call with: Agent token
- Feature: F-MEM-06

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `ticketKey` | path | string | yes | A ticket key, upper-cased and resolved through the project key aliases (04 §5.3); hidden and missing are one 404. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The ticket, masked fields absent. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The calling identity, its owner, abilities, projects and effective write mode

`GET /agent/whoami`

- Operation ID: `getAgentWhoAmI`
- Call with: Agent token
- Feature: F-MEM-06

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | The identity's scope as it is now. | application/json | `object` |
| 401 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | Not found (05-api §6.4; XM-787). The code is route.not_found (no route for the URL, a path value outside the route's pattern, or an audience outside the route's area), tenant.not_found (an unknown, foreign or inactive X-Kanso-Tenant) or <resource>.not_found (an unknown resource or a resource that the caller cannot see). A hidden resource and a missing resource get the same body: only instance and traceId change from call to call. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
