SwitchyardOpen the builder →

Build a module here. Run it anywhere.

The people who own a decision improve it in the canvas; your software, n8n workflows and AI tools run the version you publish. Modules run with your own model key, which goes only to the model provider. All of this is part of Pro.

Make an access token

In the builder, open Account → Connect your tools and make a token. It’s shown once: keep it like a password, and revoke it there if it leaks. Tools use it to read the modules in your online library, so save modules online first (Library → Save online).

Claude, Cursor and other AI tools (MCP)

Add the MCP server to your tool’s settings. Your model key stays on your computer.

{
  "mcpServers": {
    "switchyard": {
      "command": "npx",
      "args": [
        "-y",
        "@switchyard1/mcp-server"
      ],
      "env": {
        "SY_TOKEN": "<your access token>",
        "TYPESAFE_API_KEY": "<your model key>"
      }
    }
  }
}

Your AI tool can then list, describe and run your modules, and draft new modules. It has no access to the marketplace. A draft opens in the builder for you to review and finish: nothing runs until you do.

Drafts from your AI tool

When your AI tool writes a module with draft_module, it gives you a link. Open it to see the module in a new tab of the builder. Look it over before you run it; any code in it asks for your approval first.

Command line

npx @switchyard1/cli login
npx @switchyard1/cli list
TYPESAFE_API_KEY=... npx @switchyard1/cli run "Review triage" --input reviews_folder=./reviews
TYPESAFE_API_KEY=... npx @switchyard1/cli run triage.yard --input reviews_folder=./reviews --watch
TYPESAFE_API_KEY=... npx @switchyard1/cli serve "Review triage" --port 8787

--watch processes each new file in a folder as it arrives. serve makes a module a web address on your own computer, for software that can’t send data to outside services.

Code library (JavaScript)

npm install @switchyard1/sdk

import { createClient } from "@switchyard1/sdk";

const client = createClient({ token: process.env.SY_TOKEN });
const triage = await client.module("Review triage");          // the version you published
const result = await triage.run({ review: "Arrived late." }, { keys: { typesafe: process.env.TYPESAFE_API_KEY } });

It runs on your machine or server with your own key, so it has no usage allowance.

Run API

curl https://<this site>/api/v1/modules/<module ID or name>/run \
  -H "Authorization: Bearer $SY_TOKEN" \
  -H "X-Model-Key: $TYPESAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"review": "Arrived late."}}'

Our server runs the module and returns each answer with its confidence. Your key is used for that run only and never stored. Pro includes a monthly allowance of items; text and number inputs only (use the code library or the command line for files).

n8n

Install the community node @switchyard1/n8n-node, add your access token and model key as credentials, then use Run Module: pick a module, map fields to its inputs, and get its answers back as fields.

Versions and the publish check

Every save online is a new version. In Library → Versions, publish the version your software should follow. Add a few examples first: the check runs them on the new version and the published one and shows which answers changed, before anything picks it up.

For AI coding assistants

Paste this into your assistant’s instructions so it builds System One decisions as modules:

When the user needs a typed decision about text (pick one of several options, score on a scale, or the probability that a yes/no statement is true), build it as a Switchyard module instead of writing a model call by hand:
1. Read the module-guide and module-schema resources of the Switchyard MCP server.
2. Write the module's YAML: inputs → Decide blocks (choice, score, noul questions) → outputs.
3. Send it with draft_module and give the user the link: they review and finish it in the builder.
4. Once they save it online, run it with run_module, or from code with @switchyard1/sdk.
Don't use a System One model for counting, arithmetic, dates or writing text.