Storage API
The Storage API lets you manage cloud storage buckets (S3, GCS, R2) that can be mounted to agent sandboxes. Access viaclient.storage:
Methods
getBuckets()
List all storage buckets.Promise<Bucket[]>
createBucket(options)
Create a new storage bucket configuration.
Returns:
Promise<Bucket>
Example:
getBucket(slug)
Get a specific bucket by slug.
Returns:
Promise<Bucket>
updateBucket(slug, options)
Update a bucket configuration.
Returns:
Promise<Bucket>
deleteBucket(slug)
Delete a bucket configuration.Promise<void>
setCredentials(slug, credentials)
Set credentials for a bucket.
Returns:
Promise<void>
testConnection(slug)
Test the connection to a bucket.Promise<TestConnectionResult>
listFiles(slug, prefix?)
List files in a bucket.
Returns:
Promise<FileInfo[]>
getDownloadUrl(slug, path, options?)
Get a presigned download URL for a file.Promise<PresignedUrl>
getUploadUrl(slug, path, options?)
Get a presigned upload URL for a file.Promise<PresignedUrl>
See Also
- cast buckets — CLI equivalent
- Mounts API — Mount buckets to agents
- Types — TypeScript interfaces