post_to_capability
Route an FYI or coordination message to the current owner of a capability by exact-match tag, removing the need to know the recipient. Recipients read it via the capability message lane.
Instructions
Route an FYI/coordination message to the current owner(s) of a capability (v2.10 — capability routing, principle #1).
When to use: surface a finding, status, or cross-cutting update to whoever owns a domain WITHOUT knowing their name — e.g. an ad-hoc agent tags a 'relationships' finding and the agent that owns that capability picks it up on its next get_messages. FYI/COORDINATION LANE ONLY: action-required completions (a STAGED build needing an audit, a SHIP that triggers a merge) MUST stay point-to-point completion reports via send_message — that point-to-point reliability is what triggers the orchestrator's next action. A capability-routed message never triggers an action.
Behavior: exact-string matches capability against every registered agent's declared capabilities (same lookup as post_task_auto), then fans the message out — one messages row per owner, stamped with routed_capability so recipients + dashboards distinguish the FYI lane from point-to-point mail. Recipients drain via the normal get_messages (use lane='capability' to read only the FYI lane, lane='direct' for only point-to-point). The sender is excluded by default (exclude_self). No current owner → routed_to:[] and nothing stored (fire-and-forget to current owners, NOT queued-until-owner). Fires one message.capability_routed webhook for the batch. Content encrypted at rest if RELAY_ENCRYPTION_KEY is set; same payload cap as send_message.
Returns: { success: true, capability, routed_to: string[], message_ids: string[], count, note }. routed_to is empty (with an explanatory note) when no agent currently owns the capability.
Errors: AUTH_FAILED, SENDER_NOT_REGISTERED, PAYLOAD_TOO_LARGE, RATE_LIMITED, VALIDATION.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Sender agent name | |
| content | Yes | FYI/coordination content (max 64KB by default; see RELAY_MAX_PAYLOAD_BYTES) | |
| priority | No | Message priority | normal |
| capability | Yes | The single domain/capability tag to route on (exact-match against registered agent capabilities) | |
| agent_token | No | Your agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. | |
| exclude_self | No | When true (default), the sender is excluded from recipients even if it owns the capability. |