Get started
By the end, OpenSwitchboard has answered you three times: in your terminal, in Slack, and from a production deployment on Cloudflare.
You need: Node 24 and an Anthropic API key. Part 2 adds a Slack workspace where you may create an app. Part 3 adds a Cloudflare account with a domain in it.
Part 1: an answer in your terminal
Install
npx @coreplane/switchboard init --organization <org> --anthropic-key <key>You should see:
wrote to /Users/you/.switchboard:
.env (mode 600)
config/config.yaml
providers: anthropic
capabilities: execution local · github off · memory off · run history off · …
next:
npx @coreplane/switchboard ask "what can you do?"
npx @coreplane/switchboard start
…The installation lives in ~/.switchboard, so every later command works from any directory (SWITCHBOARD_HOME puts it elsewhere; a directory that already holds one wins when you run from inside it). .env holds your key and only you can read it; config/config.yaml is the example config with every optional block off. init --help lists every flag.
Ask
npx @coreplane/switchboard ask "what can you do?"You should see status lines (preparing workspace…, preparing the prompt…), then the general agent's answer.
Part 2: an answer in Slack
Create the Slack app
- At api.slack.com/apps: Create New App → From a manifest → paste
slack-app-manifest.yaml. - Basic Information → App-Level Tokens → generate one with
connections:write. It starts withxapp-. - Install App → Install to Workspace. The Bot User OAuth Token starts with
xoxb-.
Add the tokens
npx @coreplane/switchboard init --force --organization <org> --anthropic-key <key> --slack-app-token <xapp-token> --slack-bot-token <xoxb-token>Start the bot
npx @coreplane/switchboard startYou should see switchboard running (providers: anthropic; default agent: general). This is the process the production container runs, over Slack's Socket Mode: no port, no Docker. Leave it running.
Say something
In Slack, /invite @<your app> into a channel, then:
@<your app> what can you do?You should see a 👀 reaction, a status card, and the answer in a thread. Reply in the thread without a mention and it answers again.
Part 3: an answer from production
Production is the bot as a container on Cloudflare plus a state Worker that keeps state across restarts.
You need: a Cloudflare account, a domain (a zone) in it, and an API token for that account in CLOUDFLARE_API_TOKEN with the scopes Set up accounts lists. Stop the local bot first (Ctrl-C).
Write the deployment profile
npx @coreplane/switchboard init --force --organization <org> --anthropic-key <key> --slack-app-token <xapp-token> --slack-bot-token <xoxb-token> --cloudflare <account id> --zone <zone>You should see:
wrote to /Users/you/.switchboard:
.env (mode 600) (replaced)
config/config.yaml
deploy/profile.json
Worker configs from deploy/profile.json:
written .switchboard/deploy/cloudflare-memory/wrangler.jsonc
written .switchboard/deploy/cloudflare/wrangler.jsonc
…The profile names all four Workers under your zone; this lesson deploys the two required ones.
Point the config at the state Worker
Add to config/config.yaml (which --force rewrote):
runHistory:
worker:
baseUrl: https://switchboard-memory.<zone>
runtimeOverrides:
worker:
baseUrl: https://switchboard-memory.<zone>Stage the secrets
mkdir -p -m 700 ~/.secrets/switchboard
openssl rand -hex 32 > ~/.secrets/switchboard/MEMORY_TOKENWrite SLACK_BOT_TOKEN, SLACK_APP_TOKEN and ANTHROPIC_API_KEY there too, one value per file. Then:
npx @coreplane/switchboard deploy secrets memory
npx @coreplane/switchboard deploy secrets botDeploy
npx @coreplane/switchboard deploy plan --only memory,bot
MEMORY_TOKEN="$(cat ~/.secrets/switchboard/MEMORY_TOKEN)" npx @coreplane/switchboard deploy all --only memory,botYou should see the plan's Images: registry … 0 of 1 present; deploy all copies the rest, then:
copied into the account registry: bot …
[deploy:all] bot: live (commit <sha>; 45s after the upload)
deployed and liveThat copied the release's image into your account, deployed both Workers, and waited until /healthz answered from the new container.
Say something, again
Mention the bot in Slack as before; the reply now comes from production.
curl -sS https://switchboard.<zone>/healthzNext
- Your first request in Slack: follow-ups, directives, handing off to the coding agent.
- Deploy: the optional Workers, the GitHub App, deploying from CI.
- Architecture: what you just ran.