ArtifactService manages artifacts: independent, org-scoped, versioned
documents. An artifact is not owned by a conversation. A conversation may
reference an artifact through a link, any number of conversations may link
the same artifact, and an artifact may exist with no link at all (for
example, created over MCP outside an agent session).The service carries artifact metadata only. Version 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.
Creates an artifact plus its version-1 row, or appends a version when artifact_id is set. When conversation_id is set on create, the new artifact is also linked to that conversation.
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.
Sets archived_date. Versions, stored bytes, and conversation links are left in place. Idempotent: archiving an already-archived artifact succeeds without changing archived_date.
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.
version_created_date
google.protobuf.Timestamp
file_name
string
optional
From the version’s remote_files row. Unset until bytes are uploaded. Clients infer preview behavior from file_name / file_mime_type.
Defaults to USER. AGENT is self-reported: the agent pod authenticates with the requesting user’s transient key, so until scoped pod credentials land (ENG-12831) authorship attribution rides on the same trust as the pod’s message persistence path.