aion.core and are shared across all frameworks. Use them to construct
a2a.types.Artifact objects before passing them to emit_artifact() or thread.post().
url_artifact
Returns:
a2a.types.Artifact with a single FilePart (FileWithUri).
file_artifact
Returns:
a2a.types.Artifact with a single FilePart (FileWithBytes).
Raises: TypeError if data is not bytes.
file_action parameter accepts a FileActionPayload from aion.core.a2a.
The builder attaches it to the file part and declares the Messaging extension on the artifact.
File retention
WithFILE_STORAGE_BACKEND=aion, the SDK uploads inline files as protected agent artifacts.
Without a FileActionPayload,
the SDK requests 30-day retention. An action with an omitted or None deadline requests indefinite storage.
AionFileClient follows the
File Service contract: an absent deadline means indefinite storage.
The 30-day default belongs to the SDK’s automatic Aion file provider, not the File Service or other storage providers.
Download links expire separately, normally after one hour. A file action does not renew an existing URL or grant.
Without a file backend, the builder keeps content inline and does not establish a storage deadline.
data_artifact
Returns:
a2a.types.Artifact with a single DataPart (Protobuf Value).
Full Example
Related Pages
- Card — the other builder shared across frameworks
- Streaming Delta Semantics
emit_artifact(), documented under the framework you are
writing for.