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

# artifacts

> sift/artifacts/v1/artifacts.proto

## Services

*RPC methods exposed by this API.*

### ArtifactService

ArtifactService manages an organization-scoped, versioned generic artifact
store. Content lives in remote\_files, and storage\_class decides whether
clients may preview it. Attachment and provenance are links, and metadata
uses the shared metadata values (sift.metadata.v1). No conversation owns an
artifact.

Links are append-only and belong to the version they were written at. A
version's rows are its complete link set. ATTACHED\_TO rows carry forward to
each new version until unlinked. SOURCE and DERIVED\_FROM rows describe the
bytes, so they carry forward while the bytes do: a version with new bytes
starts with only the provenance its request supplies, and earlier versions
keep theirs. Linking and unlinking write a new version whose content is
copied from the previous one.

Artifact bytes live in remote\_files (entity\_type 'artifact\_versions',
entity\_id = artifact\_version\_id): upload via the remote-files multipart
endpoint, download via RemoteFileService.GetRemoteFileDownloadUrl.

| Method | Request | Response | Description |
| :- | :- | :- | :- |
| CreateArtifact | [CreateArtifactRequest](#createartifactrequest) | [CreateArtifactResponse](#createartifactresponse) | Creates an artifact plus its version-1 entry. When conversation\_id is set, the new artifact is also linked to that conversation. Use UpdateArtifact to add a version to an artifact that already exists. |
| UpdateArtifact | [UpdateArtifactRequest](#updateartifactrequest) | [UpdateArtifactResponse](#updateartifactresponse) | Writes a new version carrying the fields update\_mask names. Everything the mask leaves out is copied from the latest version, so a caller can change one field without resending the rest. |
| GetArtifact | [GetArtifactRequest](#getartifactrequest) | [GetArtifactResponse](#getartifactresponse) | Resolves to the latest version unless artifact\_version\_id pins one. |
| ListArtifacts | [ListArtifactsRequest](#listartifactsrequest) | [ListArtifactsResponse](#listartifactsresponse) | One entry per artifact, resolved to its latest version, oldest first. With conversation\_id set, only artifacts linked to that conversation; otherwise every artifact in the caller's organization. |
| ListArtifactVersions | [ListArtifactVersionsRequest](#listartifactversionsrequest) | [ListArtifactVersionsResponse](#listartifactversionsresponse) | Lists artifact versions, newest first by default. artifact\_id names one artifact; unset searches the versions of every artifact in the caller's organization. filter and order\_by apply to each version, so a filter can match an earlier version that the latest no longer does. ArtifactVersion.is\_current marks each artifact's current version. |
| PromoteArtifactVersion | [PromoteArtifactVersionRequest](#promoteartifactversionrequest) | [PromoteArtifactVersionResponse](#promoteartifactversionresponse) | Makes an older version the latest again by writing a new version whose title, summary, metadata, bytes, and SOURCE and DERIVED\_FROM links are copied from it. ATTACHED\_TO links carry forward from the latest version. Only the artifact's creator may promote, and promoting the current latest version is a FailedPrecondition. |
| ListArtifactLinks | [ListArtifactLinksRequest](#listartifactlinksrequest) | [ListArtifactLinksResponse](#listartifactlinksresponse) | Lists the links of one artifact version, the latest by default. |
| LinkArtifactToConversation | [LinkArtifactToConversationRequest](#linkartifacttoconversationrequest) | [LinkArtifactToConversationResponse](#linkartifacttoconversationresponse) | Links an existing artifact to a conversation. Equivalent to LinkArtifact with relation ATTACHED\_TO and entity\_type CONVERSATION. Idempotent: linking an already-linked pair succeeds without effect. |
| UnlinkArtifactFromConversation | [UnlinkArtifactFromConversationRequest](#unlinkartifactfromconversationrequest) | [UnlinkArtifactFromConversationResponse](#unlinkartifactfromconversationresponse) | Removes one conversation's link to an artifact. Equivalent to UnlinkArtifact with relation ATTACHED\_TO and entity\_type CONVERSATION, so it writes a new version that omits the link and carries the previous content forward. Idempotent: unlinking a missing link succeeds without writing a version. |
| ArchiveArtifact | [ArchiveArtifactRequest](#archiveartifactrequest) | [ArchiveArtifactResponse](#archiveartifactresponse) | Sets archived\_date. Versions, bytes, and links are left in place. Idempotent: archiving an already-archived artifact succeeds without changing archived\_date. |
| UnarchiveArtifact | [UnarchiveArtifactRequest](#unarchiveartifactrequest) | [UnarchiveArtifactResponse](#unarchiveartifactresponse) | Clears archived\_date. Idempotent: unarchiving an active artifact succeeds without effect. |
| BatchArchiveArtifacts | [BatchArchiveArtifactsRequest](#batcharchiveartifactsrequest) | [BatchArchiveArtifactsResponse](#batcharchiveartifactsresponse) | Archives up to 1000 artifacts. Every artifact must exist in the caller's organization and belong to the caller, or nothing is archived. Artifacts that are already archived keep their archived\_date. |
| BatchUnarchiveArtifacts | [BatchUnarchiveArtifactsRequest](#batchunarchiveartifactsrequest) | [BatchUnarchiveArtifactsResponse](#batchunarchiveartifactsresponse) | Unarchives up to 1000 artifacts, with the same rules as BatchArchiveArtifacts. |

## Messages

*Data models used across requests/responses.*

### ArchiveArtifactRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |

### ArchiveArtifactResponse

*This message has no fields.*

### Artifact

The container. Everything that varies by version lives on ArtifactVersion,
and the two travel together in ArtifactDetails.

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| organization\_id | string | | |
| created\_by\_user\_id | string | | |
| created\_date | google.protobuf.Timestamp | | |
| archived\_date | google.protobuf.Timestamp | optional | Unset while the artifact is active. |
| storage\_class | [ArtifactStorageClass](#artifactstorageclass) | | |
| created\_via | [ArtifactCreatedVia](#artifactcreatedvia) | | |
| current\_version\_id | string | | The artifact's latest version. A pinned read reports it too, so a client holding an older version can tell that it is behind. |

### ArtifactDetails

An artifact and one of its versions: the one artifact\_version\_id pinned, or
the latest.

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact | [Artifact](#artifact) | | |
| artifact\_version | [ArtifactVersion](#artifactversion) | | |

### ArtifactLink

A link from an artifact to another entity, belonging to one version.

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_link\_id | string | | |
| artifact\_id | string | | |
| artifact\_version\_id | string | | The version this row was written at. A row that still applies is restated on each new version (see ArtifactService). |
| relation | [ArtifactLinkRelation](#artifactlinkrelation) | | |
| entity\_type | [ArtifactEntityType](#artifactentitytype) | | |
| entity\_id | string | | |
| organization\_id | string | | |
| created\_date | google.protobuf.Timestamp | | |
| created\_by\_user\_id | string | optional | The user who wrote the row. Unset when an agent or the system wrote it. |

### ArtifactLinkInput

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| relation | [ArtifactLinkRelation](#artifactlinkrelation) | | |
| entity\_type | [ArtifactEntityType](#artifactentitytype) | | |
| entity\_id | string | | |

### ArtifactVersion

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_version\_id | string | | |
| artifact\_id | string | | |
| version | uint32 | | |
| title | string | optional | |
| summary | string | optional | |
| authoring\_message\_id | string | optional | Set only for versions authored inside a conversation, and there only after the introducing message persists: uploads attach before the user sends, and agent turns persist messages only at end of turn. |
| source\_tool\_use\_ids | string | repeated | |
| remote\_file\_id | string | optional | Unset until bytes are uploaded. |
| created\_date | google.protobuf.Timestamp | | |
| file\_name | string | optional | From the version's remote\_files record. Unset until bytes are uploaded. Clients infer preview behavior from file\_name / file\_mime\_type. |
| file\_mime\_type | string | optional | |
| payload | google.protobuf.Struct | optional | **Deprecated.** Deprecated: STRUCTURED artifacts are no longer accepted. Always unset. |
| metadata | [sift.metadata.v1.MetadataValue](#sift-metadata-v1-metadatavalue) | repeated | Metadata attached to this version. |
| file\_size | uint64 | optional | Size of the version's file in bytes. Unset until bytes are uploaded. |
| is\_current | bool | | True when this is the artifact's current version, the one GetArtifact returns without a pin. A version still waiting for its upload is never current. |
| file\_sha256 | string | optional | Lowercase hex SHA-256 of the version's file bytes, as the client sent it with the upload. The server does not check it against the bytes. Unset when the client sent none. Compare it with the local file's hash before creating a new version, to skip an upload that would change nothing. |

### BatchArchiveArtifactsRequest

The artifacts to archive. Every one must belong to the caller.

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_ids | string | repeated | |

### BatchArchiveArtifactsResponse

Empty on success; nothing is archived on failure.

*This message has no fields.*

### BatchUnarchiveArtifactsRequest

The artifacts to unarchive. Every one must belong to the caller.

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_ids | string | repeated | |

### BatchUnarchiveArtifactsResponse

Empty on success; nothing is unarchived on failure.

*This message has no fields.*

### CreateArtifactRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| conversation\_id | string | optional | Set to link the new artifact to a conversation at create time. Legal only for the conversation's author. Equivalent to a links entry with relation ATTACHED\_TO, entity\_type CONVERSATION, and this conversation\_id as entity\_id. |
| title | string | optional | |
| summary | string | optional | |
| storage\_class | [ArtifactStorageClass](#artifactstorageclass) | optional | A container field. Defaults to FILE when unset. |
| created\_via | [ArtifactCreatedVia](#artifactcreatedvia) | optional | A container field. Defaults to AGENT when unset. It also decides link attribution: an AGENT artifact's links record no user, because the pod acts with the user's key but the user granted nothing. |
| payload | google.protobuf.Struct | optional | **Deprecated.** Deprecated: STRUCTURED artifacts are no longer accepted. Setting it is InvalidArgument. |
| links | [ArtifactLinkInput](#artifactlinkinput) | repeated | Links written at version 1. |
| metadata | [sift.metadata.v1.MetadataValue](#sift-metadata-v1-metadatavalue) | repeated | Metadata attached to the created version. |

### CreateArtifactResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact | [ArtifactDetails](#artifactdetails) | | |

### GetArtifactRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| artifact\_version\_id | string | optional | |

### GetArtifactResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact | [ArtifactDetails](#artifactdetails) | | |

### LinkArtifactToConversationRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| conversation\_id | string | | |

### LinkArtifactToConversationResponse

*This message has no fields.*

### ListArtifactLinksRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| relation | [ArtifactLinkRelation](#artifactlinkrelation) | optional | |
| page\_size | uint32 | | |
| page\_token | string | | |
| artifact\_version\_id | string | optional | Defaults to the latest version. |

### ListArtifactLinksResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| links | [ArtifactLink](#artifactlink) | repeated | |
| next\_page\_token | string | | |

### ListArtifactVersionsRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | The artifact whose versions to list. Unset searches the versions of every artifact in the caller's organization. A named artifact lists its versions even when it is archived. |
| page\_size | uint32 | | Defaults to 50; values above 200 are treated as 200. |
| page\_token | string | | From a previous response's next\_page\_token. Offset tokens from before this field took cursors are rejected (InvalidArgument). |
| filter | string | | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string with the ListArtifacts fields, evaluated against each version instead of the latest: title, version, file\_name, file\_type, version\_created\_date, metadata, links, runs, assets, and canvases describe the version, and the artifact fields describe its container. GetArtifactVersionFilterFields returns the fields. With artifact\_id unset, versions of archived artifacts are excluded unless the query says otherwise, as in ListArtifacts. |
| order\_by | string | | A comma-separated [AIP-132](https://google.aip.dev/132#ordering) ordering string over created\_date (when the version was written), version, and title. Fields sort ascending by default and support a `desc` suffix. The default is created\_date descending. |

### ListArtifactVersionsResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| versions | [ArtifactVersion](#artifactversion) | repeated | |
| next\_page\_token | string | | |

### ListArtifactsRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| conversation\_id | string | optional | Unset lists every artifact in the caller's organization. |
| page\_size | uint32 | | |
| page\_token | string | | |
| filter | string | | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string over the latest version of each artifact. Available fields are artifact\_id, organization\_id, created\_by\_user\_id, storage\_class, created\_via, title, file\_name, file\_type, version, created\_date, version\_created\_date (last updated), archived\_date, the include\_archived directive, and metadata through `metadata["<key>"]`. File type is the lowercase extension or MIME subtype; images use "image", JSON files use "json", and artifacts without a file use "file". Enum fields compare against proto value names without the prefix, for example `storage_class == "BLOB"`. |

Links filter with a comprehension. `links` sub-fields are relation, entity\_type, entity\_id, and artifact\_version\_id, for example `links.exists(l, l.entity_type == "CONVERSATION" && l.entity_id == "<id>")`. `runs` (relation, run\_id, name, description, client\_key, start\_time, stop\_time), `assets` (relation, asset\_id, name), and `canvases` (relation, canvas\_id, name, description) resolve links of any relation to that entity, for example `runs.exists(r, r.relation == "SOURCE" && r.name.contains("thermal"))`. runs and assets only match rows on assets the caller can view; ABAC policies are not applied to them yet. GetArtifactFilterFields returns the same fields. The conversation\_id field on this message combines with filter.

Archived artifacts are excluded unless the query says otherwise, either through `include_archived == true` or by filtering on archived\_date, which governs archival on its own. |
\| order\_by | string |  | A comma-separated [AIP-132](https://google.aip.dev/132#ordering) ordering string over created\_date, version\_created\_date (last updated), archived\_date, title, version, and file\_type. Fields sort ascending by default and support a `desc` suffix. The default is created\_date ascending. |

### ListArtifactsResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifacts | [ArtifactDetails](#artifactdetails) | repeated | |
| next\_page\_token | string | | |

### PromoteArtifactVersionRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| artifact\_version\_id | string | | The version whose content becomes the new latest version. |

### PromoteArtifactVersionResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact | [ArtifactDetails](#artifactdetails) | | The artifact resolved to the version this call wrote. |

### UnarchiveArtifactRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |

### UnarchiveArtifactResponse

*This message has no fields.*

### UnlinkArtifactFromConversationRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| conversation\_id | string | | |

### UnlinkArtifactFromConversationResponse

*This message has no fields.*

### UpdateArtifactRequest

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact\_id | string | | |
| artifact | [ArtifactDetails](#artifactdetails) | | Carries the values update\_mask names. Only artifact\_version fields are updatable; the container's own fields are set at create time, and archival has its own RPCs. Leaving it out clears every field the mask names. |
| links | [ArtifactLinkInput](#artifactlinkinput) | repeated | Links written at the new version, when update\_mask names `links`. They are added to the links that carry forward (see ArtifactService). With `artifact_version.remote_file_id`, these are the new bytes' only provenance. |
| update\_mask | [google.protobuf.FieldMask](#google-protobuf-fieldmask) | | The fields to write. Available paths are `artifact_version.title`, `artifact_version.summary`, `artifact_version.metadata`, `artifact_version.remote_file_id`, and `links`. A path the service does not know is rejected. |

`artifact_version.remote_file_id` is a declaration, not a value: it says the caller is about to upload new bytes for the returned version, so the previous version's remote\_files rows and its SOURCE and DERIVED\_FROM links are not carried forward. The current version stays unchanged until the upload commits. The request value is ignored. Leave the path out to keep the existing bytes. |

### UpdateArtifactResponse

| Field | Type | Label | Description |
| :- | :- | :- | :- |
| artifact | [ArtifactDetails](#artifactdetails) | | |

## Enums

*Allowed constant values used in message fields.*

### ArtifactCreatedVia

Which surface wrote the artifact.

| Name | Number | Description |
| :- | :- | :- |
| ARTIFACT\_CREATED\_VIA\_UNSPECIFIED | 0 | The producing surface is not specified. |
| ARTIFACT\_CREATED\_VIA\_AGENT | 1 | An agent wrote the artifact. |
| ARTIFACT\_CREATED\_VIA\_CANVAS | 2 | Canvas wrote the artifact. |
| ARTIFACT\_CREATED\_VIA\_UPLOAD | 3 | A direct upload wrote the artifact. |

### ArtifactEntityType

The kind of entity an artifact link points at. entity\_id is opaque: a UUID
for Sift entities, or the provider tool\_use\_id for TOOL\_USE.

| Name | Number | Description |
| :- | :- | :- |
| ARTIFACT\_ENTITY\_TYPE\_UNSPECIFIED | 0 | The entity type is not specified. |
| ARTIFACT\_ENTITY\_TYPE\_CONVERSATION | 1 | |
| ARTIFACT\_ENTITY\_TYPE\_CANVAS | 2 | |
| ARTIFACT\_ENTITY\_TYPE\_RUN | 3 | |
| ARTIFACT\_ENTITY\_TYPE\_ASSET | 4 | |
| ARTIFACT\_ENTITY\_TYPE\_ARTIFACT | 5 | |
| ARTIFACT\_ENTITY\_TYPE\_TOOL\_USE | 6 | |
| ARTIFACT\_ENTITY\_TYPE\_CANVAS\_EXECUTION | 7 | |

### ArtifactLinkRelation

| Name | Number | Description |
| :- | :- | :- |
| ARTIFACT\_LINK\_RELATION\_UNSPECIFIED | 0 | The link relation is not specified. |
| ARTIFACT\_LINK\_RELATION\_ATTACHED\_TO | 1 | Placement, where the artifact surfaces. |
| ARTIFACT\_LINK\_RELATION\_SOURCE | 2 | Provenance, what the artifact was produced from; immutable. |
| ARTIFACT\_LINK\_RELATION\_DERIVED\_FROM | 3 | Artifact-to-artifact. |

### ArtifactStorageClass

| Name | Number | Description |
| :- | :- | :- |
| ARTIFACT\_STORAGE\_CLASS\_UNSPECIFIED | 0 | The storage class is not specified. |
| ARTIFACT\_STORAGE\_CLASS\_FILE | 1 | Bytes in remote\_files, previewable by MIME type. |
| ARTIFACT\_STORAGE\_CLASS\_STRUCTURED | 2 | **Deprecated.** Deprecated: content as a JSON payload. No longer accepted on create; use FILE or BLOB. |
| ARTIFACT\_STORAGE\_CLASS\_BLOB | 3 | Bytes in remote\_files, opaque, download only. |
