Mounts API
The Mounts API lets you mount cloud storage buckets to agent sandboxes, giving agents read or write access to external files. Access viaclient.mounts:
Methods
getMounts(agentSlug)
List all mounts for an agent.| Name | Type | Description |
|---|---|---|
agentSlug | string | The agent’s slug |
Promise<Mount[]>
Example:
addMount(agentSlug, options)
Add a storage bucket mount to an agent.| Name | Type | Required | Description |
|---|---|---|---|
agentSlug | string | Yes | The agent’s slug |
options.bucketSlug | string | Yes | Bucket to mount |
options.mountPath | string | Yes | Path inside the sandbox (e.g., /data) |
options.sourcePrefix | string | No | Bucket prefix to mount |
options.permissionRules | PermissionRule[] | No | Permission rules |
options.cacheEnabled | boolean | No | Enable caching |
options.cacheTtlSeconds | number | No | Cache TTL in seconds |
Promise<Mount>
Example:
updateMount(agentSlug, mountId, options)
Update an existing mount.| Name | Type | Required | Description |
|---|---|---|---|
agentSlug | string | Yes | The agent’s slug |
mountId | string | Yes | The mount ID |
options.mountPath | string | No | New mount path |
options.sourcePrefix | string | No | New source prefix |
options.permissionRules | PermissionRule[] | No | New permission rules |
options.cacheEnabled | boolean | No | Enable/disable caching |
options.cacheTtlSeconds | number | No | New cache TTL |
options.enabled | boolean | No | Enable/disable the mount |
Promise<Mount>
removeMount(agentSlug, mountId)
Remove a mount from an agent.| Name | Type | Description |
|---|---|---|
agentSlug | string | The agent’s slug |
mountId | string | The mount ID |
Promise<void>
See Also
- cast mounts — CLI equivalent
- Storage API — Manage buckets
- Types — TypeScript interfaces