Skip to content
  • LocationSan Pedro, Laguna, Philippines
  • Office hoursMon–Fri, 8:00 AM – 5:00 PM PHT (UTC+8)

Your own agent (webhook format)

Sysgage AI ChatVersion 1.1.0Updated November 27, 2026

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
}
  • answer is required (reply, text, output or message also work, and a plain-text reply is accepted too). Simple Markdown (bold, links, lists) is shown formatted.
  • links (up to 4) and sources (numbers from context) add page links under the answer.
  • handoff: true offers the visitor a person.
  • cost (USD) is added to your AI spend and budget. You can send usage.input_tokens and usage.output_tokens too.

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.