Brod

Deploy any AI-built app

Deploy an AI-generated app

Whichever tool wrote it, an AI-generated app reaches your team the same way on Brod: the agent sends the files over MCP, Brod gives back a private address, and you decide who can open it. This page covers what the app has to look like and what happens after it is deployed.

What the app has to look like

Brod runs two kinds of app. Many AI-built tools are already one of them, and the rest usually need a small change.

PartWhat Brod expects
Front endAny bundle of files: HTML, CSS, JavaScript, images, or the output folder of a React, Vue, Svelte or Astro build. Each file is served as it is.
Server code (optional)A _worker.js ES module at the top of the bundle, or a _worker/ folder with an index.js. It exports default { async fetch(request, env, ctx) }. This is the Cloudflare Pages layout.
LanguagesJavaScript and WebAssembly. Server code is never served to visitors.
DataServer code gets env.DB (the app's own SQLite database), env.KV (key-value) and env.FILES (file storage). No app can reach another app's storage.
Sign-inBrod signs people in. Server code reads the person from the x-brod-user-email and x-brod-role headers; the browser calls Brod.me() from /_brod/client.js. The app should not have its own login page or user table.

A static app has no database. If the app needs to save anything, it needs server code.

Size limits

  • Files sent with deploy_app

    Files sent inline with deploy_app: 1 MB in all. Bigger builds go through a one-time upload address, up to 25 MB compressed.

  • Unpacked bundle

    60 MB and 2,000 files. One file: 10 MB.

  • Deploys

    30 an hour per workspace.

Tell the agent where it will run

Coding agents default to an Express or Python backend with its own login. Paste this into the project's instructions file (CLAUDE.md, .cursor/rules, AGENTS.md) before asking for the app.

The last line matters. Brod tells the app each person's role (by default owner, editor or viewer), but it is the app's server code that has to refuse a viewer who tries to change data.

This app will run on Brod.
- Front end: static files (a build output folder is fine).
- Back end: one _worker.js exporting fetch(request, env). No Express, no long-running server.
- Data: env.DB (SQLite: query/run/batch), env.KV, env.FILES. Secrets: env.NAME.
- The signed-in user arrives in x-brod-user-email and x-brod-role headers. Do not build a login.
- Brod passes the role; the server code decides what each role may change.

The deploy flow

  1. Connect the agent once

    Follow the page for Claude Code, Cursor or Codex, or point any MCP client at https://brod.sh/mcp.

  2. Ask it to deploy and name the app

    The agent builds locally if needed, then calls deploy_app and gets back the address.

  3. Brod checks the server code first

    Before a version goes live, Brod loads _worker.js and checks it exports fetch. If it does not, the deploy is refused and the version already live keeps serving.

  4. The first version is live, and private

    Only you and the workspace admins can open it until you share it.

Staging, publishing and rollback

Once an app is live, an agent's next deploy goes to a staging address by default. The live app stays as it is.

  • Try it on staging

    The staging address looks like expense-approvals--staging.acme.brod.sh. You open staging, try the change, and ask the agent to publish it (publish_staging) or discard it.

  • Same data as live

    Staging uses the same database, files and secrets as the live app. What you change while testing is real, so be careful with test data and with changes that rewrite tables.

  • Numbered versions

    Every deploy is a numbered version. rollback serves an earlier one from the next request, with nothing rebuilt. It restores the code, not the data.

  • Two agents, one app

    If two people's agents work on the same app, each deploy passes the version its files started from. If the app has moved on since, the deploy is refused rather than merged, so nobody silently undoes someone else's change.

Who can open it

Brod checks access before the request reaches the app.

  • Six access modes

    private (the default), people (named people, groups or email domains), workspace, password, signed_in (anyone with a Brod account) and public.

  • No hint for outsiders

    Someone who is not allowed in gets the same "App not found" page as an address with no app behind it.

  • Widening needs a person

    An agent can narrow access straight away. Widening it, or inviting someone, returns a link that a person has to open and confirm within 24 hours.

  • New free workspaces

    On brod.sh, a new free workspace cannot use password, signed_in or public for its first 24 hours; sharing inside the workspace works from the start.

Secrets

API keys go in with set_secret, not in the code.

  • Read at runtime. The server reads them as env.NAME from the next request.
  • Write-only. Values are encrypted and write-only: neither you nor the agent can read them back, and get_files never includes them.
  • Limits. Up to 50 secrets per app, 5 KB each.
  • Staging. Staging uses the live secrets.

What does not fit

For a small internal tool, porting a backend to one fetch handler is usually a short job for the agent that wrote it. See how Brod runs an app for the details.

Brod is not the right place for these today
  • Python, Ruby, Go, containers, or an Express/Node server that listens on a port.
  • Scheduled jobs, background queues, or sending email from the app.
  • Serving WebSockets.
  • Deploying straight from a GitHub repository. The agent deploys the files.
  • Large public websites. Brod is made for internal tools.
  • Code from people you do not trust. Brod is not a sandbox for hostile code.

Questions

Does Brod write or generate the app?

No. Your coding agent writes the app. Brod runs it and gives it sign-in, storage, secrets and versions.

My app was built with Next.js. Will it run?

A static export will, as plain files. A Next.js server will not, because Brod does not run Node.js servers. Ask the agent to export the front end and move any server routes into _worker.js.

Can the app call outside APIs?

Yes, with fetch from the server code. List the hosts in the app's brod.json under network (up to 30). Each app's Network tab shows hosts it reached that were not listed.

Can I deploy without an AI agent?

Yes. A person can deploy from the dashboard, and scripts can use the REST API with a token. A dashboard deploy goes live directly rather than to staging.

Your AI already built the app. Put it in your team's hands.