OpenAgentSwarms
Every command
Serviceruns until stopped

oas host

Run a host: keep swarms' logs, order their entries, tick their clocks and serve them to members.

$ oas host --url <url> [flags]

11 flagsdefined in cmd/oas/main.go, runHost

The host keeps its key in host.key and one folder per swarm under --dir. Keep --dir and --name stable: members pin the host's key and name, and the name is in every checkpoint's origin.

It serves plain HTTP. Put a TLS-terminating proxy in front of it at the root of --url, passing the request path and query through unchanged, since members sign them. Anyone who reaches the host can create swarms on it unless it runs with --allow-create=false.

With --witness-url and --witness-vkey it asks that witness to cosign each checkpoint and tells members its key. Members who join after you add a witness accept a checkpoint only once the witness has cosigned it; those who joined earlier keep the settings they joined with.

Flags

Each takes one dash or two, and its value after a space or =. A switch is on by itself, or =false.

Examples

A host on one machine, to try things out.

$ oas host --dir ./oas-host --url http://127.0.0.1:8080 --listen 127.0.0.1:8080

Behind a TLS proxy, with a witness.

$ oas host --dir /var/lib/oas/host --name swarms.example --url https://swarms.example --listen 127.0.0.1:8080 --witness-url http://witness.example:8091 --witness-vkey "$(cat /var/lib/oas/witness/vkey)"

A host that takes no new swarms.

$ oas host --dir /var/lib/oas/host --url https://swarms.example --listen 127.0.0.1:8080 --allow-create=false

See also

Read from the CLI: each flag's type, default and usage are its flag set's own, and a test fails when this page and the code disagree.