Your Mastra Agent Now Has an Inbox With Priority Notifications

Connect external sources like GitHub and Slack and trigger them to wake up your agent.

Paul ScanlonPaul Scanlon·

Jun 24, 2026

·

3 min read

You can connect external sources like GitHub, Slack, Sentry, Datadog, and have your agent act on emitted events using Mastra’s signal system. These events are durable and they have priority.

Agent notification inboxes and priority signals let you build more attentive agents. An AI SRE agent could wake up and try to auto-remediate a 5XX error from Datadog. A personal assistant agent could text you when it receives urgent email in your inbox.

This is not an email inbox though stay tuned.

Before this, you could inject context into an agent's memory thread using sendSignal(), but there wasn't a standard shape for durable records, priority-aware delivery, or a tool agents could use to read notifications and action high priority items.

With notification signals, each event becomes a durable record in the notifications storage domain, keyed by threadId — they contain a source, kind, priority, summary, and any structured payload you want to include.

The createNotificationInboxTool() gives the agent direct access to every record. The delivery policy decides how each is handled — urgent wakes the agent so it can act autonomously, lower priorities stay in the inbox until the agent is asked to read them, and all are persisted in storage and queryable.

Get started

There are three parts to notification signals:

  1. Send events to the agent with .sendNotificationSignal().
  2. Give an agent the createNotificationInboxTool().
  3. Configure the delivery policy to handle event priority.
note
Requires @mastra/core@1.39.0 or later, added in PR #17241.

sendNotificationSignal()

Call sendNotificationSignal() from the server endpoint configured to receive events from external systems.

import { mastra } from "./src/mastra/index";
 
const agent = mastra.getAgent("sreAgent");
 
await agent.sendNotificationSignal(
  {
    source: "datadog",
    kind: "incident",
    priority: "urgent",
    summary: "API returning 503 on /checkout",
    payload: { service: "checkout-api", region: "us-east-1" }
  },
  { resourceId: "sre-agent", threadId: "demo-thread" }
);

createNotificationInboxTool() and deliveryPolicy

TypeScriptsrc/mastra/agents/sre-agent.ts
import { Agent } from "@mastra/core/agent";
import { LibSQLStore } from "@mastra/libsql";
import { createNotificationInboxTool } from "@mastra/core/notifications";
 
const storage = new LibSQLStore({ id: "sre-storage", url: "file:./mastra.db" });
const notificationsStorage = await storage.getStore("notifications");
 
export const sreAgent = new Agent({
  // ...
  tools: {
    notificationInbox: createNotificationInboxTool({ storage: notificationsStorage! })
  },
  notifications: {
    deliveryPolicy: {
      priorities: {
        low: { action: "discard" },
        medium: { action: "defer" },
        high: { action: "summarize" },
        urgent: { action: "deliver" }
      }
    }
  }
});

Priority behavior is fully configurable. See the Agent constructor reference for the full list of actions: deliver, defer, summarize, persist, discard and notifications.deliveryPolicy options.

For more information and full configuration options, see:

Share:
Paul Scanlon
Paul ScanlonTechnical Product Marketing Manager

Paul Scanlon sits between Developer Education and Product Marketing at Mastra. Previously, he was a Technical Product Marketing Manager at Neon and worked in Developer Relations at Gatsby, where he created educational content and developer experiences.

All articles by Paul Scanlon