Docs menu

POINT OPENX AT A REPO

Workbenches

Goal: Turn the tools your team writes into something every AI, app and teammate can call.

A warm query is a tool built from your data. A workbench is a tool built from your code: group your tools into one repo that declares what it does, and OpenX builds it and hosts it in your tenant.

THE MODEL

Declare a tool once, reach it every way

A workbench declares its tools and the modes they're reached through. The same tool definition serves AI over MCP, code over a REST API, and people through a Web interface - one definition, not three builds.

import { APIMode, MCPMode, WebMode, Workbench } from 'jsr:@fathym/fai@0.0.909/workbenches';

export default Workbench('triage')
  .Tools({ Classify: classifyTool, Escalate: escalateTool })
  .Modes({
    MCP: MCPMode(), // each tool method becomes an MCP tool
    API: APIMode(), // each tool method becomes POST /{tool}/{method}
    Web: WebMode({ handler: serve }), // your own fetch handler for pages
  });

Run it locally, then host it

A workbench runs with fai run, the runtime that ships with fAI. Run it on your laptop until it does what you want:

fai run workbench.ts --mode MCP
fai workbenches describe workbench.ts

describe lists the modes the workbench declares and each mode's input, without starting it. When it's ready, push the repo (or publish it to JSR) and point OpenX at it: OpenX hosts it by running the same fai run in your tenant. That step is Host Your Own Workbench.

What ships

MCP modeThe tools as an MCP server any AI can connect to
API modeEvery tool method as a REST endpoint, with an OpenAPI catalog
Web modeYour own HTTP server - pages, assets, whatever you write
ConsumesOne workbench calls another's hosted mode; OpenX wires the URL in at deploy
Custom modesDeclare a mode beyond MCP, API and Web (a scheduled job, say) in your workbench package; nothing to register

A mode's key is its name: MCP, API and Web are names like any other, and OpenX reads nothing into them. Which ports speak MCP, and which of those Azi may use, you set per port in the inspector: Serve MCP from a Workbench.

How to call each mode: Reach a Hosted Workbench. How they build on each other: Workbenches Build on Each Other.

Still landing

  • Signing a browser in to a Web mode. A Web mode set to None opens in any browser tab. One set to Identity doesn't sign a browser in yet; calls with a key work. Where to set it: Reach a Hosted Workbench.
  • Persistent vaults. A vault holds what a workbench needs to keep. Vaults persist across runs on your laptop; a hosted workbench's storage doesn't survive a redeploy yet. Persistent hosted vaults are coming.
  • Custom domains and container sizes for a hosted workbench are coming.

Try one

fathym/sample-api-workbench is a small public workbench with two tools in API mode; its README walks the local run and the OpenX deploy. fathym/sample-ui-workbench adds a Web mode that reads from it. To run a published one without cloning anything:

fai run jsr:@fathym/sample-api-workbench --mode API

Next steps

On this page