Skip to navigation

Mount

Mount a user's Dropbox or an agent workspace as a local directory.
View as Markdown

Before you begin

  • An enabled Agent Filesystem app.
  • The dbx CLI installed using Quickstart.
  • Linux x86-64 with FUSE support.
  • An empty, writable local directory for each mount.

Configure credentials

Run setup in a trusted environment. Follow Quickstart step 2 to save the standalone-user profile used below. For managed-user tokens and imports, see Authentication.

Mount as the user

Mount the profile’s account root:

mkdir -p /workspace/user-files
dbx mount start --user /workspace/user-files --profile standalone-user
  • Use a saved OAuth or managed-user profile with known expiry and files.metadata.read plus files.content.read.
  • Without files.content.write, the mount is read-only. User mounts ignore --scope; they use the saved token scopes.
  • DBX_TOKEN and raw token imports are not supported for user mounts.
  • OAuth mounts refresh automatically. Managed-user mounts flush and unmount before expiry; replace the token and restart.

Writes are attributed to the user. Agents with workspace access see the same files; undoing agent writes preserves the user’s later work.

Create the folder used below, then stop the user mount:

mkdir -p /workspace/user-files/Projects/build-output
dbx mount stop /workspace/user-files

Paths are relative to the account root; include the member folder for team content where needed. See CLI paths.

Mount an agent workspace

1

Create an agent

The selected profile identifies the owning user.

dbx agent create build-agent --profile standalone-user
2

Grant workspace access

The folder must already exist. Create it through a user mount, as shown above, or files/create_folder_v2.

dbx agent workspace add \
build-agent \
/Projects/build-output \
read_write \
--profile standalone-user

Use read_write, read, or none. Select items by path or id:; / selects the account root.

Alternatively, set initial rules with repeatable --add PATH=ROLE flags on dbx agent create, such as --add /Projects/build-output=read_write.

Credential security

Keep the user profile in the trusted launcher, outside the agent’s working directory.

3

Mount the workspace

Start the mount when the runtime starts:

mkdir -p /workspace/agent-files
dbx mount start \
build-agent \
/workspace/agent-files \
--profile standalone-user
  • The CLI runs in the background and mints replacement agent tokens with the same agent and scopes, using the user profile.
  • OAuth user credentials refresh automatically.
  • For managed users, replace the user token in the same profile before expiry using dbx login --user or token JSON import.
  • Imports clear aliases, but running mounts retain the agent ID.

If renewal fails, the CLI attempts to flush writes and unmount before the agent token expires.

Use standard file tools while the mount is running:

find /workspace/agent-files -maxdepth 3 -type f
printf 'Build completed\n' > /workspace/agent-files/Projects/build-output/result.txt

Read-only writes fail; content outside the workspace is hidden. The agent cannot exceed its user’s permissions.

Check status or stop the mount when finished:

dbx mount status
dbx mount stop /workspace/agent-files

Use --foreground to run until Ctrl-C or SIGTERM. Agent-mount --scope accepts comma-separated or repeated file scopes, plus optional account_info.read for account-root discovery. Defaults come from the saved user profile. With DBX_TOKEN or a raw token import, supply --scope explicitly. Without files.content.write, the mount is read-only.

Automate commands

Use --output=json. Successful data is in result; failures include error.code and, when available, error.details.error_summary.

See Authentication for token storage and Recovery for undo.