Open Agent Broker — a lightweight Rust harness that bridges Discord to any ACP-compatible coding CLI over stdio JSON-RPC. This template uses OpenCode as the agent backend, supporting 75+ LLM providers (Ollama Cloud, OpenAI, Anthropic, Google, and more). Source: https://github.com/openabdev/openab

OpenAB is a lightweight, open-source Rust harness that bridges Discord to any Agent Client Protocol-compatible coding CLI over stdio JSON-RPC.
This template uses OpenCode as the agent backend, supporting 75+ LLM providers (Ollama Cloud, OpenAI, Anthropic, Google, and more).
beta tag and auto-updates with each new beta release. Switch to stable for production use. To pin a specific version, change the image tag in Zeabur Dashboard -> Service -> Settings. Available tags: GitHub Packages./home/node is mounted as a persistent volume. Settings, config, credentials, and opencode.json survive restarts.bot -> check permissions: Send Messages, Send Messages in Threads, Create Public Threads, Read Message History, Add Reactions, Manage MessagesOpenCode needs access to an LLM provider. The simplest approach is to set an environment variable in Zeabur Dashboard -> Service -> Variables:
| Variable | Provider |
|---|---|
OPENCODE_API_KEY | OpenCode (native, get key at opencode.ai) |
ANTHROPIC_API_KEY | Anthropic Claude |
OPENAI_API_KEY | OpenAI GPT |
GOOGLE_GENERATIVE_AI_API_KEY | Google Gemini |
GROQ_API_KEY | Groq |
MISTRAL_API_KEY | Mistral |
DEEPSEEK_API_KEY | DeepSeek |
OPENROUTER_API_KEY | OpenRouter (proxies 100+ models) |
Set at least one variable and restart the service. OpenCode picks it up automatically.
Alternative: Interactive login
For providers that use browser OAuth (e.g. AWS Bedrock, Azure OpenAI), open the service terminal in Zeabur Dashboard and run:
runuser -u node -- opencode auth login
Wiring API keys to the agent: openab spawns the agent with
env_clear(), so the env-var path requires an allowlist. After first boot edit/home/node/.config/openab/config.tomland add under[agent]:[agent] inherit_env = ["OPENCODE_API_KEY", "ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY", "GROQ_API_KEY", "MISTRAL_API_KEY", "DEEPSEEK_API_KEY", "OPENROUTER_API_KEY"]
opencode auth loginneeds no edit — credentials live in~/.opencode/.
To configure a specific model, create or edit /home/node/opencode.json:
{
"provider": "anthropic",
"model": "claude-sonnet-4-20250514"
}
See OpenCode documentation for all available providers and models.
123456789012345678,234567890123456789Fill in the Discord Bot Token and click deploy. The service connects to Discord automatically. Then authenticate OpenCode using the method above.
For Telegram, deploy the OpenAB Telegram template and switch its image tag to beta-opencode with the matching OPENAB_AGENT_COMMAND. Other platforms are enabled by environment variables in unified mode (LINE_CHANNEL_SECRET, FEISHU_APP_ID, GOOGLE_CHAT_ENABLED=true, TEAMS_APP_ID, WECOM_CORP_ID) — see the OpenAB docs. Webhook platforms need a public HTTPS domain on the service (port 8080); Feishu connects outbound via WebSocket and needs no domain.
| File | Description |
|---|---|
/home/node/.config/openab/config.toml | OpenAB config (sessions, reactions, STT, etc.) |
/home/node/opencode.json | OpenCode model/provider config |
/home/node/.opencode/ | OpenCode credentials and state |
config.toml is created from a built-in template on first boot. After that, edit the file directly -- environment variables are only used for initial setup. To reset to defaults, delete the file and restart: rm /home/node/.config/openab/config.toml
For config options, see the OpenAB documentation.
By default, openab ignores messages from other bots and webhooks. To allow webhook-triggered messages (e.g. automated testing or CI pipelines), add the following to your config.toml:
[discord]
allow_bot_messages = "mentions"
With this setting, openab responds to any bot or webhook message that @mentions it. To restrict to a specific webhook, also add:
trusted_bot_ids = ["YOUR_WEBHOOK_USER_ID"]
The webhook user ID is the numeric ID in the webhook URL: https://discord.com/api/webhooks/<ID>/...
Leave Discord Bot Token empty. The service sleeps instead of crashing.