Skip to content

HTTP/SSE server

Headless HTTP hub for sessions, health, auth, and session-scoped SSE.

Terminal window
export BMO_AUTH_TOKEN='replace-with-service-token'
bmo service start http --listen 127.0.0.1:8080 --auth token

CLI token mode requires a nonempty BMO_AUTH_TOKEN in the service process environment. Command-line --token and legacy --auth-token credentials are rejected. This is separate from the in-process hub’s token config field below.

For local-only development you can run without a token when the bind address is loopback:

Terminal window
bmo service start http --listen 127.0.0.1:8080 --auth local

For the interactive app, enable the in-process hub in bmo.toml:

[services.http]
enabled = true
listen = "127.0.0.1:8080"
auth = "token"
token = "dev-token"

auth = "token" enables Bearer-token authentication. auth = "local" is accepted only for loopback addresses; non-loopback unauthenticated binds are rejected during config validation.

bmo service start autopilot uses the same HTTP server path when you want the API server beside the scheduler.

  • Use bmo service start http when you want only the HTTP/SSE runtime.
  • Use bmo service start autopilot when you want the same API server plus the scheduler and long-lived runtime posture.
  • Use bmo --daemon=auto|require when you want an interactive terminal to attach to an already-running compatible loopback daemon instead of starting a second local runtime. That is a TUI reuse path, not an HTTP deployment mode.

Plain bmo service start http and [services.http] listeners serve direct HTTP/1.1. HTTP/2 is available when TLS is terminated in front of BMO, or when BMO is embedded with a first-party TLS config; session SSE and OpenAI-compatible streaming are covered by route-level HTTP/2 tests on that TLS path. BMO does not expose h2c as the public API posture.

Maintainer streaming benchmarks label direct plaintext HTTP/1.1 as h1_* and TLS-negotiated HTTP/2 as h2_tls_*; read them as external transport posture benchmarks, not protocol-only comparisons with TLS removed.

Routes live under /v1/ for sessions, messages, teams, config, models, operations, checkpoints, agent runs, eval/shadow, and related readouts. The server also exposes /metrics and /v1/health.

Session events stream from:

GET /v1/sessions/{id}/events

The SSE stream is an observer export. Session state, run ledgers, proposal lifecycle, and control-loop transitions remain in BMO’s canonical app and data store.

Send file paths in attachment_paths when posting a session message. BMO accepts text files and PNG, JPEG, GIF, and WebP images up to 5 MiB per file. PDF, audio, video, and other binary formats are rejected before the message is saved or an agent run starts. If any attachment is unsupported, the entire message is rejected; earlier files in the request are not saved separately. send_message uses the same formats and limit. The terminal file picker selects JPEG and PNG files; its pending attachment sync uses the same size and media validation before saving the attachment list.

  • bmo service status http --source config
  • TUI /serve
  • Structured logs: http_server.fired, http_server.action
  • Maintainer trace recipes: Agent tracing recipes
  • HTTP API maintainer topic: HTTP API Server