Skip to content

Extensions overview

What Forge extensions are, how they work, and what you can build with them.

Updated

An extension packages shared standards and behavior that multiple repos across an organization use. You author an extension inside a repo, and every commit that changes it publishes an immutable version to the organization’s registry: a commit to main that raises its version publishes a release, and every other commit a prerelease that only your repo runs. Other repos in the organization then install a release on main and call its tools.

An extension never carries business records. It carries schema definitions, taxonomies, CI checks, agent instructions and skills, executable tools, third-party provider declarations, cron schedules, branch triggers, webhooks, inbound mailboxes, durable workflows, realtime rooms, browser UIs, and MCP UIs.

What an extension can contain

An extension can combine any of these building blocks, and even a schema-only extension with no TypeScript files is valid:

Building block Declared in Behavior when released or installed
Custom models and custom fields Repo DAG (custom-models create-extension-custom-model) Copied into each installing repo under the repo’s own IDs. Read-only in the installing repo so future version updates apply cleanly.
Tag families and tags Repo DAG (tags create-extension-tag-family) Copied into each installing repo under the repo’s own IDs. Editable as data in the installing repo, with three-way conflict resolution on update.
CI checks Repo DAG (ci-checks create-extension-ci-check) Copied into each installing repo, where they run on every commit and gate change requests like the repo’s own.
Agent instructions and skills Repo DAG (agent-instructions create-extension-agent-instructions, agent-skills create-extension-agent-skill) Copied into each installing repo under the repo’s own IDs, where its agents read them beside the repo’s own. Editable as data in the installing repo, with three-way conflict resolution on update that takes or keeps a skill whole.
Tools index.ts (tool) Callable over HTTP, CLI, and MCP. Each call runs as the calling user, in a sandbox that the user’s other calls to the version share. The dashboard’s Tools tab shows each tool’s input and output.
Providers and requirements index.ts (defineProvider, secrets, oauth2) Declare third-party services and credential slots (org or user scope). Credentials stay sealed outside the sandbox. Forge adds them only to fetch requests and ctx.browser pages on the provider’s hosts.
Schedules index.ts (cron) Run a tool on a five-field cron expression in an IANA time zone. Each installing repo turns its schedules on or off on main.
Triggers index.ts (onBranchAdvance) Run a tool once for each commit or merge that advances a branch the trigger follows.
Webhooks index.ts (webhook) Run a tool once for each delivery that a third-party service sends to the webhook’s URL.
Mailboxes index.ts (mailbox) Receive email at <name>.<id>@mail.buildr-forge.com and run a tool once for each message the mailbox handler accepts.
Workflows index.ts (workflow) Durable multi-step routines started from tools or by members, including the ones that schedules, triggers, webhooks, and mailboxes run. Steps persist results across sleeps and retries.
Rooms index.ts (room) Realtime WebSocket rooms for extension UIs, backed by the repo’s event log.
Extension UI ui/web/index.html and ui/web/* Bundled for the browser and served at a dedicated web origin for each installation, and for each branch of the defining repo, with Forge OAuth sign-in.
MCP UI index.ts (mcpUi) and ui/mcp/* Bundled views that an agent shows in its chat through show_mcp_ui, calling Forge as the signed-in user through @buildr/sdk/mcp-ui.

How extensions fit an organization

Consider how a company sets up three repos to share standards, vendor data, and third-party sync:

  • Shared standards (procurement): Authored in an acme-standards repo with no code files. It defines a Line item custom model and a Cost centers tag family. Every regional operations repo (ops-west, ops-east) installs it as acme-standards.procurement, the name that the registry gives it after the repo that defines it, to get identical line-item custom fields and cost-center tags.
  • Cross-repo data tools (directory): Authored in a directory repo that holds every vendor and contact record. The directory extension defines tools such as companies.search and companies.get, plus a browser UI under ui/web/index.html. Team members whom the org’s policies let read directory and call its tools do so on main through forge.extensions.callRepoExtensionTool, or open its UI, to look up vendors without copying every company into every operations repo.
  • Third-party integration (linear): Declares a Linear OAuth 2 provider, an org connection requirement, a tool named syncProjects, and a nightly schedule. The organization connects Linear once, and each repo that installs linear binds that connection and runs syncProjects against its own data.

Next steps in this section

Read the guides in this section to build and operate extensions:

  • Extension authoring overview walks through creating, branch-testing, committing, and releasing an extension.
  • Schema and tag families explains extension-owned custom models, tag families, and CI checks, namespaces, and the invariants that every publication checks.
  • Tools covers @buildr/sdk value types, tool handlers, ctx.forge, and where a tool runs.
  • Testing an extension shows how to test an extension’s tools, workflows, and pages on a scratch branch before you merge it.
  • Providers and connections shows how to connect external APIs with defineProvider, secrets, and oauth2, and how to call a provider’s MCP server with @buildr/sdk/mcp.
  • Web pages with ctx.browser shows how tools and workflow steps read rendered web pages and save screenshots and PDFs as attachments.
  • Signed-in sites shows how to read a site that has only a sign-in form, with browser pages, fetch, and browser sessions.
  • Email with ctx.email shows how tools and workflow steps send email.
  • System One models with ctx.systemOne shows how tools and workflow steps ask TypeSafe’s Jev typed questions.
  • Schedules describes cron-triggered tool execution.
  • Triggers describes running a tool for each advance of a branch.
  • Webhooks describes running a tool for each delivery a third-party service sends.
  • Mailboxes describes giving an extension email addresses and running a tool for each accepted message.
  • Workflows covers durable multi-step workflows, retries, signals, and sleeps.
  • Extension UI explains how to bundle and serve a browser application for each installation and branch.
  • Streams and rooms explains how UIs follow repo events and collaborate in realtime rooms.
  • MCP UI explains how to declare interactive views that an agent shows in its chat.
  • Builds and runtime details the compiler stages, npm package resolution, sandbox limits, and build errors.
  • Installation and updates covers installing versions on main, resolving conflicts during version updates, and uninstalling.

Type to search…

↑↓ navigate↵ selectEsc close