Artifacts
Generated Action Agent files, their recognition and size limits, storage paths, failure behavior, and separation from uploads and Flow artifacts.
Artifacts
An Agent artifact is a file-shaped result persisted from a completed Action Agent chat turn. It belongs to the organization, Agent, and Agent session. It does not belong to an ActionFlow run.
Artifact types are separate
| Record | Typical source | Storage identity |
|---|---|---|
Generated Agent artifact (ArtifactType.generated) | A recognized file or file-shaped tool result in an Agent turn | agentId + agentSessionId; no Flow or Flow-run ID |
Uploaded artifact (ArtifactType.uploaded) | Manual storage upload or Knowledge Base document | Organization upload; usually no Agent, Flow, or session ID |
Generated Flow artifact (ArtifactType.generated) | A supported file-producing AI node in an ActionFlow run | actionFlowId + optional actionFlowRunId; no Agent ID |
Generated Agent files appear in the Action Agent Studio Artifacts view, the Agent overview, and Storage → Agent Artifacts. Flow files appear in the Flow run's Artifacts view and Storage → Flow Artifacts. Knowledge files remain in the Knowledge Base and its uploaded-storage folder.
The storage path convention is:
organizations/{organizationId}/artifacts/agents/{agentId}/{sessionId}/{timestamp}-{fileName}File names are sanitized for the object key. The Artifact row also records the original prepared file name, MIME type, byte size, Agent ID, session ID, and organization ID.
What becomes an Agent artifact
Persistence runs from the turn-completion hook and examines the newly produced assistant UI message parts in that completion event. It recognizes:
- AI SDK
fileparts with a URL; and - available dynamic or named tool output parts whose output contains a recognized file-shaped payload.
A recognized file-shaped payload can use base64, b64_json, fileData, url, or downloadUrl, plus a file name or binary MIME type. The collector also looks in common files, data, and content containers.
There is an important mismatch in the current collector and resolver: a non-empty string field named data can cause candidate collection, but the Agent artifact resolver does not read that string field. A string data value is therefore collected and then skipped rather than persisted. At the resolver layer, byte-array forms such as { type: "Buffer", data: number[] } or { data: number[] } can be converted to bytes, as can direct Buffer, Uint8Array, ArrayBuffer, uint8Array, and bytes values. The collector still requires a recognized file-shaped string field before it creates a candidate, so a lone byte-array data field may not reach the resolver.
Ordinary assistant text, ordinary JSON tool results, reasoning parts, a binary response hidden inside an unrelated field, and string data fields are not automatically persisted as artifacts. Tool authors should return a supported file part or file-shaped structure with a MIME type and file name.
When a candidate reaches the resolver, direct buffers, valid base64, data URIs, and text-like MIME payloads are converted to bytes. HTTP(S) file URLs are downloaded through the safe remote-URL path and therefore use the same SSRF rules as tools.
Timing and failures
Artifact persistence is a turn-completion side effect. Seeing a file URL or file part in an in-flight message does not guarantee that the Artifact row and object-store upload already exist.
A persistence error is logged and does not fail the chat turn. The user can still receive a text reply even when no Artifact row is created.
Size and count limits
- Each prepared generated Agent artifact is limited to 25 MiB.
- Empty or unresolved payloads are skipped.
- A remote response over 25 MiB is canceled while streaming.
- The current path has no hard per-turn file-count limit and no hard per-turn aggregate-byte limit.
- Candidates are processed independently, so one oversized or failed file does not stop later files in the same turn.
The organization storage total shown in Action Agent Studio is not currently a write-time quota. CMS data.storageLimit and data.maxFileSizeLimit values are not enforced by generic Artifact uploads or generated Agent persistence. See Limits.
Usage and cleanup
A platform-backed chat turn consumes ActionFlows credits even if artifact persistence fails. BYOK model usage is billed by the provider according to the organization's provider account. Tool or MCP services can have separate charges.
The generated Agent persistence path does not set a separate retention period. Storage visibility and removal therefore depend on the product's artifact/storage controls and the owning records; do not assume an automatic Agent-artifact expiry.
Troubleshooting a missing file
Check that the turn completed, the output matched the recognized file shapes above, the payload was non-empty and at most 25 MiB, and any remote URL passed SSRF checks. Then inspect sanitized Agent/runtime logs for artifact persistence warnings. See Troubleshooting.