With Provider → Your own agent, each question that needs AI is sent to your Webhook URL as a JSON POST:
{
"event": "chat.message",
"question": "How much is a website?",
"conversation": "9f1c…",
"page": "https://example.com/pricing/",
"site": { "name": "Example", "url": "https://example.com/", "language": "en_US" },
"history": [ { "role": "user", "text": "Hi" }, { "role": "assistant", "text": "Hello! How can I help?" } ],
"context": [ { "n": 1, "title": "Pricing", "heading": "Packages", "url": "https://example.com/pricing/", "text": "Starter website: ₱25,000…" } ],
"system_prompt": "You are the website assistant for…"
}
context and system_prompt are included when Send matching page excerpts with each question is on.
Reply with JSON (any 2xx status):
{
"answer": "Our Starter website is ₱25,000. **Business** is ₱55,000.",
"links": [ { "title": "Pricing", "url": "https://example.com/pricing/" } ],
"sources": [1],
"handoff": false,
"cost": 0.0012
}
answeris required (reply,text,outputormessagealso work, and a plain-text reply is accepted too). Simple Markdown (bold, links, lists) is shown formatted.links(up to 4) andsources(numbers fromcontext) add page links under the answer.handoff: trueoffers the visitor a person.cost(USD) is added to your AI spend and budget. You can sendusage.input_tokensandusage.output_tokenstoo.
Verify the request is from your site. With a Signing secret, each request has the headers X-Sysgage-Timestamp and X-Sysgage-Signature: sha256=<hex>, where the hex is the HMAC-SHA256 of timestamp + "." + raw body with your secret. Reject requests with a wrong signature or a timestamp older than 5 minutes.
If your agent fails or takes longer than the Timeout, the visitor gets a free page excerpt instead.
