Introducing Custom Signal Providers for Mastra Agents
Your agents can now react to real-time events using a custom signal provider. Connect to any external source — GitHub, Slack, CI pipelines, or your own APIs and databases — and wake idle agents so they can take action.
Third-party systems emit events in different ways. With a custom signal provider you can build a notification system suitable for the source. Listen for events, poll for updates, or handle webhook requests to capture event payloads.
Before custom signal providers, integrating with external event systems meant manually managing incoming events and thread subscriptions. With a custom signal provider, Mastra tracks the subscriptions and sends matched events as notification signals to subscribed agent threads.
A custom signal provider could expose .start() and .stop() for setup and teardown, .poll() or .handleWebhook() for ingestion, and .watch() and .unwatch() for subscription management.