# List agent artifacts

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Filter currently accessible agent artifacts by file category, source, and generation time.


```http
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-artifacts
```

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`. For private deployments, use the corresponding product API URL.

[Prepare identity, volume permissions, and version references](objects.md#prepare).

## Request

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts?page=1&page_size=10&file_category=document&file_category=spreadsheet" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

Next-page example:

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agent-artifacts?page=2&page_size=10&file_category=document&file_category=spreadsheet" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameters

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | Path | string | Yes | Workspace ID in the current environment. |
| `page` | Queries | integer | No | Page number, starting at 1; defaults to 1. Explicit 0 or negative values are rejected. |
| `page_size` | Queries | integer | No | Items per page; defaults to 10 and accepts 1–100. |
| `keyword` | Queries | string | No | Search text for a file name or artifact ID. |
| `status` | Queries | string | No | Defaults to completed; accepts processing/completed/failed/deleted/expired. |
| `agent_workspace_id` | Queries | string | No | Workspace ID of the agent definition. |
| `agent_id` | Queries | string | No | Agent ID. |
| `conversation_id` | Queries | string | No | Source conversation ID; additionally restricted to source conversations/tasks owned by the current user. |
| `created_by` | Queries | string | No | File creator ID. |
| `file_category` | Queries | string, repeatable | No | image/document/spreadsheet/audio/video/archive/other. Repeat the parameter for multiple values. |
| `generated_from` | Queries | string | No | Inclusive lower bound for generation time, in RFC3339. |
| `generated_to` | Queries | string | No | Exclusive upper bound for generation time, in RFC3339; must follow the lower bound. |

Lists only rows within current volume permissions, current placements, and valid sources. Specifying deleted does not guarantee recovery of unmounted records. Stop normal pagination when page × page_size reaches total or the page is empty. snapshot_at is regenerated for each request; the API has no input to fix it across pages. Concurrent changes can affect offset pagination.

:::::
::::::
:::::::

## Successful response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": 0,
  "data": {
    "items": [
      {
        "workspace_id": "workspace-example",
        "artifact_id": "artifact-example",
        "version": 1,
        "artifact_kind": "file",
        "status": "completed",
        "file_id": "file-example",
        "placement_id": 23,
        "volume_id": 10,
        "file_path": "reports/summary.txt",
        "file_name": "summary.txt",
        "content_type": "text/plain",
        "file_category": "document",
        "size": 128,
        "md5": "0123456789abcdef0123456789abcdef",
        "agent_workspace_id": "workspace-example",
        "agent_id": "agent-example",
        "agent_name": "资料助手",
        "conversation_id": "conversation-example",
        "conversation_title": "资料整理",
        "task_id": "task-example",
        "call_id": "call-example",
        "tool_id": "tool-example",
        "created_by": "user-example",
        "creator_name": "示例用户",
        "source_event_id": "event-example",
        "source_event_seq": 3,
        "generated_at": "2026-11-12T01:00:00Z",
        "created_at": "2026-11-12T01:00:00Z",
        "updated_at": "2026-11-12T01:00:00Z"
      }
    ],
    "agent_sources": [
      {
        "agent_workspace_id": "workspace-example",
        "agent_id": "agent-example"
      }
    ],
    "creator_sources": [
      {
        "created_by": "user-example",
        "creator_name": "示例用户"
      }
    ],
    "total": 1,
    "page": 1,
    "page_size": 10,
    "snapshot_at": "2026-11-12T01:00:00Z"
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | 0 on success; batch operations still require checking each item result. |
| `data` | object | [Corresponding response object](objects.md#responses). |

:::::
::::::
:::::::

## Error responses

[Errors and result confirmation](boundaries.md#errors) distinguishes whole-request failure, per-item failure, and invisible sources.
