Webhooks & Event Destinations
Push agent events to external systems automatically. The webhook system listens to the agent’sEventBus and forwards events to configured destinations with retry and batching.
Quick Start
Destinations
HTTP
{ event, payload, timestamp }. With a secret, the X-Webhook-Signature header contains sha256=<hex>.
Slack
Email (SendGrid)
Custom Destination
Build your own destination by implementing theWebhookDestination interface:
Configuration
Supported Events
All events from theAgentEventMap are supported, including:
run.start, run.complete, run.error, tool.call, tool.result, team.delegate, handoff.transfer, handoff.complete, cost.tracked, cache.hit, cache.miss, memory.stored, skill.loaded, and more.
Event Filtering
Only forward specific events to specific destinations:events to forward everything.
Batching
For high-throughput agents, batch events before sending to reduce HTTP calls:batchInterval elapses or when 100 events accumulate (whichever comes first).
HMAC Signature Verification
When usinghttpWebhook with a secret, every request includes a X-Webhook-Signature header. Verify it on your server: