logo
icon

OpenAB Kiro

Open Agent Broker — a lightweight Rust harness that bridges Discord and Slack to any ACP-compatible coding CLI (Claude Code, Codex, Gemini, Kiro) over stdio JSON-RPC. This template uses the Kiro CLI as the agent backend. Source: https://github.com/openabdev/openab

template cover
部署次数6
发布者zeaburZeabur
创建于2026-04-18
模版内的服务
service icon
最低配置2 Cores4 GB
推荐配置4 Cores8 GB
标签
AIDeveloper ToolsDiscordSlack

OpenAB Kiro

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 deploys the Kiro variant using the base openab image with kiro-cli as the agent backend.

Important Notes

  • Image tag: This template uses a pinned version (0.8.0). To upgrade, change the image tag in Zeabur Dashboard → Service → Settings. Available tags: GitHub Packages.
  • Persistent storage: /home/agent is mounted as a persistent volume. Plugins, settings, config, and credentials survive restarts.
  • Config ownership: The container runs directly as agent user (uid 1000). If you encounter permission issues on the persistent volume, restart the service.

Setup

1. Get a Discord Bot Token

  1. Go to https://discord.com/developers/applications and click New Application
  2. Navigate to Bot tab → click Reset Token → copy the token
  3. On the same page, scroll down and enable Message Content Intent under Privileged Gateway Intents
  4. Go to OAuth2 → URL Generator → check scope bot → check permissions: Send Messages, Send Messages in Threads, Create Public Threads, Read Message History, Add Reactions, Manage Messages
  5. Copy the generated URL and open it in your browser to invite the bot to your server

2. Get Discord Channel IDs

  1. Open Discord → go to User Settings (gear icon) → Advanced → enable Developer Mode
  2. Right-click the channel where you want the bot to respond → Copy Channel ID
  3. For multiple channels, separate IDs with commas: 123456789012345678,234567890123456789

3. Get a Kiro API Key (Pro/Pro+/Power only)

If you have a paid Kiro subscription, go to kiro.dev → Settings → API Keys → create a key and paste it into the KIRO_API_KEY variable. This lets the bot authenticate automatically — no post-deploy steps needed.

Free tier users can leave KIRO_API_KEY empty and authenticate after deployment (see step 5).

4. Deploy

Fill in the variables and click deploy. The service connects to Discord automatically.

5. Authenticate Kiro via Device Flow (Free tier only)

Skip this step if you set KIRO_API_KEY in step 3.

After the service is running, open the service terminal in Zeabur Dashboard and run:

HOME=/home/agent kiro-cli login --use-device-flow

⚠️ Must run as agent. Running as root writes credentials to /root/ which is not persisted; they will be lost on restart.

Follow the on-screen URL and code to complete device flow authorization in your browser. Restart the service after login completes.

Slack Setup (Optional)

OpenAB supports Slack via Socket Mode — no public URL needed.

  1. Go to https://api.slack.com/appsCreate New AppFrom scratch
  2. Socket Mode → Enable → generate an App-Level Token with scope connections:write → copy the xapp-... token (SLACK_APP_TOKEN)
  3. Event Subscriptions → Enable Events → add bot events: app_mention, message.channels, message.groups
  4. OAuth & Permissions → Bot Token Scopes → add: app_mentions:read, chat:write, channels:history, groups:history, channels:read, groups:read, reactions:write, files:read, users:read
  5. Install App → Install to Workspace → copy the xoxb-... token (SLACK_BOT_TOKEN)
  6. In each Slack channel you want the bot in, run /invite @YourAppName

Set SLACK_BOT_TOKEN and SLACK_APP_TOKEN in the template variables before deploying. Both Discord and Slack can run simultaneously.

Usage

  • @mention the bot in an allowed channel or Slack channel to start a conversation
  • OpenAB creates a thread for multi-turn conversations — no @mention needed for follow-ups
  • Each thread maps to a persistent Kiro session (24h TTL)

GitHub Integration (Optional)

The agent can use gh (GitHub CLI) to review PRs, create issues, comment, merge, etc. Since the container is headless, authentication uses device flow:

  1. Ask the bot in Discord: "log in to GitHub"
  2. The bot will reply with a one-time code and a URL (e.g. https://github.com/login/device)
  3. Open the URL on your phone or computer, enter the code, and authorize
  4. The bot confirms login — gh is now authenticated for this session

See gh-auth-device-flow.md for technical details.

Customization

FileDescription
/home/agent/.config/openab/config.tomlOpenAB config (sessions, reactions, STT, etc.)

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/agent/.config/openab/config.toml

For config options, see the OpenAB documentation.

Disabling

Leave Discord Bot Token empty. The service sleeps instead of crashing.