Skip to main content
Webhook and hook payloads are fenced as untrusted data before the agent sees them β€” the model treats the payload-derived portion as facts, never as instructions.

Quick Start

1

Default β€” fencing is automatic

Enable a webhook or hook as usual. Payload fencing needs no configuration β€” every interpolated payload value is wrapped before the agent runs.
2

See what the agent receives

Operator text stays outside the fence; the payload value lands inside <external_request_payload> tags, preceded once by an inline notice.

How It Works

Each payload value is fenced at ingress, then an inline notice is prepended once so the untrusted-data semantics travel with the message.

What the Agent Sees

An attacker cannot break out of the fence β€” a smuggled closer inside a payload field is delimiter-escaped, so only the fence’s own closer survives. Template:
Payload:
Rendered for the agent:
The smuggled </external_request_payload> is escaped to &lt;/external_request_payload&gt;, so the real closer is still the fence’s own single tag.

Configuration Options

This is a labelling defence β€” the only knob is deliver_only. The exact markers, notice, and escaping:

Best Practices

Static template text sits outside {{ ... }} β€” it is trusted and stays outside the fence. Only interpolated payload fields are the untrusted part that gets wrapped.
Removing <external_request_payload> tags from an agent’s input reopens the injection channel. Leave them in place.
deliver_only: true sends the rendered message straight to a channel with no agent turn β€” recipients of a chat message never want to see literal fence tags, so no fence is added.
The inline notice travels with each fenced message, so the untrusted-data semantics survive even when the system-prompt trust clause is absent.

Prompt Injection Protection

The outbound counterpart β€” tool results wrapped in <external_tool_result>

Webhook Channel

Route any HTTP webhook to an agent through YAML config

Gateway Hooks

Trigger agents from external services via authenticated POST

Gateway Inbound Hooks

Trigger agent runs from external HTTP events