Skip to main content

Storage API

The Storage API lets you manage cloud storage buckets (S3, GCS, R2) that can be mounted to agent sandboxes. Access via client.storage:

Methods

getBuckets()

List all storage buckets.
Returns: Promise<Bucket[]>

createBucket(options)

Create a new storage bucket configuration.
Parameters: Returns: Promise<Bucket> Example:

getBucket(slug)

Get a specific bucket by slug.
Parameters: Returns: Promise<Bucket>

updateBucket(slug, options)

Update a bucket configuration.
Parameters: Returns: Promise<Bucket>

deleteBucket(slug)

Delete a bucket configuration.
Returns: Promise<void>

setCredentials(slug, credentials)

Set credentials for a bucket.
Parameters: Returns: Promise<void>

testConnection(slug)

Test the connection to a bucket.
Returns: Promise<TestConnectionResult>

listFiles(slug, prefix?)

List files in a bucket.
Parameters: Returns: Promise<FileInfo[]>

getDownloadUrl(slug, path, options?)

Get a presigned download URL for a file.
Returns: Promise<PresignedUrl>

getUploadUrl(slug, path, options?)

Get a presigned upload URL for a file.
Returns: Promise<PresignedUrl>

See Also