🦞
Resources

openclaw_binding

Manages agent routing rules for OpenClaw.

Manages an individual binding entry in bindings[]. Bindings route incoming messages from specific channels or peers to specific agents. This enables multi-agent setups where different channels talk to different agents.

Example Usage

Route Discord to a specific agent

resource "openclaw_binding" "discord_research" {
  agent_id      = "research"
  match_channel = "discord"
}

Route a specific Telegram user to an agent

resource "openclaw_binding" "telegram_vip" {
  agent_id         = "coding"
  match_channel    = "telegram"
  match_account_id = "tg:123456789"
}

Route DMs vs groups differently

resource "openclaw_binding" "whatsapp_dm" {
  agent_id        = "personal"
  match_channel   = "whatsapp"
  match_peer_kind = "dm"
}

resource "openclaw_binding" "whatsapp_group" {
  agent_id        = "team"
  match_channel   = "whatsapp"
  match_peer_kind = "group"
}

Argument Reference

ArgumentTypeRequiredDescription
agent_idStringYesAgent ID this binding routes to.
match_channelStringYesChannel to match (e.g. discord, telegram, whatsapp).
match_account_idStringNoAccount ID to match.
match_peer_kindStringNoPeer kind: dm or group.
match_peer_idStringNoSpecific peer ID to match.

Attribute Reference

AttributeTypeDescription
idStringComposite key: agentId/channel or agentId/channel/accountId.

Import

terraform import openclaw_binding.discord_research "research/discord"
terraform import openclaw_binding.telegram_vip "coding/telegram/tg:123456789"

On this page