People and groups

Agents manage this through MCP and the installed openbelt CLI too: Manage a workspace. Admin tools appear only for workspace admins.

A workspace's people are everyone who has used it: each has a permanent id (p_3f9c0a1b2c3d4e5f), an email, a name, a role (admin or member) and a status (invited, active or removed). OpenBelt still doesn't sign anyone in itself: the front door (Tailscale) says who a page's viewer is, and an API token says who an agent is. People are what the workspace knows about them.

Who can do what

WhoCan
A memberOpen the workspace's apps that aren't private; see who they are (whoami); make, list and revoke their own tokens; set their own connection tokens
An app's ownerAll a member can, and on that app: deploy it, read its logs and runs, write its data past its rules, set who can view it, delete it
A workspace adminAll of that, and invite and remove people, set roles, set joining, make groups, list and revoke anyone's tokens, manage connections, rename the workspace and set its icon, in Settings or with bun run workspace
The operator (OPENBELT_ADMIN_TOKEN)Make a token for any email (/_ops/tokens) and name a workspace's admins (/_ops/workspace-admins)

An agent (a token, or a sign-in over MCP) does what its person may and no more: through a page, MCP or code mode, the same person gets the same answer. A workspace admin does on every app what its owner does.

A workspace has no admins until the operator names one. bun run dev and the instances bun run verify launches make their user the admin of acme. A workspace's last admin can't be made a member or removed: make someone else an admin first.

Joining: open or invite-only

Both apply on the workspace host and on every app's host, to pages and data alike. Under both, a removed person is refused. check_app's browser gets in either way, signed out or as its test people: it carries a session cookie OpenBelt seals for that check (__Host-openbelt_session, one per host it opens, good there alone for 15 minutes, unreadable by the page).

A workspace made on the base host (One address for every workspace) starts invite-only, with whoever made it as its only admin. Someone at the same work domain (their email's, unless it's personal mail like gmail.com) who signs in there sees it under Other workspaces, marked Ask: asking lets nobody in. The workspace's admins see the ask on People (Asked to join, with Invite) and as a line on the home page, until someone invites them; an agent waiting on that sign-in is sent back with access_denied naming the admins who must invite them.

Removing someone

people remove does it all at once, in about as long as the request takes (a few ms on a launched platform):

Invite them again (people invite) to undo it; their old tokens stay revoked.

Renaming the workspace

An admin renames the workspace on General in Settings (Workspace), or with bun run workspace rename acme-labs. The workspace's host becomes acme-labs.<domain> and its apps' <app>--acme-labs.<domain>. Nothing moves: a workspace keeps the id it was made with, and its people, apps, data, tokens and connections are keyed by that.

Renaming to the name the workspace has changes nothing and says so ("renamed": false). A name another workspace has or had, the default workspace's, or an 11th name is a 409; an unclaimed trial is a 403.

The workspace's icon

An admin sets the workspace's icon on General in Settings: a tap on the tile beside its name picks a picture, and × on it removes the icon. The browser makes the picture a 256-pixel square first (an SVG up to 64 KB goes as it is). Agents set it with workspace_icon_set (a base64 PNG, JPEG, GIF, WebP, SVG or ICO image up to 64 KB) and remove it with workspace_icon_clear.

The top bar's workspace switcher shows it on every page, for everyone in the workspace. Without one it shows the workspace's first letter on its tint, as Choose workspace does. /_icon serves it to people signed in to the workspace.

Groups

A group is a named list of people, made by an admin: 1-40 lowercase letters, digits and dashes (support). Its source is openbelt; groups synced from a directory (SCIM) say scim and can't be changed here. whoami shows a person's groups.

Each group has an icon. A word in its name picks one (support a headset, finance a bank), and users when none does; an admin can pick another from the same set (Lucide icons, listed in packages/platform/src/group-icons.ts), even for a synced group. icon is in a group's JSON only when someone picked it.

In Settings

Admins manage all of this in a browser too, under Workspace in Settings (<workspace host>/settings):

Each change is the /_workspace route of its name, run as you, so it does exactly what bun run workspace does and is refused the same way (a bad name, the last admin). The page says what changed and whose level moved: "GitHub for contractors: can't use it. That changes carol@acme.com on GitHub read → none." Deleting a group deletes its levels too, so a new group of the same name starts with none. Members get a 403 naming the admins.

Sync with a directory (SCIM)

Okta, Microsoft Entra or any SCIM 2.0 directory can add and remove a workspace's people and sync its groups, at <workspace host>/scim/v2. What it buys: offboarding that doesn't wait for anyone to log in. Deactivate someone in the directory and, in the time of the request, their API tokens are revoked, their agents' OAuth sign-ins are signed out (the refresh token too), their pages close and they leave their groups. Without it, OpenBelt only learns someone left when they next try to sign in, and an agent's sign-in lasts 30 days unused.

Sign-in is a different thing: Okta or Entra ID as an OpenID Connect provider on the sign-in page (OPENBELT_SSO_*, Email sign-in), or a front door that signs people in first (Tailscale with Okta as its identity provider, or deploy/signin/: Who is viewing). SCIM and sign-in meet at the email: a SCIM user's userName is the email the provider will say.

Set it up:

  1. As a workspace admin: People, the Sync tab, then pick the directory (Okta, Microsoft Entra ID, authentik or another SCIM app), or bun run workspace scim token --label okta. The token is shown once, with the base URL, under the names that directory's own settings use. Once a directory syncs, the tab gets a dot (green, amber while it waits for a first request, red after a failed one), and it holds what needs a fix, the history, the base URL and Stop syncing, which revokes the token.
  2. In the directory: a SCIM 2.0 app with base URL https://<workspace host>/scim/v2, authentication HTTP Header or OAuth bearer token, the token you made. Set the application username to the email (Okta: Email). Turn on push for new users, profile updates and deactivation; turn on group push for the groups you want here.
  3. /scim/v2 is open to the directory's servers: the SCIM token is the credential there.

