Claude Code notifier
This page explains how to create and configure a Claude Code notifier.
Use a Claude Code notifier to send monitor alerts to a Claude Code routine.
To create a Claude Code notifier, follow these steps:
- Create a Claude Code routine with an API trigger. For more information, see the Claude Code documentation.
- In the routine prompt, tell Claude Code to investigate the alert in the
routine-fire-payloadblock. - In Axiom, click Notifiers in the sidebar.
- Click New notifier.
- Name your notifier.
- Click Claude Code.
- In Routine ID, enter the ID between
/routines/and/firein the routine’s fire URL. - In Claude Code bearer token, enter the token of the API trigger.
- Click Create.
Alert content
When a monitor alerts, Axiom sends the agent one text message that contains the following:
- The name and type of the monitor, and whether the alert opened or closed.
- A link to the monitor in Axiom.
- The APL or MPL query of the monitor, and a link that opens the query in Axiom over the time range of the alert.
- The value that gave rise to the alert, the time range of the query, and the time of the notification.
- The description and the labels of the monitor.
- For match monitors and new values monitors, the matching event or the row of the query results that holds the new value.
- The group keys and values if the query of the monitor groups by a non-time field.
Write the instructions of the agent to start from this message. For example, tell the agent to run the query, compare the time range of the alert with the hour before it, and then look for the cause in your code.
To let the agent query Axiom during the investigation, connect the agent to the Axiom MCP server.
Axiom truncates messages longer than 65,000 characters. The query and the links come before the event data, so a truncated message still contains them.