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 upuvx 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 uppipx 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.
(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:latestThese 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/healthzThis 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/healthzServer commands
Run swb --help to see the command groups. Add --help to a command to see its options.
| Command | Use |
|---|---|
swb init | Write a private owner key and a minimal config. |
swb up | Start SwB on this computer. |
swb connect PLATFORM | Get the steps to connect a platform. |
swb companion | Pair, run or disconnect a companion. |
swb hook HARNESS | Forward a local agent event to the companion. |
swb status | Show the status and next steps. |
swb login-link | Create a one-time owner sign-in link. |
swb claim | Save a credential from a claim link or code. |
swb serve | Run the server with its configured host and port. |
swb export DIR | Write 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 migrate | Print a version 1 config in the version 2 format. |
swb blocks list | List the configured blocks. |
swb blocks show BLOCK | Show the settings for a block. |
swb blocks check | Check the block configuration. |
swb targets | List 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.