Methods
| Method | Params | Result | Purpose |
|---|---|---|---|
artifact/capabilities | ArtifactCapabilitiesParams | ArtifactCapabilitiesResponse | Read upload/download limits and chunk sizes for a workspace. |
artifact/list | ArtifactListParams | ArtifactListResponse | List workspace artifacts with optional scope filters. |
artifact/list/thread | ArtifactListForThreadParams | ArtifactListResponse | List artifacts for one materialized thread. Requires thread_id. |
artifact/list/turn | ArtifactListForTurnParams | ArtifactListResponse | List artifacts for one turn. Requires turn_id. |
artifact/list/message | ArtifactListForMessageParams | ArtifactListResponse | List artifacts for one message. Requires message_id. |
artifact/get | ArtifactGetParams | ArtifactGetResponse | Load one artifact summary. |
artifact/read | ArtifactReadParams | ArtifactReadResponse | Read a small range of an artifact or projection as base64 JSON. |
artifact/bind | ArtifactBindParams | ArtifactBindResponse | Attach an existing artifact/version to thread, turn, message, item, tool, or task lineage. |
artifact/delete | ArtifactDeleteParams | ArtifactDeleteResponse | Soft-delete an artifact. |
artifact/restore | ArtifactRestoreParams | ArtifactRestoreResponse | Restore a soft-deleted artifact. |
artifact/upload/start | ArtifactUploadStartParams | ArtifactUploadStartResponse | Start a client-to-gateway upload session. |
artifact/upload/finish | ArtifactUploadFinishParams | ArtifactUploadFinishResponse | Validate and persist a completed upload. |
artifact/upload/abort | ArtifactUploadAbortParams | ArtifactUploadAbortResponse | Abort an upload session and remove temp bytes. |
artifact/download/start | ArtifactDownloadStartParams | ArtifactDownloadStartResponse | Start a gateway-to-client download session. |
artifact/download/chunk | ArtifactDownloadChunkParams | ArtifactDownloadChunkResponse | Request a binary download chunk. |
artifact/download/finish | ArtifactDownloadFinishParams | ArtifactDownloadFinishResponse | Finish a download session. |
artifact/download/abort | ArtifactDownloadAbortParams | ArtifactDownloadAbortResponse | Abort a download session. |
snake_case field names.
Artifact Summary
Most list and get responses returnArtifactSummary.
| Type | Values |
|---|---|
ArtifactKind | file, text, image, audio, video, pdf, spreadsheet, archive, json, generated_image, screenshot, workspace_file, directory_manifest, unknown |
ArtifactStatus | ready, pending, quarantined, deleted, missing_external_source, failed |
ArtifactCreatedByKind | user, agent, tool, task, system, import, external_agent |
ArtifactBindingKind | user_input, agent_output, tool_output, task_result, context_attachment, derived_from, preview, manual_attach, draft_upload |
ArtifactBindingDirection | input, output, context, derived |
ArtifactProjectionKind | plain_text, thumbnail, json_summary, pdf_text |
ArtifactProjectionStatus | pending, ready, failed, stale |
Capabilities
Ask the gateway for limits before starting upload or download UI.required_for_local_paths means clients should upload local files to the gateway before referring to them in a turn. This is required for remote gateways and is the safe default for local gateways too.
Agent Artifact Tools
Agent-created user-visible files use model-facing tools, not client JSON-RPC methods. The tools are registered inside an agent turn when artifact registration is enabled, then made visible by turn preflight or byrequest_tools with the artifact domain.
artifact_prepare reserves a safe staging path before the file exists. It does not create an artifact.
outputPath is inside PIONEER_ARTIFACT_OUTPUT_DIR. It is a temporary gateway path that can be passed to shell, browser, renderer, MCP, or skill tools. It is not a durable artifact id and must not be treated as a client-visible file location.
artifact_register imports a completed regular file into the workspace artifact store and binds it to the current turn.
artifact_register errors include: the file does not exist, the path is outside the allowed workspace or staging roots, the path escapes through a symlink, the path is not a regular file, the file is too large, the workspace quota would be exceeded, or the file was already removed from staging.
If the final assistant message mentions PIONEER_ARTIFACT_OUTPUT_DIR or a private gateway path instead of a registered artifact, the gateway can ask the agent to retry registration once. If registration still does not happen, the turn fails instead of presenting a private path as the result.
artifact_read
artifact_read is the model-facing read tool for artifact continuity. It is different from the client JSON-RPC method artifact/read.
The model sees artifact refs in recent history or recalled thread context as metadata. If it needs actual file content, it requests the hidden artifact domain and then calls artifact_read for the specific artifact ids it needs. The gateway resolves workspace, thread, turn, and authorization from the active agent turn; the model does not pass workspace_id.
Typical arguments are camelCase because this is a model tool contract:
artifact_read visible by themselves. They tell the model what can be requested. The capability becomes callable only after normal tool visibility rules reveal the artifact domain.
Listing Artifacts
Useartifact/list/thread for the thread artifacts panel.
artifact/list/thread for a draft thread that has not been materialized. The gateway validates that the thread exists and belongs to the workspace.
Reading Small Content
artifact/read is for previews, small text, and ranged reads. It returns base64 inside a JSON response and is capped by the gateway’s JSON read limit.
Upload Flow
Start an upload session:artifact/upload/start, send chunks as binary WebSocket frames on the same authenticated connection.
Upload Binary Chunk Frame
| Bytes | Content |
|---|---|
0..4 | Magic bytes: ARTU |
4..8 | Big-endian u32 header length. |
next header_len | UTF-8 JSON ArtifactUploadChunkHeader. |
| remaining bytes | Raw file chunk bytes. |
artifact/upload/chunk_ack:
next_offset as the authoritative resume point.
Finish the upload:
artifact/upload/abort.
Download Flow
Start a download session:Download Binary Chunk Frame
| Bytes | Content |
|---|---|
0..4 | Magic bytes: ARTD |
4..8 | Big-endian u32 header length. |
next header_len | UTF-8 JSON ArtifactDownloadChunkHeader. |
| remaining bytes | Raw file chunk bytes. |
artifact/download/finish. If the user cancels, call artifact/download/abort.
Binding Existing Artifacts
Useartifact/bind when a client or gateway flow needs to associate an existing artifact with a new message, turn, tool call, or task result.
Notifications
| Event | Params | Meaning |
|---|---|---|
artifact/created | ArtifactCreatedNotification | An artifact was created and is ready to display. |
artifact/updated | ArtifactUpdatedNotification | Artifact metadata or current version changed. |
artifact/deleted | ArtifactDeletedNotification | Artifact was soft-deleted. |
thread/artifacts/changed | ThreadArtifactsChangedNotification | A thread-level artifacts list should be refreshed. |
artifact/projection/updated | ArtifactProjectionUpdatedNotification | A projection, such as a thumbnail, changed state. |
artifact/upload/chunk_ack | ArtifactUploadChunkAckNotification | A binary upload chunk was accepted. |
artifact/upload/progress | ArtifactUploadProgressNotification | Optional aggregate upload progress notification. |
artifact/download/progress | ArtifactDownloadProgressNotification | Optional aggregate download progress notification. |
thread/artifacts/changed, not only on artifact/created, because one artifact may gain new bindings or metadata without creating a new artifact id.
Client Rules
- Always include
workspace_id. - Do not list artifacts for draft threads that have not been created on the gateway.
- Use
artifact/readonly for small ranges or projections; use download sessions for full files. - Verify
sha256for completed uploads, download chunks, and final downloaded files. - Treat desktop paths and gateway paths as different machines unless you know the gateway is local.
- Store local preview/download caches as disposable client state.
- Use generated schemas from
/schemasfor exact validation.