agent-notify
A notification CLI for AI agents and automation scripts.
agent-notify provides the notify command for sending messages and generated files through configured notification channels.
Supported Channels
file-logtelegramdiscord-webhookdiscord-botntfywebhook
The CLI can load, check, and send through the channel types above. External channel types require their configured service credentials or environment variables.
Installation
Build from this repository:
The binary is written to:
target/release/notify
After the first published release, install with:
or download a prebuilt notify binary from the releases page.
Quick Start
Create notify.toml:
= "local"
[]
= "file-log"
= "./notify-log"
Send a notification:
This writes a local JSONL log under ./notify-log.
Concepts
A channel is the configured destination name that users and agents select, such as personal, team, phone, local, or automation.
A channel has a type, which controls how the notification is delivered:
telegram
discord-webhook
discord-bot
ntfy
webhook
file-log
Agents should use channel names and should not need to know service credentials or provider-specific API details.
Configuration
notify looks for configuration in this order:
--config <path>./notify.toml~/.config/agent-notify/config.toml
Example:
= "personal"
[]
= "telegram"
= "NOTIFY_TELEGRAM_BOT_TOKEN"
= "NOTIFY_TELEGRAM_CHAT_ID"
= "plain"
[]
= "discord-webhook"
= "NOTIFY_DISCORD_WEBHOOK_URL"
= "Agent Notify"
= false
[]
= "discord-bot"
= "NOTIFY_DISCORD_BOT_TOKEN"
= "NOTIFY_DISCORD_CHANNEL_ID"
= false
[]
= "ntfy"
= "https://ntfy.sh"
= "NOTIFY_NTFY_TOPIC"
= "NOTIFY_NTFY_TOKEN"
[]
= "webhook"
= "NOTIFY_WEBHOOK_URL"
= "NOTIFY_WEBHOOK_AUTH_HEADER"
[]
= "file-log"
= "./notify-log"
Sample files are included under:
examples/notify.toml
examples/notify.env.example
Secrets
Secret-like values can be configured inline or through environment variables.
Recommended:
[]
= "discord-webhook"
= "NOTIFY_DISCORD_WEBHOOK_URL"
Quick setup:
[]
= "discord-webhook"
= "https://discord.com/api/webhooks/..."
Environment variables are recommended for shared repositories, CI, and agent workflows.
Secrets are not accepted as CLI arguments.
Invalid:
Also invalid:
= "https://discord.com/api/webhooks/..."
= "NOTIFY_DISCORD_WEBHOOK_URL"
Use either the inline field or the _env field, not both.
Commands
notify send
Send a notification.
Use the default channel:
Attach a file:
Read body from a file:
Dry run:
Common options:
--channel <name> Channel name. Uses default_channel if omitted.
--title <text> Notification title.
--body <text> Notification body.
--body-file <path> Read body from a file.
--file <path> Attach a file. Can be used multiple times.
--priority <level> info | success | warning | error | critical
--format <format> text | markdown
--tag <tag> Add a tag. Can be used multiple times.
--dry-run Resolve and display the notification without sending it.
--json Emit JSON output.
--config <path> Use a specific config file.
notify channels
List configured channels.
Example:
personal telegram ready
team discord-webhook ready
phone ntfy ready
local file-log ready
automation webhook ready
notify check
Validate configuration.
Check one channel:
notify test
Send a test notification.
Channel Configuration
file-log
Stores notifications in a local JSONL file and copies attachments under a child directory.
[]
= "file-log"
= "./notify-log"
Use this for local testing or CI verification.
telegram
[]
= "telegram"
= "NOTIFY_TELEGRAM_BOT_TOKEN"
= "NOTIFY_TELEGRAM_CHAT_ID"
= "plain"
Inline:
[]
= "telegram"
= "123456:ABC..."
= "123456789"
= "plain"
Supported parse_mode values:
plain
html
markdown-v2
discord-webhook
[]
= "discord-webhook"
= "NOTIFY_DISCORD_WEBHOOK_URL"
= "Agent Notify"
= false
Inline:
[]
= "discord-webhook"
= "https://discord.com/api/webhooks/..."
discord-bot
[]
= "discord-bot"
= "NOTIFY_DISCORD_BOT_TOKEN"
= "NOTIFY_DISCORD_CHANNEL_ID"
= false
Inline:
[]
= "discord-bot"
= "..."
= "123456789012345678"
= false
ntfy
[]
= "ntfy"
= "https://ntfy.sh"
= "NOTIFY_NTFY_TOPIC"
= "NOTIFY_NTFY_TOKEN"
Inline:
[]
= "ntfy"
= "https://ntfy.sh"
= "my-topic"
= "..."
token is optional, depending on your ntfy server and topic configuration.
webhook
[]
= "webhook"
= "NOTIFY_WEBHOOK_URL"
= "NOTIFY_WEBHOOK_AUTH_HEADER"
= 15
Inline:
[]
= "webhook"
= "https://example.com/notify"
= "Bearer secret"
= 15
The webhook channel uses the project-defined webhook protocol. The v1 payload format is defined in SPEC.md.
Webhook Protocol v1
The webhook channel sends the agent-notify webhook protocol v1 payload.
Without attachments, the request is application/json. With attachments, the request is multipart/form-data with a payload JSON part and file parts named file0, file1, and so on.
The full protocol is documented in:
docs/webhook-v1.md
Examples
Local test
= "local"
[]
= "file-log"
= "./notify-log"
Discord webhook
= "team"
[]
= "discord-webhook"
= "NOTIFY_DISCORD_WEBHOOK_URL"
Telegram
= "personal"
[]
= "telegram"
= "NOTIFY_TELEGRAM_BOT_TOKEN"
= "NOTIFY_TELEGRAM_CHAT_ID"
ntfy
= "phone"
[]
= "ntfy"
= "https://ntfy.sh"
= "NOTIFY_NTFY_TOPIC"
Webhook
= "automation"
[]
= "webhook"
= "NOTIFY_WEBHOOK_URL"
= "NOTIFY_WEBHOOK_AUTH_HEADER"
Agent Skill
This repository includes an Agent Skill under:
skills/notification/
Use it when installing agent-notify into an AI agent environment.