Assets
Browse, manage, and download media assets generated by agent executions.
Assets
Assets are media files generated during agent executions -- audio from TTS, images from generation tools, and video from video providers. All assets are stored in S3-compatible storage and tracked with metadata for easy browsing and management.
Asset Properties
| Field | Description |
|---|---|
id | Unique asset identifier (KSUID) |
workspace_id | Workspace the asset belongs to |
execution_id | Execution that generated the asset |
agent_id | Agent that generated the asset |
type | audio, image, or video |
provider | Media provider (e.g., elevenlabs, fal) |
file_name | Original or generated file name |
file_size | Size in bytes |
content_type | MIME type (e.g., image/png, audio/mpeg) |
storage_key | S3 object key |
metadata | Additional metadata (model, prompt, etc.) |
created_at | Creation timestamp |
Listing Assets
# List all assets
assets = client.assets.list()
# Filter by type
images = client.assets.list(type="image")
# Filter by provider
fal_assets = client.assets.list(provider="fal")
# Filter by execution
exec_assets = client.assets.list(execution_id="your-execution-id")Downloading Assets
Assets are served via signed URLs with configurable expiration:
# Get a signed download URL
signed = client.assets.get_signed_url(asset_id="your-asset-id")
print(signed["url"]) # Temporary signed URLDeleting Assets
client.assets.delete(asset_id="your-asset-id")Deleting an asset removes the file from storage and the metadata record. This action is irreversible.
Storage Configuration
Asset storage uses S3-compatible backends. Configure via environment variables:
| Variable | Description |
|---|---|
STORAGE_ENDPOINT | S3-compatible endpoint URL |
STORAGE_REGION | Storage region |
STORAGE_BUCKET | Bucket name |
STORAGE_ACCESS_KEY_ID | Access key ID |
STORAGE_SECRET_KEY | Secret access key |
STORAGE_PUBLIC_URL | Public URL prefix for assets |
STORAGE_FORCE_PATH_STYLE | Use path-style addressing (default: true) |
Compatible with Railway Storage Buckets, MinIO, AWS S3, Cloudflare R2, and other S3-compatible services.
Related Topics
- Media Generation -- Generating media with providers
- Tracing -- Viewing media spans in execution traces
- Executions -- Execution lifecycle and outputs