Skip to main content
Route any third-party HTTP webhook (GitHub, Stripe, CI, alerting) to an agent through configuration alone.

Quick Start

1

YAML gateway channel (recommended, no code)

Declare a webhook channel in gateway.yaml. The gateway recognises webhook as a built-in channel type.
2

Python (single bot)


How It Works

Every POST is verified, filtered, templated, then dispatched to the agent through the durable session manager.

User interaction flow

A developer wires the route once; the external service does the rest.

Configuration Reference

WebhookBot serves one HTTP path and dispatches matching events to its bound agent. WebhookRoute decides which events fire and how the prompt is built. The YAML verify.hmac block is parsed by _build_verifier_from_config.

Filter DSL

A filter is a small predicate tree that round-trips through YAML. Every node is either a combinator or a leaf. A leaf tests one field: {"field": "<dotted.path>", "<op>": <value>}. Field paths are dotted — payload.issue.number, headers.X-GitHub-Event, query.debug. Header lookup is case-insensitive.
Fail-safe by design. Missing paths resolve to None; unknown nodes, invalid regex, and type mismatches evaluate to False and never raise. A None or {} filter matches every event, so a route with no when is unconditional.

Which operator?


Routing and prompts

First-match wins. Routes are evaluated in list order; the first whose filter matches is used. A filter that raises is skipped (fail-safe) so a bad route can’t kill ingress. Prompt templating. {{ dotted.path }} placeholders resolve against {payload, headers, query}. Missing paths render as empty strings. When prompt is omitted, the raw JSON payload becomes the agent’s prompt. Silent routes. silent: true acknowledges with HTTP 200 without running the agent — useful for dropping noisy events at the edge. Delivery IDs. The bot derives a stable message_id for the ingress journal, in priority order:
  1. X-GitHub-Delivery header, or
  2. X-Request-Id header, or
  3. X-Delivery-Id header, or
  4. Stripe-Signature header, otherwise
  5. deterministic webhook-<sha256(path + "\0" + raw_body)> fallback, so redeliveries collapse to one journaled run even for generic senders.

Response contract


Common Patterns

GitHub issue triage

Verify the signature, match the event header and body, then template the prompt.

Stripe payment fan-in

Match several event types with one in leaf.

Silent-drop noisy events

Put a silent: true route before a broad catch-all to drop noise at the edge.

Best Practices

Signature verification is opt-in — a webhook channel with no verify block accepts unsigned traffic. Set verify.hmac.secret from an env var before exposing the endpoint.
First-match wins, so a specific route placed after a catch-all never runs. Order routes from most to least specific.
silent: true acknowledges without running the agent, keeping the ingress journal clean for events you never want to act on.
For anything shared across an environment, declare the channel in gateway.yaml rather than constructing WebhookBot(...) in code — config is easier to review and redeploy.

Webhook Verification

The HMAC signature primitive this channel reuses

Bot Platform Plugins

The registry seam that webhook slots into

Channels Gateway

The gateway that hosts channel adapters

Inbound Journal

Dedup and retry behaviour that message_id feeds