Skip to content

serve-opencode

serve-opencode

Serve the agent pool through the OpenCode V2 HTTP API.

Every pool agent and team is exposed as an OpenCode agent. Sessions are bound to one agent at a time and can switch agent and model while they run. Connect with opencode --server http://127.0.0.1:4096.

agentpool serve-opencode [OPTIONS] [config]

config

Path to agent configuration (optional)

-h, --host

Default: 127.0.0.1 Host to bind to

-p, --port

Default: 4096 Port to listen on

--agent

Default agent for new sessions (defaults to the pool's)

-w, --working-dir

Default location directory (defaults to the current directory)

--password

Basic auth password (username 'opencode'). Defaults to OPENCODE_PASSWORD.

--help

Flag Show this message and exit.