serve-opencode
serve-opencode¶
Run agents as an OpenCode-compatible HTTP server.
This creates an HTTP server implementing the OpenCode API protocol, enabling your AgentPool agents to work with OpenCode TUI and SDK clients.
Configuration: Config file is optional. Without a config file, creates a general-purpose agent with default settings similar to the ACP server.
Agent Selection: Use --agent to specify which agent to use by name. Without this option, the first agent in your config is used as the default (or "assistant" if no config provided).
Examples: # Start with default agent agentpool serve-opencode
# Start with specific config
agentpool serve-opencode agents.yml
# Start on custom port with specific agent
agentpool serve-opencode --port 8080 --agent myagent agents.yml
config¶
-h, --host¶
Default: 127.0.0.1 Host to bind to
-p, --port¶
Default: 4096 Port to listen on
--agent¶
Name of specific agent to use (defaults to first agent in config)
-w, --working-dir¶
Working directory for file operations (defaults to current directory)
--help¶
Flag Show this message and exit.