Skip to navigation

Sample Apps

Reference apps built on Agent Filesystem
View as Markdown

The samples repository demonstrates managed users, scoped workspaces, token minting, and agent recovery. Use it as an integration starting point. Samples evolve with the API.

Before you begin

You need an enabled Agent Filesystem app. Follow Quickstart to create an Agent Filesystem application in the Developer Console. Each sample has a README with its setup steps.

FolderSync

FolderSync is a desktop app that keeps a project folder in sync with a managed user’s Dropbox. You sign in as a managed user, sync a project folder with Sync now, and then undo the changes FolderSync made in Dropbox. It demonstrates four workflows:

Backend token minting

A small token server stands in for your backend: it holds the app key and secret, keeps the secret out of the app, and mints the managed user’s token. FolderSync uses that token to mint each agent’s token, and mints new ones automatically before they expire.

App key: <your_app_key>
App secret (hidden):
Starting the token server…
… checking the app key and secret with Dropbox...
… token server listening on http://127.0.0.1:8787

Managed-user sign-in

A user types a name, and the token server creates a managed user for a new name or signs back in to the existing one. Any name works here, for the demo. In your product, your backend checks who your user is before it mints their managed user’s token.

The FolderSync sign-in screen with the name managed-user-1

The FolderSync sign-in screen with the name managed-user-1

Project workspaces

Each project gets an agent limited to its folder. FolderSync writes changes with the agent’s token, so Dropbox records them as the agent’s. FolderSync syncs when you click Sync now, not in the background. Undo is next to it.

A synced project in FolderSync: up to date after two uploads, with Undo and Sync now

A synced project in FolderSync: up to date after two uploads, with Undo and Sync now

Change history and undo

Choose a change from the agent’s history to undo. Dropbox undoes that change and every change after it, and keeps changes made outside FolderSync.

To run it, follow Run FolderSync in its README.