### Setup and Run OpenAB Locally Source: https://github.com/openabdev/openab/blob/main/docs/local-dev.md Copy the example configuration, set the Discord bot token environment variable, and run the application using Cargo. ```bash cp config.toml.example config.toml # Edit config.toml with your bot token and channel ID export DISCORD_BOT_TOKEN="your-token" cargo run ``` -------------------------------- ### Add Init Container for Tool Installation (YAML) Source: https://context7.com/openabdev/openab/llms.txt Use an init container to pre-install tools onto a Persistent Volume Claim (PVC) before the agent starts. This example installs kubectl, ensuring it's available in the agent's home directory. ```yaml # Init container — pre-install tools onto PVC before agent starts agents: kiro: extraInitContainers: - name: install-tools image: curlimages/curl:latest command: - sh - -c - | set -e mkdir -p /home/agent/bin if [ -f /home/agent/bin/.tools-installed ]; then exit 0; ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') KUBECTL_VERSION=$(curl -fsSL https://dl.k8s.io/release/stable.txt) curl -fsSL -o /home/agent/bin/kubectl \ "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" chmod +x /home/agent/bin/kubectl touch /home/agent/bin/.tools-installed volumeMounts: - name: agent-home mountPath: /home/agent ``` -------------------------------- ### GBrain Manual Setup Steps Source: https://github.com/openabdev/openab/blob/main/docs/refarch/gbrain.md Follow these steps to manually deploy and configure GBrain for OpenAB agents. Ensure PostgreSQL is deployed, then install the GBrain CLI and initialize the database on each agent pod. Configure the MCP client with the GBrain server details. ```bash ┌─────────────────────────────────────────────────────────┐ │ 1. Deploy PostgreSQL │ │ │ │ kubectl create secret ─► gbrain-postgres-secret │ │ kubectl apply ─► Deployment + Service + PVC │ │ │ │ Image: pgvector/pgvector:pg16 │ │ Env: POSTGRES_DB=gbrain │ │ POSTGRES_USER=gbrain │ │ POSTGRES_PASSWORD=(from secret) │ │ PVC: 5Gi RWO │ │ Svc: ClusterIP :5432 │ ├─────────────────────────────────────────────────────────┤ │ 2. For each OAB agent pod: │ │ │ │ kubectl exec ──┐ │ │ ├─► Install gbrain CLI │ │ curl install.sh │ → ~/.local/bin/gbrain │ │ ├─► Init database │ │ gbrain init --url │ → ~/.gbrain/config.json │ │ ├─► Write MCP config │ │ │ │ │ ┌──────────┬─────────────────────────────┐ │ │ │ CLI │ MCP config path │ │ │ ├──────────┼─────────────────────────────┤ │ │ │ kiro │ ~/.kiro/settings/mcp.json │ │ │ │ claude │ ~/.claude/server.json │ │ │ │ copilot │ ~/.copilot/mcp-config.json │ │ │ └──────────┴─────────────────────────────┘ │ │ │ │ MCP config content: │ │ {"mcpServers":{"gbrain":{ │ │ "command":"~/.local/bin/gbrain", │ │ "args":["serve"]}}} │ │ │ │ ⚠ Note: ~ may not expand in all environments. │ │ Use $HOME or an absolute path if your MCP client │ │ or init container does not perform tilde expansion. │ ├─────────────────────────────────────────────────────────┤ │ 3. Verify │ │ │ │ kubectl exec -- gbrain stats │ │ kubectl exec -- gbrain query "test" │ └─────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Agent Installation Workflow Source: https://github.com/openabdev/openab/blob/main/docs/agent-installable-tools.md This diagram illustrates the interaction between a human, the agent, and the OpenAB pod during tool installation. It shows how the agent reads documentation, executes commands, and installs tools into the user's home directory on the PVC. ```text Human Agent OpenAB Pod ┌─────────────────┐ ┌──────────────────┐ ┌──────────────────────────┐ │ │ │ │ │ Container (read-only) │ │ "install glab │────────►│ reads docs/* │ │ ┌────────────────────┐ │ │ for my OAB │ │ from OpenAB repo │ │ │ curl, gh, rg, tini │ │ │ agent" │ │ │ │ │ (built-in, minimal)│ │ │ │ │ finds install │ │ └────────────────────┘ │ │ │ │ steps for glab │ │ │ │ │ │ │ │ PVC (persistent ~/): │ │ │ │ executes: │ │ │ curl ─► extract │─────────►│ ┌────────────────────┐ │ │ │ │ ─► ~/bin/glab │ │ │ ~/bin/ │ │ │ │ │ ─► verify │ │ │ ├── glab ✅ new│ │ │ │ │ │ │ │ ├── aws │ │ │ "done! glab │◄────────│ "glab v1.46 │ │ │ ├── ssh │ │ │ ready to use" │ │ installed ✅" │ │ │ ├── terraform │ │ │ │ │ │ │ │ └── kubectl │ │ └─────────────────┘ └──────────────────┘ │ │ │ │ │ │ ~/.ssh/ ~/.config/│ │ │ │ ~/.kiro/ ~/aws-cli/│ │ │ └────────────────────┘ │ └──────────────────────────┘ ┌─────────────────────────────────────────────────────────────────────────────┐ │ Migration: move PVC to new node / cluster / cloud │ │ │ │ Old Cluster PVC New Cluster │ │ ┌──────────┐ ┌────────────────┐ ┌──────────────┐ │ │ │ Pod ──────┼────►│ ~/bin/ │────►│ New Pod │ │ │ │ (delete) │ │ ~/.ssh/ │ │ (attach PVC) │ │ │ └──────────┘ │ ~/.config/ │ │ │ │ │ │ ~/.kiro/ │ │ Everything │ │ │ │ ~/aws-cli/ │ │ just works™ │ │ │ └────────────────┘ └──────────────┘ │ │ │ │ Zero reinstallation. All tools, configs, keys, and agent memory persist. │ └─────────────────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Prompt Agent to Install Tools Source: https://github.com/openabdev/openab/blob/main/docs/agent-installable-tools.md Use this prompt to ask your agent to install a specific tool. The agent will query the documentation and perform the installation. ```text per docs/* from OpenAB GitHub repo, how to install for my OAB agent ``` -------------------------------- ### Kubernetes Deployment config.toml Example Source: https://github.com/openabdev/openab/blob/main/docs/cronjob.md This TOML snippet shows the `config.toml` setup for Kubernetes deployments, ensuring `cronjob.toml` is mounted on a PVC and correctly referenced. ```toml # config.toml [cron] usercron_enabled = true # Relative to $HOME/.openab/ — resolves to $HOME/.openab/cronjob.toml usercron_path = "cronjob.toml" ``` -------------------------------- ### Example AI Agent Prompts for OpenAB Operations Source: https://github.com/openabdev/openab/blob/main/docs/ai-install-upgrade.md These prompts demonstrate how to instruct an AI agent to perform various OpenAB deployment tasks, including fresh installs, upgrades to specific or latest versions, and rollbacks. ```bash # Fresh install with kiro on local k8s fresh install https://github.com/openabdev/openab v0.7.7 with kiro on my local k8s with all credentials in .env ``` ```bash # Upgrade to latest stable upgrade to latest stable for my local openab k8s deployment per https://github.com/openabdev/openab/blob/main/docs/ai-install-upgrade.md ``` ```bash # Upgrade to a specific version upgrade to v0.7.7 for my local openab k8s deployment per https://github.com/openabdev/openab/blob/main/docs/ai-install-upgrade.md ``` ```bash # Upgrade to a beta upgrade to v0.7.7-beta.1 for my local openab k8s deployment per https://github.com/openabdev/openab/blob/main/docs/ai-install-upgrade.md ``` ```bash # Rollback after a bad upgrade rollback openab per the upgrade SOP — the upgrade to v0.7.7 failed ``` -------------------------------- ### Example Agent Prompt Source: https://github.com/openabdev/openab/blob/main/docs/sendimages.md This is an example prompt to instruct a coding agent to read documentation and send an image back to Discord. ```markdown Read docs/sendimages.md from OpenAB GitHub and send the image back to my Discord thread. ``` -------------------------------- ### OpenAB Helm Values with Multi-Agent Configuration Source: https://context7.com/openabdev/openab/llms.txt Example `values.yaml` file demonstrating a multi-agent setup for OpenAB, including detailed configurations for Kiro (Discord, pool, reactions, STT, cronjobs) and Claude (image, command, workingDir, Discord). ```yaml # values.yaml — multi-agent example with full options agents: kiro: discord: botToken: "${DISCORD_BOT_TOKEN}" allowedChannels: ["1234567890"] allowBotMessages: "mentions" trustedBotIds: ["9876543210"] allowUserMessages: "multibot-mentions" messageProcessingMode: "per-lane" maxBotTurns: 100 pool: maxSessions: 10 sessionTtlHours: 24 reactions: enabled: true toolDisplay: "compact" stt: enabled: true apiKey: "${GROQ_API_KEY}" echoTranscript: true cronjobs: - schedule: "0 9 * * 1-5" channel: "1234567890" message: "summarize yesterday's merged PRs" platform: "discord" senderName: "DailyOps" timezone: "America/New_York" claude: image: ghcr.io/openabdev/openab-claude:latest command: claude-agent-acp workingDir: /home/node discord: botToken: "${CLAUDE_BOT_TOKEN}" allowedChannels: ["9876543210"] ``` -------------------------------- ### Pre-install Tools with Init Container Source: https://github.com/openabdev/openab/blob/main/docs/sidecar.md Use an init container to install necessary tools into the agent's persistent volume before the main container starts. This ensures tools are available on every pod restart without re-downloading. ```yaml agents: kiro: extraInitContainers: - name: install-tools image: curlimages/curl:latest command: - sh - -c - | set -e mkdir -p /home/agent/bin # Skip if tools already exist (PVC is persistent) if [ -f /home/agent/bin/.tools-installed ]; then echo "Tools already installed, skipping" exit 0 fi ARCH=$(uname -m) if [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; elif [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi # Install kubectl KUBECTL_VERSION=$(curl -fsSL https://dl.k8s.io/release/stable.txt) curl -fsSL -o /home/agent/bin/kubectl \ "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" chmod +x /home/agent/bin/kubectl # Add more tools here... touch /home/agent/bin/.tools-installed volumeMounts: - name: agent-home mountPath: /home/agent ``` -------------------------------- ### Install OpenAB with Slack Integration Source: https://context7.com/openabdev/openab/llms.txt Install OpenAB using the Helm chart, enabling Slack integration with bot and app tokens, and specifying allowed channels. ```bash # Install with Slack helm install openab openab/openab \ --set agents.kiro.slack.enabled=true \ --set agents.kiro.slack.botToken="$SLACK_BOT_TOKEN" \ --set agents.kiro.slack.appToken="$SLACK_APP_TOKEN" \ --set-string 'agents.kiro.slack.allowedChannels[0]=C0123456789' ``` -------------------------------- ### Install OpenAB with Helm Source: https://github.com/openabdev/openab/blob/main/README.md Installs the OpenAB project using Helm, configuring it for Discord or Slack bots. Ensure you have Helm installed and the OpenAB repository added. ```bash helm repo add openab https://openabdev.github.io/openab helm repo update helm install openab openab/openab \ --set agents.kiro.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=YOUR_CHANNEL_ID' # Slack helm install openab openab/openab \ --set agents.kiro.slack.enabled=true \ --set agents.kiro.slack.botToken="$SLACK_BOT_TOKEN" \ --set agents.kiro.slack.appToken="$SLACK_APP_TOKEN" \ --set-string 'agents.kiro.slack.allowedChannels[0]=C0123456789' ``` -------------------------------- ### Install OpenAB with Kiro CLI on Discord Source: https://context7.com/openabdev/openab/llms.txt Install OpenAB using the Helm chart, configuring it for the Kiro CLI on Discord with a bot token and allowed channels. ```bash # Install with Kiro CLI (default) on Discord helm install openab openab/openab \ --set agents.kiro.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=YOUR_CHANNEL_ID' ``` -------------------------------- ### Install `openab` with Direct Token Injection (Fallback) Source: https://github.com/openabdev/openab/blob/main/docs/github-token-setup.md As a fallback, you can pass the GitHub token directly during `helm install`. Note that this exposes the token in your shell history. ```bash helm install openab openab/openab \ --set env.GH_TOKEN="" ``` -------------------------------- ### OpenAB TOML Configuration Example Source: https://context7.com/openabdev/openab/llms.txt A comprehensive TOML configuration file example for OpenAB, demonstrating settings for Discord, Slack, a custom gateway, agent, session pool, reactions, markdown, speech-to-text, and cron jobs. Ensure required environment variables like DISCORD_BOT_TOKEN are set. ```toml # config.toml — full example with all major sections [discord] bot_token = "${DISCORD_BOT_TOKEN}" allowed_channels = ["1234567890123456789"] # empty list = all channels allowed_users = [] # empty list = all users allow_bot_messages = "mentions" # "off" | "mentions" | "all" allow_user_messages = "multibot-mentions" # "involved" | "mentions" | "multibot-mentions" allow_dm = false max_bot_turns = 100 allowed_role_ids = ["9876543210987654321"] message_processing_mode = "per-lane" # "per-message" | "per-thread" | "per-lane" max_buffered_messages = 10 max_batch_tokens = 24000 [slack] bot_token = "${SLACK_BOT_TOKEN}" # xoxb-... app_token = "${SLACK_APP_TOKEN}" # xapp-... allowed_channels = ["C0123456789"] allowed_users = ["U0123456789"] allow_bot_messages = "off" allow_user_messages = "involved" max_bot_turns = 100 [gateway] url = "ws://openab-gateway:8080/ws" platform = "telegram" # "telegram" | "line" | "feishu" | "googlechat" token = "${GATEWAY_WS_TOKEN}" bot_username = "my_bot" allowed_channels = [] allowed_users = [] [agent] command = "kiro-cli" args = ["acp", "--trust-all-tools"] working_dir = "/home/agent" env = {} inherit_env = ["API_BASE_URL", "MODEL_NAME"] [pool] max_sessions = 10 session_ttl_hours = 24 prompt_hard_timeout_secs = 1800 liveness_check_secs = 30 [reactions] enabled = true remove_after_reply = false tool_display = "full" # "full" | "compact" | "none" [reactions.emojis] queued = "👀" thinking = "🤔" tool = "🔥" coding = "👨‍💻" web = "⚡" done = "🆗" error = "😱" [reactions.timing] debounce_ms = 700 stall_soft_ms = 10000 stall_hard_ms = 30000 done_hold_ms = 1500 error_hold_ms = 2500 [markdown] tables = "code" # "code" | "bullets" | "off" [stt] enabled = true api_key = "${GROQ_API_KEY}" model = "whisper-large-v3-turbo" base_url = "https://api.groq.com/openai/v1" echo_transcript = true [cron] usercron_enabled = true usercron_path = "cronjob.toml" # relative to $HOME/.openab/ [[cron.jobs]] enabled = true schedule = "0 9 * * 1-5" # weekdays 09:00 channel = "1234567890123456789" message = "summarize yesterday's merged PRs" platform = "discord" sender_name = "DailyOps" timezone = "America/New_York" thread_id = "" [[cron.jobs]] schedule = "0 0 * * 0" # Sundays midnight channel = "1234567890123456789" message = "generate weekly status report" platform = "discord" timezone = "UTC" ``` -------------------------------- ### Install OpenAB with Kiro Agent using Helm Source: https://github.com/openabdev/openab/blob/main/docs/kiro.md Installs OpenAB using Helm, configuring the Kiro agent with a Discord bot token and allowed channel ID. ```bash helm repo add openab https://openabdev.github.io/openab helm repo update helm install openab openab/openab \ --set agents.kiro.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=YOUR_CHANNEL_ID' ``` -------------------------------- ### Helm Repository Installation Commands Source: https://github.com/openabdev/openab/blob/main/docs/helm-publishing.md Commands to add the OpenAB Helm repository and install the chart from GitHub Pages or OCI. ```bash helm repo add openab https://openabdev.github.io/openab && helm install openab openab/openab ``` ```bash helm install openab oci://ghcr.io/openabdev/charts/openab ``` -------------------------------- ### Example User Prompt for Discord Image Generation Skill Source: https://github.com/openabdev/openab/blob/main/docs/codex.md Example prompt to trigger the custom Discord image generation skill. ```text Use $discord-imagegen-deliver to generate a warm hand-painted sky with birds and send it back to this Discord thread. ``` -------------------------------- ### Recommended AI-Native Workflow Source: https://github.com/openabdev/openab/blob/main/DESIGN.md Demonstrates the recommended user interaction model where AI agents interpret documentation to generate commands for tasks like agent setup. ```text User: "Set up Claude Code as a second agent" → Agent reads docs/claude-code.md and docs/multi-agent.md → Agent generates the Helm command → User reviews and applies ``` -------------------------------- ### Install .deb Package without sudo Source: https://github.com/openabdev/openab/blob/main/docs/agent-installable-tools.md Use this pattern to extract and install binaries from .deb packages when sudo is not available. Ensure the binary is copied to ~/bin/ and made executable. ```bash mkdir -p ~/bin /tmp/deb-extract curl -fsSL -o /tmp/package.deb "" dpkg-deb -x /tmp/package.deb /tmp/deb-extract cp /tmp/deb-extract/usr/bin/ ~/bin/ chmod +x ~/bin/ rm -rf /tmp/package.deb /tmp/deb-extract ``` -------------------------------- ### Helm Install OpenAB Copilot Source: https://github.com/openabdev/openab/blob/main/docs/copilot.md Installs the OpenAB Copilot Helm chart with specified configurations for Discord integration, image, command, arguments, persistence, and environment variables. ```bash helm install openab-copilot openab/openab \ --set agents.kiro.enabled=false \ --set agents.copilot.discord.enabled=true \ --set agents.copilot.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.copilot.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.copilot.image=ghcr.io/openabdev/openab-copilot \ --set agents.copilot.command=copilot \ --set 'agents.copilot.args={--acp,--stdio}' \ --set agents.copilot.persistence.enabled=true \ --set agents.copilot.workingDir=/home/node \ --set 'agents.copilot.env.COPILOT_GITHUB_TOKEN=github_pat_YOUR_TOKEN_HERE' # optional, see Authentication ``` -------------------------------- ### Install `gh` CLI in Dockerfile Source: https://github.com/openabdev/openab/blob/main/docs/github-token-setup.md Add these commands to your agent's Dockerfile to install the `gh` CLI. This includes setting up the GitHub CLI apt repository. ```dockerfile RUN apt-get update && apt-get install -y curl gpg && \ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \ | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ apt-get update && apt-get install -y gh && \ rm -rf /var/lib/apt/lists/* ``` -------------------------------- ### Minimal config.toml Example for Cron Source: https://github.com/openabdev/openab/blob/main/docs/cronjob.md This TOML snippet shows the minimal configuration required for enabling and specifying the path for user-defined cronjobs. ```toml [discord] bot_token = "${DISCORD_BOT_TOKEN}" [agent] command = "kiro-cli" args = ["acp", "--trust-all-tools"] working_dir = "/home/agent" [cron] usercron_enabled = true usercron_path = "cronjob.toml" # → $HOME/.openab/cronjob.toml ``` -------------------------------- ### Example MCP Configuration for Cursor Agent Source: https://github.com/openabdev/openab/blob/main/docs/cursor.md An example JSON configuration for setting up MCP servers within the Cursor Agent CLI. This defines how to run specific tools like Playwright via MCP. ```json { "mcpServers": { "playwright": { "command": "/usr/bin/npx", "args": ["-y", "@playwright/mcp@latest"] } } } ``` -------------------------------- ### Install OpenAB with Claude Code Agent Source: https://context7.com/openabdev/openab/llms.txt Install OpenAB using the Helm chart, disabling the default Kiro agent and enabling the Claude Code agent with specific configurations for Discord integration and image. ```bash # Install with Claude Code (disable default Kiro agent) helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.claude.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.claude.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.claude.image=ghcr.io/openabdev/openab-claude:latest \ --set agents.claude.command=claude-agent-acp \ --set agents.claude.workingDir=/home/node ``` -------------------------------- ### Starting the OpenAB Docker Stack Source: https://github.com/openabdev/openab/blob/main/docs/msteams-selfhosted.md Commands to build and run the OpenAB services in detached mode, and to follow their logs. ```bash docker compose up -d docker compose logs -f gateway openab ``` -------------------------------- ### TOML Configuration for Adapters Source: https://github.com/openabdev/openab/blob/main/docs/adr/multi-platform-adapters.md Example TOML configuration for enabling and setting up multiple chat adapters (Discord, Telegram, Slack) and agent/pool settings. ```toml # Enable one or more adapters. Multiple can run simultaneously. [discord] bot_token = "${DISCORD_BOT_TOKEN}" allowed_channels = ["1234567890"] [telegram] bot_token = "${TELEGRAM_BOT_TOKEN}" mode = "personal" # "personal" or "team" (see #86) allowed_users = [] # empty = deny all (secure by default, per #91) [slack] bot_token = "${SLACK_BOT_TOKEN}" app_token = "${SLACK_APP_TOKEN}" # for Socket Mode allowed_channels = ["C1234567890"] # Agent and pool config remain unchanged [agent] command = "kiro-cli" args = ["acp", "--trust-all-tools"] working_dir = "/home/agent" [pool] max_sessions = 10 session_ttl_hours = 24 ``` -------------------------------- ### Helm Install OpenAB with OpenCode Agent Source: https://github.com/openabdev/openab/blob/main/docs/opencode.md Installs OpenAB using Helm, enabling the OpenCode agent and configuring its parameters. Ensure to set your Discord bot token and allowed channel ID. ```bash helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.opencode.enabled=true \ --set agents.opencode.command=opencode \ --set agents.opencode.args={acp} \ --set agents.opencode.image=ghcr.io/openabdev/openab-opencode:latest \ --set agents.opencode.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.opencode.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.opencode.workingDir=/home/node \ --set agents.opencode.pool.maxSessions=3 ``` -------------------------------- ### Full Tool Display Example Source: https://github.com/openabdev/openab/blob/main/docs/tool-display.md The 'full' mode shows each tool call with its complete title. It automatically collapses into a count summary if more than 3 tools are used. ```text ✅ `curl -s "https://ghcr.io/v2/openabdev/charts/openab/tags/list"` ✅ `grep -r "pattern" src/` 🔧 `npm install`... Agent response text here... ``` -------------------------------- ### Install OpenAB with Discord Bots via Helm Source: https://github.com/openabdev/openab/blob/main/docs/discord.md Use this Helm command to install OpenAB and configure Discord bots, specifying bot tokens, allowed channels, and enabling specific agents. ```bash helm install openab openab/openab \ --set agents.kiro.discord.botToken="$BOT_A_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=CHANNEL_ID' \ --set agents.dealer.discord.botToken="$BOT_B_TOKEN" \ --set-string 'agents.dealer.discord.allowedChannels[0]=CHANNEL_ID' \ --set agents.dealer.discord.enabled=true \ --set agents.dealer.command=kiro-cli \ --set 'agents.dealer.args={acp,--trust-all-tools}' ``` -------------------------------- ### Compact Tool Display Example Source: https://github.com/openabdev/openab/blob/main/docs/tool-display.md The 'compact' mode displays a single-line count summary without tool names, commands, or arguments. This is ideal for everyday use and public channels. ```text ✅ 3 · 🔧 1 tool(s) Agent response text here... ``` -------------------------------- ### Helm Install OpenAB with Cursor Agent Configuration Source: https://github.com/openabdev/openab/blob/main/docs/cursor.md Install OpenAB using Helm, configuring it to use the Cursor agent. This includes enabling the cursor agent, setting the Discord bot token, specifying allowed channels, and configuring image and persistence. ```bash helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.cursor.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.cursor.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.cursor.image=ghcr.io/openabdev/openab-cursor:latest \ --set agents.cursor.command=cursor-agent \ --set 'agents.cursor.args={acp}' \ --set agents.cursor.persistence.enabled=true \ --set agents.cursor.workingDir=/home/agent ``` -------------------------------- ### Example Runtime Interaction in Discord Source: https://context7.com/openabdev/openab/llms.txt Illustrates a typical multi-agent interaction flow in Discord, where one bot reviews a PR and then pings another bot to deploy it. ```text # Runtime interaction in Discord #dev channel: 👤 User: "Review this PR and deploy if it looks good" 🤖 Kiro: "LGTM — tests pass, no security issues. @DeployBot please deploy to staging." 🤖 Deploy: "Deploying to staging... ✅ Done." ``` -------------------------------- ### Deploy OAB with Helm Source: https://github.com/openabdev/openab/blob/main/docs/msteams-enterprise.md Installs the OpenAB application using Helm, enabling the Kiro agent to connect to the Gateway via WebSocket. The `gateway.url` should point to your deployed Gateway service. ```bash helm install openab oci://ghcr.io/openabdev/charts/openab \ --set agents.kiro.gateway.enabled=true \ --set agents.kiro.gateway.url="ws://openab-gateway:8080/ws" \ --set agents.kiro.gateway.platform="teams" ``` -------------------------------- ### Issue at a Glance Example Diagram Source: https://github.com/openabdev/openab/blob/main/docs/steering/triage.md An ASCII diagram illustrating a common issue flow where an agent's response is incorrectly formatted, leading to an SDK error. ```text Discord User ──► openab ──► Claude Code / Cursor agent │ ▼ session/request_permission (agent asks: "can I run this tool?") │ ▼ openab auto-reply (WRONG shape): ┌─────────────────────────────────┐ │ { "optionId": "allow_always" } │ ← flat, no wrapper └─────────────────────────────────┘ │ ▼ SDK cannot find `outcome` field → treats as REFUSAL ❌ ``` -------------------------------- ### Gateway Adapter Configuration Example Source: https://github.com/openabdev/openab/blob/main/docs/adr/custom-gateway.md Illustrates how to configure different platform adapters within the gateway. Adding a new platform involves implementing the adapter interface and adding a corresponding configuration block. ```yaml # gateway-config.yaml adapters: line: enabled: true path: /webhook/line credentials: channel_secret: ${LINE_CHANNEL_SECRET} channel_access_token: ${LINE_CHANNEL_ACCESS_TOKEN} telegram: enabled: true path: /webhook/telegram credentials: bot_token: ${TELEGRAM_BOT_TOKEN} github: enabled: true path: /webhook/github credentials: webhook_secret: ${GITHUB_WEBHOOK_SECRET} ``` -------------------------------- ### Configure Gateway with Service Account Key (File Path) Source: https://github.com/openabdev/openab/blob/main/docs/google-chat.md Run the gateway container, enabling Google Chat integration and mounting the service account JSON key file from the host. The gateway will read the key from the specified path. Ensure the WebSocket token and port mapping are set. ```bash docker run -d --name openab-gateway \ -e GOOGLE_CHAT_ENABLED=true \ -e GOOGLE_CHAT_SA_KEY_FILE="/secrets/service-account.json" \ -v /path/to/service-account.json:/secrets/service-account.json:ro \ -e GATEWAY_WS_TOKEN="your-ws-auth-token" \ -p 8080:8080 \ ghcr.io/openabdev/openab-gateway:latest ``` -------------------------------- ### Load Configuration Locally and Remotely Source: https://github.com/openabdev/openab/blob/main/docs/local-dev.md Demonstrates how to specify configuration files using local paths or remote URLs with the --config flag. The default behavior without a flag is to use config.toml. ```bash # Local file openab run --config config.toml openab run -c config.toml # Remote URL (http:// or https://) openab run --config https://example.com/config.toml openab run -c https://example.com/config.toml # Default (no flag → config.toml) openab run ``` -------------------------------- ### Decision Guide Logic Source: https://github.com/openabdev/openab/blob/main/docs/message-dispatch-modes.md This is a textual representation of a decision guide for selecting the appropriate message dispatch mode based on user and agent collaboration scenarios. ```text Is this a single-user bot (1 human per thread)? → per-message (default, simplest) Multiple humans in the same thread? ├─ Is it OK if the agent addresses everyone in one reply? │ → per-thread (cheapest) └─ Each person needs their own response? → per-lane (safest) Multi-agent collaboration (bot-to-bot)? → per-lane (each bot gets its own turn) ``` -------------------------------- ### Cron Expression Examples Source: https://github.com/openabdev/openab/blob/main/docs/cronjob.md Provides common examples of cron expressions and their meanings, such as scheduling for weekdays, Sundays, every 30 minutes, or the first day of the month. ```text 0 9 * * 1-5 0 0 * * 0 */30 * * * * 0 18 * * 1-5 0 9 1 * * ``` -------------------------------- ### Configure Gateway with Service Account Key (JSON String) Source: https://github.com/openabdev/openab/blob/main/docs/google-chat.md Run the gateway container, enabling Google Chat integration and providing the service account JSON key directly as an environment variable. Ensure the WebSocket token and port mapping are set. ```bash docker run -d --name openab-gateway \ -e GOOGLE_CHAT_ENABLED=true \ -e GOOGLE_CHAT_SA_KEY_JSON='{"type":"service_account","client_email":"...","private_key":"..."}' \ -e GATEWAY_WS_TOKEN="your-ws-auth-token" \ -p 8080:8080 \ ghcr.io/openabdev/openab-gateway:latest ``` -------------------------------- ### Cross-Agent Workflow Example with GBrain Source: https://github.com/openabdev/openab/blob/main/docs/refarch/gbrain.md Demonstrates a typical cross-agent workflow using GBrain commands. Agent A writes and links a task, and Agent B queries for assigned tasks and retrieves task details. ```bash gbrain put handoff/task-42 ← structured page gbrain link handoff/task-42 agent/B --type assigned_to ``` ```bash gbrain query "what tasks are assigned to me?" gbrain get handoff/task-42 ← full context ``` -------------------------------- ### Helm Install OpenAB with Codex Agent Source: https://github.com/openabdev/openab/blob/main/docs/codex.md Installs the OpenAB application using Helm, enabling and configuring the Codex agent for Discord. Replace placeholders with your specific values. ```bash helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.codex.discord.enabled=true \ --set agents.codex.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.codex.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.codex.image=ghcr.io/openabdev/openab-codex:latest \ --set agents.codex.command=codex-acp \ --set agents.codex.workingDir=/home/node ``` -------------------------------- ### Helm Install with Copilot Authentication Source: https://github.com/openabdev/openab/blob/main/docs/copilot.md Helm command to install OpenAB with Copilot agent enabled, including Discord bot token and Copilot GitHub token for authentication. ```bash helm install openab-copilot openab/openab \ --set agents.kiro.enabled=false \ --set agents.copilot.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.copilot.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.copilot.discord.enabled=true \ --set agents.copilot.image=ghcr.io/openabdev/openab-copilot \ --set agents.copilot.command=copilot \ --set 'agents.copilot.args={--acp,--stdio}' \ --set agents.copilot.persistence.enabled=true \ --set agents.copilot.workingDir=/home/node \ --set 'agents.copilot.env.COPILOT_GITHUB_TOKEN=github_pat_YOUR_TOKEN_HERE' # optional ``` -------------------------------- ### Configuration Example (config.toml) Source: https://github.com/openabdev/openab/blob/main/docs/message-dispatch-modes.md Configure the message processing mode and batching parameters in `config.toml`. The `message_processing_mode` can be set to `"per-message"`, `"per-thread"`, or `"per-lane"`. `max_buffered_messages` and `max_batch_tokens` are applicable to batched modes. ```toml [discord] message_processing_mode = "per-lane" # "per-message" | "per-thread" | "per-lane" max_buffered_messages = 10 # per-thread mpsc capacity (batched modes only) max_batch_tokens = 24000 # soft token cap per ACP turn (batched modes only) ``` -------------------------------- ### Install Kiro and Claude Agents Source: https://github.com/openabdev/openab/blob/main/docs/multi-agent.md Use this command to install two agents, Kiro and Claude, in a single Helm release. Ensure you have the necessary bot tokens and channel IDs. ```bash helm install openab openab/openab \ --set agents.kiro.discord.botToken="$KIRO_BOT_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=KIRO_CHANNEL_ID' \ --set agents.claude.discord.botToken="$CLAUDE_BOT_TOKEN" \ --set-string 'agents.claude.discord.allowedChannels[0]=CLAUDE_CHANNEL_ID' \ --set agents.claude.image=ghcr.io/openabdev/openab-claude:latest \ --set agents.claude.command=claude-agent-acp \ --set agents.claude.workingDir=/home/node ``` -------------------------------- ### Helm Install with Gemini Agent Source: https://github.com/openabdev/openab/blob/main/docs/gemini.md Installs the OpenAB application using Helm, enabling and configuring the Gemini agent for Discord. Ensure the DISCORD_BOT_TOKEN and YOUR_CHANNEL_ID environment variables are set. ```bash helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.gemini.discord.enabled=true \ --set agents.gemini.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.gemini.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.gemini.image=ghcr.io/openabdev/openab-gemini:latest \ --set agents.gemini.command=gemini \ --set agents.gemini.args='{--acp}' \ --set agents.gemini.workingDir=/home/node ``` -------------------------------- ### Build and Run Gateway Source: https://github.com/openabdev/openab/blob/main/gateway/README.md Build the gateway in release mode and run it. Ensure the Telegram bot token is exported as an environment variable. ```bash cargo build --release export TELEGRAM_BOT_TOKEN="your-bot-token" ./target/release/openab-gateway ``` -------------------------------- ### Local Development Gateway Configuration Source: https://github.com/openabdev/openab/blob/main/docs/google-chat.md Set environment variables for Google Chat integration and service account key file path for local development. Then, run the OpenAB gateway in release mode. ```bash export GOOGLE_CHAT_ENABLED=true export GOOGLE_CHAT_SA_KEY_FILE="/path/to/service-account.json" cargo run --release ``` -------------------------------- ### Install OpenSSH on Agent Pod Source: https://github.com/openabdev/openab/blob/main/docs/refarch/remote-ssh-debugging.md Installs OpenSSH client on an agent pod by extracting the Debian package. Ensure you replace "" with the actual URL. ```bash mkdir -p ~/bin /tmp/ssh-extract curl -fsSL -o /tmp/openssh-client.deb "" dpkg-deb -x /tmp/openssh-client.deb /tmp/ssh-extract cp /tmp/ssh-extract/usr/bin/{ssh,ssh-keygen,scp} ~/bin/ chmod +x ~/bin/{ssh,ssh-keygen,scp} export PATH="$HOME/bin:$PATH" ``` -------------------------------- ### Discord Mention Examples Source: https://github.com/openabdev/openab/blob/main/docs/discord.md Examples demonstrating how different types of mentions are handled. Direct user mentions and role mentions (if configured) trigger the bot, while unconfigured role mentions are ignored. ```text ✅ @AgentBroker hello ← user mention, bot responds ✅ @AllBots hello ← role mention, bot responds (if role in allowed_role_ids) ❌ @SomeOtherRole hello ← role not in allowed_role_ids, bot ignores ``` -------------------------------- ### Configure Cursor Agent Source: https://github.com/openabdev/openab/blob/main/docs/config-reference.md Set up the Cursor agent, including its command, arguments for model and workspace, and working directory. ```toml [agent] command = "cursor-agent" args = ["acp", "--model", "auto", "--workspace", "/home/agent"] working_dir = "/home/agent" ``` -------------------------------- ### Helm Install Claude Agent Source: https://github.com/openabdev/openab/blob/main/docs/claude-code.md Installs the OpenAB application with the Claude agent enabled. Ensure to set the Discord bot token and allowed channel ID. The Claude agent image and command are specified. ```bash helm install openab openab/openab \ --set agents.kiro.enabled=false \ --set agents.claude.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.claude.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.claude.image=ghcr.io/openabdev/openab-claude:latest \ --set agents.claude.command=claude-agent-acp \ --set agents.claude.workingDir=/home/node ``` -------------------------------- ### OpenAB Configuration Reference Source: https://github.com/openabdev/openab/blob/main/README.md Example TOML configuration for OpenAB, showing settings for Discord, Slack, agent behavior, connection pooling, and reaction handling. Supports environment variable expansion for sensitive values. ```toml [discord] bot_token = "${DISCORD_BOT_TOKEN}" # supports env var expansion allowed_channels = ["123456789"] # channel ID allowlist # allowed_users = ["987654321"] # user ID allowlist (empty = all users) [slack] bot_token = "${SLACK_BOT_TOKEN}" # Bot User OAuth Token (xoxb-...) app_token = "${SLACK_APP_TOKEN}" # App-Level Token (xapp-...) for Socket Mode allowed_channels = ["C0123456789"] # channel ID allowlist (empty = allow all) # allowed_users = ["U0123456789"] # user ID allowlist (empty = allow all) [agent] command = "kiro-cli" # CLI command args = ["acp", "--trust-all-tools"] # ACP mode args working_dir = "/tmp" # agent working directory env = {} # extra env vars passed to the agent [pool] max_sessions = 10 # max concurrent sessions session_ttl_hours = 24 # idle session TTL [reactions] enabled = true # enable emoji status reactions remove_after_reply = false # remove reactions after reply ``` -------------------------------- ### Example Feature Request: Discord Session Timeout Override Source: https://github.com/openabdev/openab/blob/main/docs/steering/feature-request.md This is an example of a feature request for the openabdev/openab project, demonstrating the required format for title, labels, description, and use case. It specifically addresses per-channel session timeout configuration for Discord. ```markdown Title: feat(discord): support per-channel session timeout override Labels: feature, discord ### Description Allow server admins to configure different session timeout values per Discord channel, overriding the global default. ### Use Case In large servers, some channels are used for quick Q&A (short timeout preferred) while others host long-running collaborative sessions (longer timeout needed). Currently the global timeout applies everywhere, forcing admins to pick a compromise value. ``` -------------------------------- ### Install OpenAB with Specific Discord Settings via Helm Source: https://github.com/openabdev/openab/blob/main/docs/discord.md Install or update OpenAB using Helm, specifying detailed Discord configurations such as bot token, allowed channels, bot message policies, user message policies, and role IDs. ```bash helm install openab openab/openab \ --set agents.kiro.discord.botToken="$DISCORD_BOT_TOKEN" \ --set-string 'agents.kiro.discord.allowedChannels[0]=YOUR_CHANNEL_ID' \ --set agents.kiro.discord.allowBotMessages=off \ --set agents.kiro.discord.allowUserMessages=involved \ --set-string 'agents.kiro.discord.allowedRoleIds[0]=YOUR_ROLE_ID' ``` -------------------------------- ### First-time Kiro Authentication Source: https://context7.com/openabdev/openab/llms.txt Perform the initial authentication for the Kiro agent using a device flow and then restart the deployment to apply changes. ```bash # First-time Kiro authentication (device flow) kubectl exec -it deployment/openab-kiro -- kiro-cli login --use-device-flow kubectl rollout restart deployment/openab-kiro ``` -------------------------------- ### Get OpenAB Release Name Source: https://github.com/openabdev/openab/blob/main/docs/ai-install-upgrade.md Find the Helm release name for the OpenAB deployment. ```bash helm list | grep openab ``` -------------------------------- ### Build and Push Docker Image Source: https://github.com/openabdev/openab/blob/main/docs/local-dev.md Commands to build a Docker image for OpenAB, tag it, and push it to a container registry. ```bash docker build -t openab:latest . docker tag openab:latest /openab:latest docker push /openab:latest ``` -------------------------------- ### Inspect CronJob Logs Source: https://github.com/openabdev/openab/blob/main/docs/refarch/cronjob_k8s_refarch.md Commands to get the latest job name and stream its logs in real-time. ```bash LATEST_JOB=$(kubectl -n default get jobs \ --sort-by=.metadata.creationTimestamp \ -o jsonpath='{.items[-1:].metadata.name}') kubectl -n default logs -f job/"$LATEST_JOB" ``` -------------------------------- ### Directive Format Example Source: https://github.com/openabdev/openab/blob/main/docs/output-directives.md Demonstrates the format of directive header blocks and how actual message content follows. Directives are stripped before sending. ```plaintext [[reply_to:1502606076451885136]] [[ephemeral:true]] ← future Actual message content starts here... ```