Skip to content

Channel

The Channel primitive abstracts communication surfaces — how humans (or other systems) reach the agent. CKP supports messaging platforms and event-driven ingress types (cron, queue, IMAP, and DB triggers) with four access control modes.

URI pattern: claw://local/channel/{name}


claw: "0.3.0"
kind: Channel
metadata:
name: "team-slack"
version: "1.0.0"
spec:
type: "slack" # "telegram" | "discord" | "whatsapp" | "slack"
# | "email" | "webhook" | "cli" | "voice" | "web"
# | "lark" | "matrix" | "line" | "wechat" | "qq"
# | "dingtalk" | "cron" | "queue" | "imap"
# | "db-trigger" | "custom"
transport: "websocket" # "polling" | "webhook" | "websocket" | "stdio"
auth:
secret_ref: "SLACK_BOT_TOKEN"
access_control:
mode: "allowlist" # "open" | "allowlist" | "pairing" | "role-based"
allowed_ids:
- "U01ABC123"
- "U02DEF456"
processing:
max_message_length: 4096
rate_limit:
messages_per_minute: 30
burst: 5
typing_indicator: true
read_receipts: true
features:
voice: false
files: true
reactions: true
threads: true
inline_images: true
trigger:
schedule: "0 */6 * * *" # REQUIRED for type "cron"
queue_name: "agent.events" # REQUIRED for type "queue"
mailbox: "INBOX" # REQUIRED for type "imap"
table: "orders" # REQUIRED for type "db-trigger"
events: ["INSERT", "UPDATE"] # OPTIONAL for type "db-trigger"
max_parallel: 2 # OPTIONAL; default 1
overlap_policy: "queue" # OPTIONAL; "skip" | "queue" | "allow"

FieldRequiredDescription
typeYesChannel type. One of 16+ supported platform types.
transportYesTransport mechanism: polling, webhook, websocket, or stdio.
authYesAuthentication for the channel platform.
access_controlNoWho can interact with the agent via this channel.
processingNoMessage processing settings (length limits, rate limits, indicators).
featuresNoChannel-specific capability flags.
triggerNoEvent-driven trigger settings for cron, queue, imap, and db-trigger.

ModeDescriptionRequired Field
openAny user on the platform can interact.
allowlistOnly pre-approved user IDs can interact.allowed_ids
pairingUnknown users receive an approval code; admin approves.pairing
role-basedUsers are assigned roles with different permissions.roles

For allowlist mode, allowed_ids is REQUIRED and roles MUST NOT be present. For role-based mode, roles is REQUIRED and allowed_ids MUST NOT be present. For pairing mode, the pairing block is REQUIRED. Using the wrong field for a mode is a validation error.


FieldRequiredDescription
scheduleREQUIRED for type: cronCron expression for periodic execution.
queue_nameREQUIRED for type: queueQueue/topic name to consume from.
mailboxREQUIRED for type: imapIMAP mailbox name to watch.
tableREQUIRED for type: db-triggerDatabase table to watch.
eventsOPTIONAL for type: db-triggerEvent filters: INSERT, UPDATE, DELETE.
max_parallelOptionalMax concurrent trigger runs for this channel (default: 1).
overlap_policyOptionalWhen saturated: skip, queue, or allow (default: skip).
RolePermissions
adminFull access: execute all tools/skills, approve actions, modify agent config via channel
userStandard access: interact with agent, invoke skills, trigger tools (subject to Policy)
viewerRead-only: can see agent responses but cannot trigger tools or skills

  • The type, transport, and auth fields are REQUIRED.
  • For event-driven channel types (cron, queue, imap, db-trigger), trigger SHOULD be provided.
  • If trigger.max_parallel is omitted, runtimes default to 1; if trigger.overlap_policy is omitted, runtimes default to skip.
  • Access control field requirements are mode-specific (see table above). Mixing fields across modes is a validation error.
  • When no Channel is declared in the manifest, the runtime SHOULD expose a default stdio-based CLI channel restricted to the local process owner.

The Channel primitive unifies synchronous messaging channels and event-driven ingress under one schema. Instead of splitting chat adapters from scheduler/webhook connectors, CKP keeps a single declarative surface for all communication entry points.