What it does:

When a sync fails

Every request is kept (the last 200, bodies cut at 1000 characters) with what it did, its status and a trace. People shows the last 10 under Last requests from your directory, each in words ("Looked up Alice Chen", "Couldn't add someone" with the reason), and its request, status and trace under Technical details; bun run workspace scim lists the last 30 and the tokens (when each was last used). The trace is the response's x-openbelt-trace, and finds the same line in the platform log. A request that fails says what to change in detail, which is what the directory's provisioning log shows. A request with no token, a wrong one, or a revoked one is a 401 that says which; those aren't kept (anyone can send them), only logged.

Trying it without a directory

bun run drive scim <METHOD> </path> [json] --run <dir> sends one request as a directory would, with a token it makes. scripts/verify/drive/scim.ts has what Okta and Entra send as functions (assign a user, deactivate, push a group, add and remove members), and bun run verify scim replays them against a fresh platform in about 5 seconds: provisioning, an invite-only workspace, a user's agent signed in with OAuth and then deactivated (every credential ends), groups, the last admin, and the debug trail. Not tried here: a real Okta or Entra tenant, which needs a public URL for /scim/v2.

RouteNotes
GET/POST /scim/v2/Users?filter=userName eq "...", startIndex, count (max 200)
GET/PUT/PATCH/DELETE /scim/v2/Users/<id><id> is the person id
GET/POST /scim/v2/Groupsthe directory's groups only (source: scim)
GET/PUT/PATCH/DELETE /scim/v2/Groups/<id><id> is the group's name
GET /scim/v2/ServiceProviderConfig, /ResourceTypeswhat's supported (PATCH and filter yes, bulk and sort no)
GET /_workspace/scim, POST /_workspace/scim/token, /_workspace/scim/revokeworkspace admin: tokens, what the directory sent, make, revoke

Tokens

A token belongs to one person in one workspace (see MCP). Each has an id (t_1a2b3c4d5e6f) to list and revoke it by; the token itself is shown once, when it's made. Anyone makes and revokes their own in their settings (Agents, <workspace host>/agents), where the agents they signed in with OAuth are listed too, each with a page of its own that has Sign out (MCP). Their connection tokens and the apps they allowed are on Connections (<workspace host>/connections, Connections).

bun run workspace

The CLI for all of it, against a launched instance (--run <dir>, with --as <email> for someone else's token) or a real one (--url <workspace url> --token <token>). It never prompts, and prints the server's message when it's refused.

bun run workspace whoami --url https://acme.example.com --token $OPENBELT_TOKEN
bun run workspace people list
bun run workspace people invite dave@acme.com --role member
bun run workspace people remove dave@acme.com
bun run workspace people role dave@acme.com admin
bun run workspace joining invite
bun run workspace rename acme-labs            # the workspace's new name; its old ones keep working
bun run workspace groups create support
bun run workspace groups add support dave@acme.com erin@acme.com   # one or several
bun run workspace tokens create --label laptop --days 30
bun run workspace tokens list --workspace            # everyone's, for admins
bun run workspace tokens revoke t_1a2b3c4d5e6f --workspace
bun run workspace admins add ada@acme.com --admin-token $OPENBELT_ADMIN_TOKEN
bun run workspace scim token --label okta     # directory sync: a token for Okta or Entra
bun run workspace scim                        # its tokens, and what the directory last sent

HTTP

Each command is one request with Authorization: Bearer <token> and, for POST, a JSON body. These routes take a token only, on the workspace host (<workspace>.<domain>; an app's host answers them 404): a request carrying a cookie, an Origin or Sec-Fetch-Mode (anything a browser sends) is a 401, so no app page can use them.

RouteWhoBody
GET /_me/whoamianyone
GET /_me/tokensanyone
POST /_me/tokens/createanyone{"label": "laptop", "days": 30}
POST /_me/tokens/revokeanyone{"id": "t_..."} (theirs)
GET /_workspace/peopleworkspace admin
POST /_workspace/people/inviteworkspace admin{"email": "dave@acme.com", "name": "Dave", "role": "member"}
POST /_workspace/people/removeworkspace admin{"person": "dave@acme.com"} (or the id)
POST /_workspace/people/roleworkspace admin{"person": "dave@acme.com", "role": "admin"}
GET/POST /_workspace/joiningworkspace admin{"joining": "invite"}
POST /_workspace/renameworkspace admin{"to": "acme-labs"}
POST /_workspace/iconworkspace admin{"type": "image/png", "base64": "iVBORw0..."}
POST /_workspace/icon/clearworkspace admin
GET /_workspace/groupsworkspace admin
POST /_workspace/groups/create, /_workspace/groups/deleteworkspace admin{"name": "support"} (create takes "icon": "headset" too)
POST /_workspace/groups/iconworkspace admin{"name": "support", "icon": "headset"} (null: its name's)
POST /_workspace/groups/add, /_workspace/groups/removeworkspace admin{"group": "support", "person": "dave@acme.com"}
GET /_workspace/tokensworkspace admin
POST /_workspace/tokens/revokeworkspace admin{"id": "t_..."}
POST /_ops/workspace-adminsoperator{"email": "ada@acme.com"}

groups/add also takes several at once: "people": ["dave@acme.com", "erin@acme.com"] instead of "person". If any of them isn't in the workspace, nobody is added.

Errors have error (what happened and what to do), code (unauthorized, not_admin, invalid, missing, conflict) and trace, which finds the request's line in the platform log.

Source: docs/people.md on GitHub