Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.castari.com/llms.txt

Use this file to discover all available pages before exploring further.

Mounts API

The Mounts API lets you mount cloud storage buckets to agent sandboxes, giving agents read or write access to external files. Access via client.mounts:
const client = new CastariClient({ apiKey: '...' });
const mounts = client.mounts;

Methods

getMounts(agentSlug)

List all mounts for an agent.
const mounts = await client.mounts.getMounts(agentSlug);
Parameters:
NameTypeDescription
agentSlugstringThe agent’s slug
Returns: Promise<Mount[]> Example:
const mounts = await client.mounts.getMounts('my-agent');
for (const mount of mounts) {
  console.log(`${mount.mount_path}${mount.bucket.name} (${mount.enabled ? 'enabled' : 'disabled'})`);
}

addMount(agentSlug, options)

Add a storage bucket mount to an agent.
const mount = await client.mounts.addMount(agentSlug, options);
Parameters:
NameTypeRequiredDescription
agentSlugstringYesThe agent’s slug
options.bucketSlugstringYesBucket to mount
options.mountPathstringYesPath inside the sandbox (e.g., /data)
options.sourcePrefixstringNoBucket prefix to mount
options.permissionRulesPermissionRule[]NoPermission rules
options.cacheEnabledbooleanNoEnable caching
options.cacheTtlSecondsnumberNoCache TTL in seconds
Returns: Promise<Mount> Example:
const mount = await client.mounts.addMount('my-agent', {
  bucketSlug: 'production-data',
  mountPath: '/data',
  permissionRules: [{ path: '/', mode: 'ro' }],
});

updateMount(agentSlug, mountId, options)

Update an existing mount.
const mount = await client.mounts.updateMount(agentSlug, mountId, options);
Parameters:
NameTypeRequiredDescription
agentSlugstringYesThe agent’s slug
mountIdstringYesThe mount ID
options.mountPathstringNoNew mount path
options.sourcePrefixstringNoNew source prefix
options.permissionRulesPermissionRule[]NoNew permission rules
options.cacheEnabledbooleanNoEnable/disable caching
options.cacheTtlSecondsnumberNoNew cache TTL
options.enabledbooleanNoEnable/disable the mount
Returns: Promise<Mount>

removeMount(agentSlug, mountId)

Remove a mount from an agent.
await client.mounts.removeMount(agentSlug, mountId);
Parameters:
NameTypeDescription
agentSlugstringThe agent’s slug
mountIdstringThe mount ID
Returns: Promise<void>

See Also