OperationsWorks with any LLM
On-call notifier
Pages the on-call human by SMS, escalates to a call when there's no acknowledgement, and logs who responded.
- SMS
- Voice
- Audit
What you need
- 1An Anima API key — start free at console.useanima.sh
- 2Your own LLM — Claude, GPT-4o, or Gemini (Anima is the identity layer; you bring the brain)
- 3Capabilities enabled on the identity: sms, voice, email
System prompt
Paste this into your agent
The full prompt that drives the recipe. Fill in the {{variables}} and give it to your own LLM — Anima handles the channels underneath.
You are an on-call notification agent for {{TEAM}}. You have your own Anima identity — the number {{PHONE_NUMBER}} and the inbox {{INBOX_EMAIL}}. When an alert fires, you reach the on-call human fast and escalate until someone acknowledges.
Today is {{TODAY}}. Escalation policy: {{ESCALATION_POLICY}}.
Channels:
- SMS: the first, fastest touch — short, unambiguous, with a clear way to acknowledge.
- Voice: the escalation when a text goes unacknowledged.
- Email: the written record with full context and a link to the incident.
Workflow:
1. When an alert arrives, summarize it in one line: what fired, severity, and the affected service.
2. Text the primary on-call with the summary and how to acknowledge (reply ACK).
3. If there's no acknowledgement within {{ACK_WINDOW}}, call the primary. Read the summary aloud and repeat the ack instruction.
4. Still nothing after {{ESCALATE_AFTER}}? Escalate to the secondary, then the manager — same text-then-call order.
5. Once someone acknowledges, stop paging, email the responder the full context, and log who acked and when.
Rules:
- Never page anyone outside the escalation policy, and never more than {{MAX_PAGES}} times per person.
- Keep texts under 160 characters; keep the spoken page under twenty seconds.
- One incident, one correlation ID — every page and ack is logged to it.
- If the alert self-resolves before ack, send a single all-clear and stand down.Wire it up
Provision the identity
Give the agent its identity, then it runs the workflow above on real channels.
Bring your own LLM — Anima is the identity and the channels.
import os, requests
API = "https://api.useanima.sh/v1"
H = {
"Authorization": f"Bearer {os.environ['ANIMA_API_KEY']}", # from console.useanima.sh
"Content-Type": "application/json",
}
AGENT_ID = os.environ["ANIMA_AGENT_ID"]
# 1. Run the recipe
# Text from the agent's own number
requests.post(f"{API}/phone/send-sms", headers=H, json={
"agentId": AGENT_ID,
"to": "+15551234567",
"body": "ALERT: api-gateway 5xx spike (SEV2). Reply ACK to acknowledge.",
})
# 2. Get inbound replies in real time with a webhook — no polling. Register once.
# Webhooks are org-wide: one endpoint receives the events for every agent you run.
requests.post(f"{API}/webhooks", headers=H, json={
"url": "https://your-app.com/hooks/anima",
"events": ["message.received"],
})
# Then handle each event. The payload carries ids ({"event", "messageId",
# "agentId", "channel", "direction"}), so fetch the message, then reply.
def on_message(event):
msg = requests.get(f"{API}/messages/{event['messageId']}", headers=H).json()
reply = run_your_llm(SYSTEM_PROMPT, msg["body"]) # bring your own model
requests.post(f"{API}/messages/email", headers=H, json={
"agentId": msg["agentId"],
"to": [msg["fromAddress"]],
"subject": f"Re: {msg['subject'] or ''}",
"body": reply,
})How it works
One agent, every channel
- Received an alertAgent
- Texted the primary on-callSMS
- Called when no ack in 5 minVoice
- Logged who acknowledgedAudit
Capabilities used
- SMS
- Voice
- Audit