Skip to content

Example: bot and webhooks ​

Updated: 21 October 2026

Webhook receiver ​

Payment providers, GitHub, form services and many SaaS tools report events by HTTP POST to a URL. A small service fits this perfectly:

  • The URL https://hooks-<project>.apps.helfinity.cloud/... is reachable over HTTPS at once.
  • Check the signature of every webhook in your code. You set the signing key with set_secrets and list it in the contract under secrets, not in env (data and storage).
  • The edge limits requests per client IP (50 per second on average, more for short bursts) and per host. That is far more than normal webhook load needs.
  • A request must have arrived completely within 60 seconds. Long processing belongs in a background job; the answer should come at once.

Chat bot (Discord, Telegram, Slack, Matrix) ​

Bots that open a permanent connection to the chat service themselves (WebSocket, long polling) work because outbound connections are open. Two things to note:

  1. Health endpoint: every service needs a port on which the health check answers. Also start a small HTTP server in the bot (/healthz) or use health.type: "tcp".
  2. Exactly one instance: this suits bots that must not run twice. During a deployment, the old and new instance run at the same time for a short while, until the new one is healthy. Expect that an event may arrive twice at that moment.
json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "bot",
    "source": { "type": "image", "image": "ghcr.io/acme/discord-bot:0.3.0" },
    "port": 8080,
    "resources": { "memory_mb": 256 },
    "health": { "type": "tcp" }
  }]
}

AI agents and LLM applications ​

Apps that call an LLM API (Anthropic, OpenAI, Mistral, …) run like any other web app. Long streaming answers work because the edge does not limit the response duration. Your own models on GPU do not run.