Apps
An app is a folder of static files (HTML, CSS, JavaScript modules, images) served at the root of a
host of its own, <app>--<workspace>.<domain> (http://standup--acme.localhost:1337/ from bun run dev).
What you deploy is what's served: no build step, and no TypeScript yet. The workspace's own host,
<workspace>.<domain>, is OpenBelt's: Today and Apps, /mcp, and the one address people open an app at,
<workspace>.<domain>/a/<app>/<path>: the page at <path> on the app's host, in the workspace's frame. That's the url
the tools give (host is the app's own, for curl and fetch). A browser opening a page of the app's host is sent there;
curl, an agent's fetch or a link preview's bot asking for it is sent to the app's own page. The address bar follows
the page (links, history.pushState, the hash), so a link copied from it opens the same page (In the frame).
Deploying
deploy_app({
app: "standup",
description: "Daily updates and blockers",
files: [
{ path: "index.html", content: "<!doctype html>..." },
{ path: "logo.png", base64: "iVBORw0..." },
],
})
- Without
editsorkeep_others,filesis the whole app: a file you leave out isn't in the new version. A file is{ path, content }for text, or{ path, base64 }for its bytes in base64: use base64 for binary files or any text that must stay byte-exact. - The result has the app's URL, the
version, andreach: who can open the URL and who is signed in there (everyone on the tailnet as themselves, everyone Access lets in, or nobody). Open pages reload themselves when a version goes live. - Link files relatively (
app.js, not/app.js), so previews serve their own copies. Link to another app withappUrl("home")from/sdk.js(its host, and in a preview environment its page there); in the frame, the link opens it in the whole window.
Files and names
index.htmlis required. Paths are relative (css/style.css), without..; no part may start with_(_db,_ws,_log,_shotand_previeware the platform's), and the folderais the platform's too (/a/<app>/is another app's data). Files are up to 5 MB each, and one MCP request is at most 64 MB (a bigger deploy is refused with 413: send it in severaldeploy_appcalls, withkeep_others). Send large deploys one at a time: past what a server holds at once, a request is refused with 503busyandRetry-After; send it again then.- Pictures, PDFs, audio and video the app shows as content (photos, receipts, episodes; anything
over 5 MB) aren't deployed: they go in its files, and documents keep their urls. Copy one at a
public URL with
file_from_url, send one from your computer withfile_upload_url(docs page sdk, "Files"); never base64 a file into a tool call. A public app's public host doesn't serve uploads (below): what its public page shows is deployed with it, anddeploy_apptakes an upload's id for a file's bytes ({ path: "poster.jpg", file: "<id>" }), so upload it first; or"files": trueinpublicserves its uploads there. - A page without its own
<link rel="icon">shows OpenBelt's icon in the tab. - People open apps on phones too. Give fields (
input,textarea,select) text of 16px or more there, or iOS Safari zooms into a field when it's tapped; don't stop that zoom withmaximum-scalein the viewport tag, since it also stops people zooming the page. - A page a browser opens gets
touch-action: manipulationonhtmlfrom OpenBelt (not in your files), so a double tap doesn't zoom; a pinch still does. Your CSS wins:touch-action: noneon a canvas or map that handles its own gestures,html { touch-action: auto }to zoom on double tap. - App names are 1-40 lowercase letters, digits and single dashes. An app's host,
<app>--<workspace>.<domain>, is one DNS label, at most 63 characters: in a long workspace name, a long app name is refused, saying how long it may be. A name is yours once a deploy of it lands: someone else's is refused with a free suggestion (standup-2). A refused first deploy (a file over 5 MB, an invalidopenbelt.json, a function that doesn't load) makes no app and leaves the name free. An app keeps a permanent id, so its data stays with it.
In the frame
The workspace's frame and the app's page work as one page, with nothing to set up:
- Keys: the page has the keyboard as soon as it opens, so its shortcuts work with no click.
- Address: the address bar follows the page, and Back and Forward move through its pages. To route by
the path, read the route from
location.pathnameand move withhistory.pushState. A page a browser opens at a path with no file of its own (/issue/ENG-12: no dot in its last part) gets the nearestindex.htmlabove it, so a link to any route opens that page. There it has a<base>(unless it has its own), so its relative files (app.js) load from its folder,pushState(null, "", "issue/ENG-7")goes to/issue/ENG-7, and a#link stays on the page.curland a missing file still get a 404. Hash routes (#/issue/ENG-12) work too. - Title: the tab shows the page's
document.title. For a count, put it first:(3) Inbox. - Theme: the person's OpenBelt theme is on the page's root before it paints,
<html data-theme="dark">or"light"(unless the page has its owndata-theme), and in the SDK astheme(SDK). Style dark with:root[data-theme="dark"] { color-scheme: dark; ... }.prefers-color-schemefollows the theme in Safari and Firefox; Chrome keeps it on the device's setting, so a page styled only by that media query matches there only when the theme is System.
The app's own host, opened outside the frame, gets the same theme and routes.
Preview environments
Test in a preview environment before changing a live app with real data: name it after the change, seed from live if you need realistic data, put every app the change touches in it, check, then promote them together.
deploy_app({ app: "bugbash", preview: "triage", seed: "live", note: "Duplicate status", files: [...] })
// → { live: false, env: "triage", previewUrl: "https://bugbash.acme.../_preview/triage/", seeded: { docs: 10, capped: false } }
deploy_app({ app: "home", preview: "triage", keep_others: true }) // home as it is, or changed
check_app({ app: "bugbash", preview: "triage", steps: [...] })
promote_app({ apps: ["bugbash", "home"], env: "triage" })
- Nothing live changes. Each app in the environment runs its version at
/_preview/<env>/on its host over the environment's own data (it starts empty;seed: "live"copies the newest 5000 live documents in once). Add test documents, break things: live pages never see it. - Apps in the same environment use each other's data there:
db.app("bugbash")on home's page in "triage" reads and writes bugbash's triage data, under bugbash's openbelt.json there. An app that isn't in it is read live and refuses writes (403): deploy it in as it is withkeep_others: trueand no files. Only an app's owner deploys it, into an environment too: for an app someone else owns that's refused, so ask its owner (app_infonames them) to deploy it in, or test without it. In a page,import { env } from "/sdk.js"is "triage" (null on live). - A patch without
base_versiongoes on the app's version in the environment, so fixes pile up. collection_list,collection_changes,collection_add,collection_update,collection_deleteandcheck_apptakepreview: "triage".preview: trueis refused: name the environment.check_appreaches only the app it checks and the environment's other apps: to check home's page reading bugbash, both are in "triage". A live check'sdb.app()call to another app is refused.promote_app({ apps, env })takes every app live together, all or none; open pages reload. It never copies data. It's refused when an app's live version changed since (it says who and when): deploy into the environment again withkeep_others: trueto bring that change in, check, promote.promote_app({ app, version })is the rollback: promote any earlier version (app_infolists the last 20, and every result'spreviousis the version before).app_infoshows the environments an app is in (note, the other apps,lastWrite,by). A name in use is someone's work in progress: a deploy into one that holds an app someone else owns warns you, so pick a new name unless your change is part of theirs. A refusal for an environment that doesn't exist names the ones that do.preview_reset({ env })empties an environment's data (appfor one app's). An environment with no deploys or writes for 7 days is deleted.
More on environments
- An environment's name is 1-40 lowercase letters, digits and dashes, not
live(the live data's); it's made on first deploy. Its data has the whole SDK, with its own realtime.seededsays how many documents were copied, andcappedwhether there were more. - A deploy's
previousis the version the environment ran (null when the app is new there). - If one app fails to switch during a promote, the ones already switched are put back. Bringing in a newer live change puts your version on top of it (refused with a diff if you both changed a file).
preview_resetkeeps the versions and reloads the environment's open pages. An expired environment's data is deleted too. A URL naming an environment that doesn't exist is a 404 page, never live data.- Apps have no gate of their own: whoever reaches an app's host can open it (
reachsays who that is on deploys and promotes).
Changing an existing app
app_files({ app: "standup" })returns the live version's files and that version, e.g. "3f2a9c1e0b7d". Read before you change an app, even one you built. For just the part you'll change:app_files({ app: "standup", paths: ["app.js"], around: "function render", context: 20 })returns excerpts ({ from, to, text }) instead of content;lines: "40-80"takes a range.- Send edits, on top of the version you read.
findis text copied exactly from the file and must occur once. Send whole files only for new files or rewrites:
deploy_app({
app: "standup",
base_version: "3f2a9c1e0b7d",
preview: "standup-fix",
edits: [
{ path: "app.js", find: "const title = 'Standup'", replace: "const title = 'Daily standup'" },
],
files: [{ path: "search.js", content: "..." }],
delete: ["old.css"],
})
- Edits apply in order; a later one sees what earlier ones did. Copy
findwith its indentation and line breaks; a line or a few is enough. Only text files can be edited. - If any
findoccurs zero times or several, nothing deploys. The refusal lists every bad edit: the closest lines (with numbers), or the line numbers of each match. Fix those finds and send all the edits again. - Edits make the deploy a patch: files you don't edit or send stay.
deleteremoves paths.keep_others: truemakes a patch fromfilesalone. - The result's
diffshows what your edits changed: read it before you check. Past 4 KB it's cut, and its last line is theapp_diffcall that pages through the rest. Lines past 400 characters show a window around the change, marked⟪… N chars⟫(don't copy it into afind). base_versionis the version you started from. Into a preview environment it defaults to the app's version there, so a fix keeps the earlier ones. If someone else changed the live app since, their changes are kept; the deploy is refused only when they changed a file you change too (for a full deploy, any file). The refusal names who deployed when, with a diff of their change; nothing changes. Readapp_filesagain, re-apply your change, deploy with the new version.- The result's
changedlists the paths that differ frombase_version(not from the live app).
More on reading and patching
- Without
base_versionnothing is checked: a patch goes on the live version, and a full deploy replaces it. A patch is also refused when they changed a file your base preview changed. app_filestakesversionfor any kept version andpathsfor some files. Binary files come back asbase64; past about 400 KB of content per call a file hasomitted: ask for it by path. Excerpts come withlineCount(contextdefaults to 10), and files with no match are left out.- An edit's refusal also says when a
findmatches only if whitespace is ignored, when its lines are in the file but not together, and that a new file goes infiles. app_diff({ app, from, to, paths?, offset? })pages through the diff between any two kept versions, 16 KB at a time (nextis the followingoffset, null at the end).
Versions
A version is the set of files a deploy made. Files are stored by content hash, so a redeploy
stores only what changed (uploaded), and the same files are always the same version. Going live
is one switch: if anything is refused, the old version keeps serving. promote_app's result is
{ promoted: [{ app, url, version, previous }] }, with reach as a deploy's. app_info lists the last 20
versions, newest first (version, kind: full or patch, by, deployedAt, promotedAt,
files). Older ones are deleted; the live version and those environments run are always kept.
openbelt.json: describe your data
An optional file at the app's root, deployed with the other files. Add one whenever an app keeps data that another app or agent might use. A lunch app whose votes other apps' pages may add to, one per person per day, each changed or taken back only by whoever cast it:
{
"title": "Lunch Votes",
"description": "Lunch votes, one per person per day",
"collections": { "votes": "one doc per person per day, id <day>:<email>: { day, place }" },
"writable": ["votes"],
"rules": {
"votes": {
"read": "anyone",
"create": "signedIn && id == newDoc.data.day + ':' + me",
"update": "doc.author == me && newDoc.data.day == doc.data.day",
"delete": "doc.author == me"
}
}
}
title: the app's human-readable display name (up to 60 characters, one line), shown on Today, Apps, the sidebar, the app frame, installed browser/desktop apps and link previews, separate from its URL slug (e.g."Lunch Votes"for/a/lunch). Without it, OpenBelt shows the slug.description: the app's line insearch, the home page anddb.apps()(it wins overdeploy_app's).collections: one line per collection saying what a document holds (fields, id scheme, units). It's shown asabout, even while the collection is empty. Or the line and a JSON Schema that every write there must fit, from a page, an agent or a function:"posts": { "description": "a message in a channel", "schema": { "type": "object", "properties": { "channel": { "type": "string" }, "text": { "type": "string", "maxLength": 4000 } }, "required": ["channel", "text"], "additionalProperties": false } }. A write that doesn't fit is refused, naming each field (a 400invalid; in a function, the run fails and keeps nothing). Documents already there aren't checked again. It takes the keywords a function's input schema takes (Contracts):type,properties,required,additionalProperties,items,enum,const,anyOf,minimum,maximum,minLength,maxLength,minItems,maxItemsanddescription(notpatternorformat: a deploy with another is refused), andapp_infoshows it as a TypeScript type (holds).writable: collections other apps' pages may write to. Without it, only this app's pages do.rules: who may read, create, update and delete in each collection (Who can change what).aggregates: up to 16 namedcountorsumIntegerdeclarations over a source collection. OpenBelt maintains them on every write; pages read and watch them withdb.aggregate(name).tools: the workspace's connection tools its pages call withtools.call, each"<connection>.<tool>"bound to"viewer"(the viewer's own token, once they allow the app) or"workspace"(the workspace's), at most 100 (SDK). A binding the workspace's connections can't serve (no such connection or tool, a token it doesn't take, a level nobody has) deploys with a warning naming it.functions: each server function,functions/<name>.js, with a line saying what it does, its input and its result, or{ "description", "kind": "query", "input", "output" }(Functions).schedules,webhooks,triggers: what else runs a function (Functions).network,secrets,uses: what its functions may reach (Functions).public: the app for anyone, signed in or not, at<app>--<workspace>.<public host>, and exactly which of its collections and functions they reach (Public apps).card: what a link to the app shows in Slack, iMessage, X and the like, whose previews never sign in."private"(the default) shows the workspace's card, "An app in", and nothing of the app. "public"shows itstitle(else its page's<title>), itsdescriptionand a picture of it to anyone with the link (Link previews).color: its colour, a hex colour like"#2563eb": its tile's, its link preview card's, and the tint behind its picture in Jump back in on Today. Without it, OpenBelt takes the page's<meta name="theme-color">, else the strongest colour in its picture, else one of twelve made from its name (the same name, the same colour).icon: what its tile shows on its colour, in the workspace's Apps and Today, its page there and its panel: the name of any Lucide icon, like"scissors"or"calendar-days". Without it, the tile shows the app's first letter, anddeploy_appwarns until it has one. Pick one that says what the app does, and setcolorwith it.desktop: optional capabilities requested when someone installs the app through OpenBelt Desktop (floating,tray,menuBar,startAtLogin,shortcuts,notify,capture,clipboard,width,height,titleBar), e.g.{ "menuBar": { "path": "/menubar.html", "width": 340, "height": 380 }, "startAtLogin": true, "shortcuts": ["Alt+Shift+F"], "notify": true }. Use"menuBar"for an interactive HTML menu-bar popover that stays loaded and running in the background even when both its main window and popover are closed (must name a deployed HTML file like"/menubar.html", width 200-800, height 140-900; do not also set"tray": true, which is refused on deploy), or"tray": truefor a simple OS dropdown menu.shortcutsentries require a modifier plus a key (Alt+Shift+J,CommandOrControl+Shift+K);widthandheightare integers from 120 to 3840 (height up to 2160). By default on macOS, OpenBelt Desktop draws a seamless 34px draggable title bar matched to the page's top background; set"titleBar": "hidden"to opt into full-bleed floating traffic lights when the app leaves padding in its own top-left bar. OpenBelt Desktop prompts the person with a native permission sheet pinned to the live deploy version (x-openbelt-version); regular browsers and browser PWAs ignore this block (SDK).collectionsandrulestake a prefix ending in*as a key:"v_*"covers every collection whose name starts withv_.- Limits:
titleup to 60 characters,descriptionup to 300 characters, each collection's and function's line up to 500. - It takes effect when its version goes live (in a preview environment, for that environment's data). A bad openbelt.json (an unknown key, a bad collection name, a line over its limit, a rule that doesn't parse, not JSON) refuses the deploy with the shape it expects.
- After OpenBelt itself is rolled back to an older version, that version reads an openbelt.json a later
one took: it skips the keys it doesn't know, and while it has any, it doesn't serve the app's
functions/files (a later OpenBelt's functions are server code). When a key it knows has a shape it doesn't take, the app's pages can't read or write its data (a 403 withrule"openbelt.json", also inapp_logs, andapp_info'sunreadablesays why) and its functions don't run until the app is deployed again: a call is a 404 saying so, a webhook delivery a 503 (its sender sends it again), a schedule skips its runs, a pending trigger orlaterrun waits, and a write triggers nothing. The workspace's tools still read and write its data. A deploy that would keep that unreadable openbelt.json as it is (keep_others, or only edits to other files) is refused: send a fixed openbelt.json with it.
Link previews
A link to an app pasted into Slack, iMessage, X, LinkedIn, Discord or WhatsApp unfurls into a card, 1200×630, drawn a few seconds after the version goes live (with the picture for the workspace's home page). The previewer never signs in, so what it shows, anyone with the link sees:
- By default, the workspace's card: OpenBelt's wordmark, the workspace's name, "An app in
". Nothing of the app: not its name, its description or what's in it. - With
"card": "public"in openbelt.json, the app's own card: its page's<title>(else its name), itsdescription, and a picture of its first page, in the app's colour (colorabove). The title shrinks to fit; a very long one is cut. A description that starts with the title shows only the rest. - A link to a published app's public name (
<app>--<workspace>.<public host>, Public apps) always shows the app's own card,"card"or not: anyone with that link sees the app already. - A very saturated colour is toned down on the card only (its OKLCH chroma cut to 0.12, hue and lightness kept), so a loud brand red unfurls as a calm red. A colour already calm is used as it is.
- A version keeps the colour its first card got, so data that changes the picture doesn't change it.
Set
colorto choose it. - The card is at
/_og.pngon the app's host, and answers signed out.
An app without rules
A trip app whose expenses other apps' pages may add:
{
"description": "Split the offsite's costs",
"collections": {
"expenses": "one doc per expense: { payer, cents, for: [names], title }",
"members": "one doc per person on the trip, id = their email: { name }"
},
"writable": ["expenses"]
}
The description is the contract other apps build on: keep it true when you change what a collection holds. How pages use another app's data: SDK.
Public apps: anyone opens them on the public host
An app is for its workspace. One whose live openbelt.json has public is also for anyone, with no
sign-in, at <app>--<workspace>.<public host> (https://game--acme.openbelt.page/), a domain of its
own beside the workspaces' (OPENBELT_PUBLIC_HOST; without it nothing is public). Its owner can also
make it public from the menu on the app's name (Share, Public, then Make public: "public": {}, its
pages only) and turn on each collection's ops and each function on What visitors
can use; each change deploys a new live version of openbelt.json with only public changed, and
Workspace (Turn off public link) takes public out. A high-score game:
{
"public": {
"collections": { "scores": ["read", "create"], "posts": ["read"] },
"functions": { "play": { "secrets": [], "uses": [] } }
},
"collections": {
"scores": "one doc per game played: { name, score }",
"posts": "the team's notes about the game: { text }"
},
"functions": { "play": "scores a move. input: { moves }; returns { score }" },
"rules": {
"scores": { "read": "anyone", "create": "anyone", "update": "nobody", "delete": "nobody" },
"posts": {
"read": "anyone",
"create": "signedIn",
"update": "doc.author == me",
"delete": "doc.author == me"
}
}
}
- All files are public: every page, script and image, except
openbelt.json,skills/andfunctions/."public": {}publishes only them, with no data or functions. - Only listed ops on listed collections.
collectionsnames each collection with the ops anyone may do there:"read","create","update","delete". Anything else is refused there (a 403 withruleopenbelt.json "public"), whatever the collection's rules say. A listed op must also pass the collection's rules for nobody signed in (meisnull,signedInis false), so both must allow it: above, anyone reads and adds scores, reads posts, and adds no posts. A collection with no rules lets anyone do the listed ops on any document. A write there answers with the document only when anyone may also read it ("read"listed and the rules allow); otherwise with itsidandseqalone, so a write-only inbox (["create"]) shows nobody what it holds. An aggregate answers there only over a collection listed with"read". - Only listed functions, each with the secrets and connections (
uses) it may use there ([]for none). Anyone callsplaywithctx.callernull. Another secret or connection is refused with an error naming the list. Every run that call leads to (ctx.call,ctx.later, the triggers its writes start) gets the same list and no more, and a trigger that a write on the public host starts gets no secrets or connections at all. A run that starts later (actx.laterbooking, a trigger) gets only what the livepublicblock grantsplaywhen it starts: after a deploy that takes a secret out ofplay's list, a run booked before no longer gets it, and after one that dropsplayorpublicit gets no secrets or connections; nor do the runs it books. A connection that needs a token refuses these runs, as it does anyone not signed in. Rules don't judge a function:playreads and writes all of the app's data, so check its input. The documents it reads show members as opaque ids (below), so what it returns doesn't carry their emails. - Under the OpenBelt bar. A browser opening one of its pages there gets it under a bar with
OpenBelt's logo and the app's name, a menu with Remix (Remix)
and Copy link; the page itself loads in a frame at the same address, and the address bar follows it. The bar asks for the
page with
_framed=1last in its query and the page takes that off its address before your scripts run, solocationis the address the person opened."bar": falseinpublictakes the bar off.fetch,curland link previews always get the page itself. - Nobody, ever. No sign-in and no cookie on the public host:
db.me()isnull, and anyone's writes have the author"anonymous". Who wrote a document is shown there as an opaque id that stays the same for each member in this app ("author": "member-3f9a…","authorName": "a member"); the workspace host still shows emails. An email inside a document's data, or in an id you made from one (<day>:<email>), is shown as it is: keep those out of public collections. - Never OpenBelt's pages (
/mcp, sign-in, settings), another app (db.app,/a/<other>/), a preview, uploads (files, unless"files": true, below), or the error log (/_log): each is a 404 there. A preview is never public, only the live version; deploying withoutpublicunpublishes the app (its public name is a 404), and so does a trial workspace nobody has claimed. "files": trueinpublicserves the app's live uploads there too, read only (nobody uploads from the public host): for a public page that shows what its people upload. Anyone then opens any of its live files with its url, so leave it off when they upload anything private.- Check it as a visitor:
check_app({ app, public: true })opens the public page signed out, as anyone on the internet gets it; a picture or file it can't load there is in its failed requests. - At the edge: behind a CDN, the app's files (scripts, styles, images),
/sdk.jsand the page under the bar are kept there up to a minute; going live drops them at once, so a deploy shows on the next load. Data and function calls always reach the platform, and so does a page with"bar": false. A name asked for just before its first deploy can stay a 404 for a second; one deleted and made again, for five. - Limits there:
OPENBELT_PUBLIC_APP_WRITES_PER_MINUTEwrites, function calls and live query runs a minute to one app (6000 by default, a 429), of which one client address may useOPENBELT_PUBLIC_ADDRESS_SHAREpercent (2 by default: 120), so one visitor can't use up the app's minute. Only work done counts: a request refused before any (no such function, an op or collectionpublicdoesn't list, the rules, a bad body) costs nothing, and a watched query that members', agents' or schedules' writes run again costs nothing. A watched query past the limit answersrate_limitedand runs again when the limit allows (the error says in how many seconds) or on the next change; the refusal is never kept as its result, so the next page to watch it runs it. No new or changed documents once the app holdsOPENBELT_PUBLIC_DATA_SHAREpercent of its data cap (50 by default, a 507), so anyone can never fill it for its members. - Names.
<app>--<workspace>is one label, at most 63 characters: a deploy withpublicwhose name would be longer is refused, and so is renaming the workspace to a name that would make one longer. After a rename the old public name sends a page to the new one (308). deploy_appandapp_inforeturnpublic: the URL, and each thing anyone reaches there, line by line.
Remix: an app made from another, as your own
Anyone who can see an app can remix it: its files and data become a new app in their workspace, theirs, live at once, called a remix. A member remixes an app of the workspace they can open; anyone signed in remixes a public app, so public means remixable, code included. There is no setting that turns it off.
- How. In the frame, the app's name is a menu with Remix; on the public host the OpenBelt bar has
the same. It asks for the remix's name and lists what the remix gets. An agent calls
remix_app({ app }), withworkspacefor a public app of another workspace (remix_app({ app: "game", workspace: "acme" })forhttps://game--acme.openbelt.page/). - Its name. The app's name with
-remix(potluck-remix), or the name given on the page or asas. A name the workspace already has is refused, with a free one to use (potluck-remix-2). - It starts private. Only its owner and the workspace's admins open a new remix, whatever the app it came from allows: it may hold documents its source keeps from others. Its owner shares it from its panel.
- What is copied. The live version's files: pages,
functions/,skills/andopenbelt.jsonwithout itspublic(the remix is its owner's to make public). And every document its remixer may read, with their ids and in the same order: a member's remix keeps each document's author; a remix made from the public host gets only whatpubliclets anyone read, with the author"anonymous". - How big. Any app: the remix holds what any app may, its deploy files and its data each within
the server's budgets (
OPENBELT_VERSIONS_APP_MB, 256 MB by default, andOPENBELT_DATA_APP_MB, 1 GB). A remix past one is refused and nothing is kept. - What is never copied. A secret's value, a connection, stored files, versions, logs and stats.
The remix's functions name the same secrets;
remix_app'sneedsand the page list each one the remix has no value for;set_secretgives the link where its owner types each one (Functions). - Both keep the link. The remix's panel says Remixed from, with the app it came from. That app's panel counts its remixes and lists the ones the viewer can open: those in their workspace and those that are public.
- Keys in the code. Because a remix copies the code, Make public first looks through the app's
files for a key written into them (a provider's key, or a long value given to a name like
apiKeyortoken). It shows the file and line, and the owner moves the key to a secret or makes the app public anyway. A deploy that already haspublicisn't looked through: keep keys in secrets (Functions).
Skills
A skill is instructions for an agent: a SKILL.md and the files it refers to, in the
Agent Skills format. An app ships its own in
skills/<name>/, deployed with its other files:
skills/file-expense/SKILL.md
skills/file-expense/references/policy.md
---
name: file-expense
description: "File an expense in the expenses app: who paid, how much, for whom. Use for a reimbursement, a receipt or splitting a bill."
---
# File an expense
Read [the policy](references/policy.md) first, then add one document to expenses.
A deploy is refused, with what to change, when a skill isn't valid: each folder in skills/ needs
a SKILL.md that starts with YAML frontmatter, its name the folder's (1-64 lowercase letters,
digits and single dashes) and a description (at most 1024 characters: what it does and when to
use it; quote it when it has a : in it, as YAML asks). license, compatibility, metadata (names to text) and allowed-tools are optional;
other fields are kept as written. A skill has at most 512 files and 16 MiB, every file sits in a
skill's folder (skills/ holds skills only: an app that kept other files there moves them to
deploy again), and no skill is named as its app: that name is the one below's, so name yours for
the task it teaches (file-expense, not expenses).
OpenBelt also writes one skill for every live app, named as the app, at skill://<app>/SKILL.md:
what it is, its collections (with their rules), its functions (with their signatures), how an
agent and another app's page use them, and its own skills. It's written once per live version (the
first time it's asked for), so what a client checked is what it reads; a new live version writes
it again. So ship a
skill of your own only for what that can't know: a workflow (which function, in what order), the
values that are valid, who may do what, a policy to follow.
Only the live version's skills are served; a preview environment's aren't, until it's promoted.
Agents get them over MCP. A client that supports MCP's skills extension
(io.modelcontextprotocol/skills) lists and loads them itself: skills/list gives the skill of
each of your 20 newest apps and every skill an app ships, a page at a time; skills/get gives any
skill by its URI, listed or not; resources/read serves its files. Each entry lists every file
with its SHA-256 and size, so the client can check what it loads. Any other client uses the
skills tool: skills() lists the same, skills({ uri }) reads a SKILL.md (and names its other
files) or one of its files. app_info lists an app's skills, and search finds an app by its
skills' words. The files are served on the app's host too, like any other file.
The workspace's home page
<workspace>.<domain>/ is Apps: the workspace's home page. Its tabs sit beside the filter and sort controls: All, Yours (/?mine=1, shown when you own some but not all of the apps you can see), and Starters (/?tab=starters), the starter apps anyone in it can add.
Each starter's card opens its page (/?tab=starters&starter=<name>): its picture, its data, what agents get (its skills
and functions), what runs by itself and the prompt that built it. Add, on the card or the page, puts it in the workspace as
yours, with its first data, and opens it (starter_add does the same for an agent; MCP); once added, its page
has Open and, for its owner or an admin, Remove, which deletes it. A workspace with no apps shows how to connect an
agent, and a link to Starters.
On All (default sort, no search), Apps highlights New (a horizontal strip of the newest apps when the workspace has more than five) and Jump back in (the apps you opened last, as a five-card mosaic once you have five), above the All apps grid (omitting the apps already in Jump back in). Typing a search, changing the sort (Most used, Updated, Newest or Name), or switching to Yours collapses straight to the grid; under All is the Starter apps rail with See all. Each card opens the app; its ⋯ has Pin to sidebar, About (what it is, who made it, what it uses), Open in new tab, Copy link and, for the
app's owner and the workspace's admins, Delete. Delete asks first, then deletes the app for good: its versions, data,
files, functions' runs and logs, its preview environments, and who allowed it a connection. Its link stops working at once
and a new app can take its name. An agent deletes one with app_delete, giving the app's name twice
(openbelt app delete <app> --confirm <app>), with the same rule: the owner or an admin.
Jump back in lists the apps you opened last (a page of the live version, in the frame), newest
first, each with when you opened it. Each app tells the workspace as it counts the open (at most once a minute for one person),
so Apps reads them without waking any app; opens are kept 90 days, and only you see yours. With no opens, there's no row. Open opens /a/<app> on the workspace host, with the app in a rounded frame; /a/<app>/<path> opens that page of it, and /a/<app>/_... is OpenBelt's (the panel at /a/<app>/_panel).
Click Apps in the sidebar to return home. The link gains a background on
hover or keyboard focus. The frame follows your saved Light, Dark or System theme;
the app keeps its own styling, with no separate background painted beneath its rounded corners.
On iPhone, the header and app frame stay inside the screen's safe area in portrait and landscape.
A link to the app's own host opens it here too, unless the app opened it itself (a popup, a print view, a tab of its own).
Click the app's name in the header for its menu: Fullscreen opens the page you're on in a new tab at the app's own host, without the
frame (a reload keeps it there), and Copy link copies the page's address.
If your session ends inside the frame, click Sign in to continue to sign in in the full tab.
The frame's top right has the app's panel. Its first page has Devices (install the app in this browser or on any of your computers running OpenBelt Desktop, or remove it there), the viewer's own Notifications and Auto-update switches for this app (saved per account: on reloads automatically on deploy, off holds off and shows an Update available toast with Later and Reload), and its header opens About (description, owner, live version). Every member who may open the app sees those; its owner
and the workspace's admins also see who can view it, Stats (below), History (its last 20 versions and its preview
environments), Data (its collections and how many documents each holds) and Logs (its newest lines). Only they change
who can view it: the row opens in place on Private (only them: for any other member the app isn't there. Its pages, data,
files and functions are refused to them, to their agents and to other apps' pages they view, and no list names it),
Workspace (the default), and Public
(below); a pick changes nothing until its button (Make private,
Share with workspace, Make public, Turn off public link) saves it. A change that changes the link flashes the new one,
and Copy says Copy new link until it's used. On a phone the panel fills the screen. It shows what its owner's agent reads
with app_info and app_logs.
In History, its owner or an admin clicks an earlier version to see it in the frame, beside the panel: it runs as it is in a
preview environment of their own for that app (history-…) over a fresh copy of the live data, so nothing done there reaches
live. Make live, under it, takes that version live as promote_app({ app, version }) does, with Undo after; both are refused
if someone made another version live since the panel loaded.
Stats is how much the app is used in the last 7, 30 or 90 days: the people who opened it (each once), its pages opened,
its functions' runs and how many failed, a chart of people a day, who opens it most and when they last did, and for a
public app its visitors and the hosts of the pages that linked to it. A page counts when it's opened in a tab or a frame of the live
version. Agents' calls, check_app, preview environments, scripts and other files, and link checkers don't count. A
visitor on the public host is counted once a day with no cookie (a hash of their address and the day, kept until the
day is over), so their visits on different days can't be joined. Where visitors came from counts each one's first open
of the day. Days are UTC days; people's opens are kept 90 days.
app_info's usage gives an agent the last 7 and 30 days and the day it was last opened.
Search finds an app by its name, description, functions, collections and owner, in any order: the last word may be only
its start (expen), a word may have a typo (paino), and a name may be typed run together (timeoff). Most used lists the
best matches first. Beside Apps is how many match. It
shows 60 at a time, and Show more the next 60; the search and sort are answered by
the workspace (nothing is woken to answer them), so a workspace with thousands of apps opens as fast as one
with ten.
With no apps it says so, with a prompt to copy into an agent ("Build me a standup app on OpenBelt
(acme.example.com)": the workspace's host, whose /auth.md tells an agent how to connect) and Connect an
agent: one Claude Code command that adds the workspace's MCP address and signs in by itself (on plain
http under email sign-in, the base host's http://localhost:<port>/mcp, the one name Claude Code
signs in to over http; the rest are in Settings, Agents).
Apps in the sidebar clears the search.
The sidebar's foot is whoever is viewing: click it for a menu with their settings (/settings:
connecting an agent and their API tokens, and for admins, People, Groups and Events;
Connections) and the theme (System,
Light or Dark, kept in that browser). Signed out, the menu has only the theme. The button at the
sidebar's top (or Cmd+B / Ctrl+B) folds it to a rail of icons, here and on Connections, and
that browser keeps the choice. Pages hold back vertical overscroll only, so a two-finger sideways
swipe still goes back in the browser's history. On a phone the sidebar is a drawer behind the menu button; a tap outside it or Esc
closes it, and signed out, a line under Apps says so. There the menu button, Apps and the count share one bar
that stays at the top, search and sort share the row under it, and the featured app's Open sits beside its name.
Sorted by name or newest, with more apps than one row of cards holds, Recently updated above them shows what went live in the last 7 days, newest first.
The picture is the top 1280x800 of the live page, saved at 1.5x (1920x1200, so a zoom on it stays sharp), opened as check_app with readonly: true
opens it: nobody signed in, and writes never leave the browser. Its page reads its own data and the
apps that aren't private (db.app()), never a private app, its owner's included. It's taken 10 to 15 seconds after
a version goes live (deploys in a row make one picture, of the last), and again at most every 5 minutes
while the live data changes. So a page that shows nothing until someone signs in, or that makes
its first data when it loads, looks empty in its picture. app_logs says why when a picture
isn't taken. The picture is at /a/<app>/_shot on the workspace's host, for a browser signed in
there; an agent or a service working as someone (paperbot showing their apps) gets it over MCP with
app_picture({ app, theme }): the image, with the version and when it was taken, or picture: null
before the first is taken (one is booked then).
Each picture is taken twice in the same page: first with the browser preferring light
(prefers-color-scheme: light), then switched to dark. OpenBelt shows the one that matches
its theme (Light, Dark, or System's choice). A page styled with :root[data-theme="dark"],
@media (prefers-color-scheme), theme.watch or a matchMedia change listener gets a dark picture
of its own; a page that reads the theme once when it loads shows the same as in light. The dark one is at /a/<app>/_shot?theme=dark. A picture taken before there were two, or at the smaller 800x500, is taken again as pictures are taken now, the next time the home page shows its card.
Workspaces
Each workspace has its own host (<workspace>.<domain>), its own tokens and its own apps, each on a host
under it (<app>--<workspace>.<domain>). Two workspaces can both have a standup; neither can see the
other's. Inside a workspace, every app is open to everyone in it and apps can use each other's data:
that's the point of putting them side by side. The host is also what tells OpenBelt which app a
page belongs to, so one app's page can't write another's data as if it were that app's own (see
db.app in the SDK). An old link, <workspace>.<domain>/a/<app>/..., goes on to the app's host.
Source: docs/apps.md on GitHub