Skip to Content

Install

SwB runs on Linux, macOS and Windows. To build SwB from source, follow Docker Compose. Use the methods below after package or image publication.

Install and start

Use an empty folder for your SwB files. The owner key lets the swb command sign in as you.

Install uv. SwB needs Python 3.12 or later.

uvx swb-one up

uvx downloads and starts SwB. Open the one-time sign-in link from your terminal within five minutes. In the other examples, replace the leading swb with uvx swb-one.

Install pipx. SwB needs Python 3.12 or later.

pipx install swb-one
swb up

pipx installs the swb command for your user account. Open the one-time sign-in link from your terminal within five minutes.

If pipx uses an older Python, use pipx install --python 3.12 swb-one.

Install Docker.

(umask 077; set -C; printf 'SWB_KEY_OWNER=%s\nSWB_PUBLIC_URL=http://localhost:8870\n' "$(openssl rand -hex 32)" > .env)
docker run -d --name swb --env-file .env \
  -p 127.0.0.1:8870:8000 -v swb-data:/data \
  ghcr.io/zhehanzhang/swb:latest

These commands create a private .env file and start the container. The image keeps its data in /data. Run docker exec swb swb login-link to get a sign-in link. To run another SwB command inside the container, start it with docker exec -it swb swb.

On the first local start, swb up creates .env, config/switchboard.yaml and data/ in the instance folder. Run swb login-link later to get a new link.

To create the files before you start the server, run swb init. Then run swb up. Run swb login-link in a second terminal from the same folder.

swb up listens on 127.0.0.1 at port 8870 by default. The default local MCP address is http://localhost:8870/mcp. Set SWB_PORT in the shell or in .env to use a different port.

Use swb up --dir ./my-swb to select an instance folder. Use the same --dir with swb init, swb status, swb login-link, swb connect and swb claim. See Config for bind addresses, config files and data folders.

Check the server

curl -fsS http://127.0.0.1:8870/healthz

This signed-out request shows status and version. Run swb status or call /healthz with the owner key to list blocks, their states and any missing variables.

For a public SwB server, use its HTTPS address.

curl -fsS https://swb.example.com/healthz

Server commands

Run swb --help to see the command groups. Add --help to a command to see its options.

CommandUse
swb initWrite a private owner key and a minimal config.
swb upStart SwB on this computer.
swb connect PLATFORMGet the steps to connect a platform.
swb companionPair, run or disconnect a companion.
swb hook HARNESSForward a local agent event to the companion.
swb statusShow the status and next steps.
swb login-linkCreate a one-time owner sign-in link.
swb claimSave a credential from a claim link or code.
swb serveRun the server with its configured host and port.
swb export DIRWrite saved memory to Markdown files in the output folder DIR.
swb log [--limit N]Print recent audit entries. The default limit is 50.
swb config migratePrint a version 1 config in the version 2 format.
swb blocks listList the configured blocks.
swb blocks show BLOCKShow the settings for a block.
swb blocks checkCheck the block configuration.
swb targetsList the targets for send.

Versions

After publication, PyPI hosts the swb-one package. GitHub Container Registry hosts the ghcr.io/zhehanzhang/swb image. To select one release, use a version such as 1.0.0. The image tag latest follows the newest stable release.

On this page