Skip to main content
ArtifactsRuntimeCapability exposes ArtifactsApi under platform.artifacts. It manages durable deliverables generated by plugins and Agents, including HTML, Markdown, PDF, PowerPoint, images, files, Sites, and presentations. Artifact content bytes live in Workspace Files. The Artifact service adds stable business identity, immutable version history, governed access links, lifecycle state, and access counters.

Data model

An Artifact flow has three layers:
  1. Artifact container — stable plugin-owned identity defined by pluginName, resourceType, and resourceId.
  2. Artifact version — immutable content described by a WorkspacePortableFileReference, MIME type, checksums, and metadata.
  3. Artifact link — an open/share/download entrypoint with a version policy, access mode, expiration, and presentation policy.
Supported Artifact kinds are html, markdown, pdf, pptx, image, file, site, and presentation.

Container and version methods

Container status is active, archived, or deleted. Version status is active or deleted. Link status is active, revoked, or expired. versionMode: 'latest' follows the current Artifact version; versionMode: 'version' pins an immutable version. Access modes are:
  • owner_only
  • workspace_all
  • organization_all
  • custom_principals
  • public_link
  • signed_preview
Presentation can use inline or attachment, can allow or disallow download, and can apply the strict or interactive safe-HTML profile.

Publish a generated file

Write bytes to Workspace Files first, then create or reuse the Artifact version and share:
Use a deterministic version idempotencyKey that represents the same immutable content. ensureArtifactVersion() reports created or reused; ensureArtifactShare() reports created, reused, or replaced.

Security and lifecycle rules

  • Do not store content bytes in Artifact metadata. Store them in Workspace Files and pass the portable reference.
  • Require explicit user confirmation before requesting public_link; set userConfirmedPublicLink in the access input.
  • Use createSignedPreviewLink() only for short-lived previews. Store a shareKey and use ensureArtifactShare() for a durable share policy.
  • Pin a version for review, approval, audit, and reproducible delivery. Use latest only when readers should always see the current version.
  • Choose strict HTML unless the deliverable needs the platform’s interactive HTML allowance.
  • Revoke links or share slots when access should end. Archiving the business object should also drive the plugin’s Artifact lifecycle policy.