By Paul Scanlon

Introducing Webhook Signals for Mastra Agents

You can now connect your agents to events from external systems using a WebhookSignalProvider. Each event arrives as a notification signal, injected into the agent’s thread without restarting the conversation or invalidating the prompt cache.

WebhookSignalProvider is part of the broader Signal providers system.

Before webhook providers, notifications could be sent to running agents using .sendNotificationSignal() but additional wiring was required to ensure payloads were sent to the right thread.

Now you can forward a payload using handleWebhook(), which matches an event with a subscription to deliver a notification to the right thread.

To the agent, an incoming webhook payload becomes another signal in the thread. A single conversation can hold user input alongside events from multiple external sources.

Hey!

Leave a reaction and let me know how I'm doing.

  • 0
  • 0
  • 0
  • 0
  • 0
Powered byNeon
Close