Skip to main content

Module artifact

Module artifact 

Source
Expand description

Read and stage workforce artifacts (uploaded files, produced outputs).

A skill takes the bytes of a staged file by artifact_id, transforms them in-process, and stages the result for delivery — the bytes never pass through the agent’s LLM context.

Requires the artifacts capability in your Skill.toml.

Structs§

Artifact
The bytes of a staged artifact plus its stored mime and size.
StagedArtifact
A staged artifact ready for delivery. Pass it to attach so the runtime delivers the file to the conversation.

Functions§

attach
Attach staged files to a tool result so the runtime delivers them. Sets the workforce file-delivery key on the result object; a non-object result or an empty files slice is returned unchanged.
read
Read a staged artifact by id. Returns None if it doesn’t exist, isn’t readable in this session, or exceeds the host read limit.
stage
Stage bytes as a new artifact for delivery. media_type and filename label the delivered download. Returns None on failure.