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..." },
  ],
})

Files and names

In the frame

The workspace's frame and the app's page work as one page, with nothing to set up:

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" })

More on environments

Changing an existing app

  1. 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.
  2. Send edits, on top of the version you read. find is 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"],
})

More on reading and patching

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"
    }
  }
}

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:

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"
    }
  }
}

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.

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