Get a push when the agent finishes.
A long-running LLM agent should not need you watching it. Your phone buzzes when the job is done, stuck waiting on approval, or broken — so you can step away and trust it to reach you.
Built for agents that run unattended
Two paths, same result: the agent calls an MCP tool or POSTs once, and your phone buzzes.
MCP server built in
MCP clients like Claude Code, Claude Desktop, and Cursor push a notification by calling the create_message tool.
Plain HTTP fallback
No MCP client? One authenticated POST to the messages API does the same job from any agent or script.
Stop-hook ready
Fire the alert from a Stop hook so it runs when the agent finishes, not when you remember to check.
Status in the message
Send the agent status and result text right in the message, so "needs approval" reads clearly.
Per-agent channels
A separate application per agent or project keeps the refactor bot and the cron job on their own channels.
Sub-second delivery
Pushes land in under a second, so you hear back the instant a long job ends or stalls on input.
Three steps to hands-off agent alerts
Pick MCP or HTTP
Create an API key, or add the PocketAlert MCP server to your client for the no-code route.
Send on finish
Call create_message, or POST a title and message from a LangChain callback or agent tool.
Walk away
Give each agent its own application for failures and approvals. Now you can leave the desk while it works.
Wire an agent to your phone
1. Get an API key
Create a key on the API Keys page. The agent sends it in the Token header.
2. POST from a LangChain callback (Python)
import requests
from langchain.callbacks.base import BaseCallbackHandler
class PocketAlert(BaseCallbackHandler):
def on_agent_finish(self, finish, **kwargs):
requests.post(
"https://api.pocketalert.app/v1/messages",
headers={"Token": "YOUR_API_KEY"},
json={"title": "Agent finished", "message": finish.return_values["output"][:200]},
)
agent.invoke({"input": task}, config={"callbacks": [PocketAlert()]})
3. Or as an OpenAI tool the agent calls (Node)
async function notifyHuman({ title, message }) {
await fetch("https://api.pocketalert.app/v1/messages", {
method: "POST",
headers: { Token: "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ title, message, level: "high" }),
});
}
Expose notifyHuman as a function/tool so the agent calls it when it needs approval or hits an error.
4. Or skip the code with MCP
If your client speaks MCP (Claude Code, Claude Desktop, Cursor), add the PocketAlert MCP server and let the agent call the create_message tool. No code on your side.
The docs cover targeting, applications, and the rest of the MCP tools.
Questions, answered
Two ways. MCP clients like Claude Code, Claude Desktop, or Cursor call the create_message tool and the push lands on your phone. Anything else does a single HTTP POST to the messages API. A Stop hook at end-of-run is the usual trigger.
Add the PocketAlert MCP server to your client and call create_message with a title and message. No code, no curl. There is also create_message_with_attachment if the agent has a file or screenshot to send.
Give each agent its own application so a "needs approval" from your refactor bot and a "task done" from the nightly pipeline arrive on separate channels. Word the title so an approval request or a failure reads clearly at a glance.
Give each agent or project its own application. A push from your refactor bot and one from the nightly data pipeline arrive on separate channels, so you know which job spoke without reading the body.
Delivery runs under a second. When a coding agent has churned for fifteen minutes and you have wandered off to make coffee, the push reaches you before you sit back down.
Send a level with each message. A routine "task done" ping can go at silent — no sound or vibration, but still in your history — while a failure or approval request goes at high and arrives as a time-sensitive push that breaks through iPhone Focus. The MCP create_message tool takes the same level field, so the agent picks the volume per message.
Let the agent tap you when it is done.
Create an API key, wire it into a Stop hook or the MCP tool, and walk away from the desk.