Skip to content

Schedules and webhooks

An agent normally answers when someone asks it something: in the dashboard, through the API, the website widget or Telegram. Schedules and webhooks start it without anyone asking, for work that repeats or that something else kicks off.

Set them up on the agent’s page → Schedules & webhooks. An agent can have up to 10.

Each run is an ordinary request: it uses credits like any other, and shows in the agent’s activity and the audit log. Runs start only while the agent is live.

A schedule asks the agent the same thing at set times, for example “Check prod for drift and open a ticket for anything you find” every weekday at 06:00.

  1. Click + Schedule.
  2. Name it, and write what to ask the agent.
  3. Pick when it runs: choose a preset, or write a cron expression.
  4. Pick the timezone the times are in.

A cron expression has five fields: minute hour day-of-month month day-of-week.

Expression Runs
0 6 * * * every day at 06:00
0 6 * * 1-5 weekdays (Monday to Friday) at 06:00
0 9 * * sun every Sunday at 09:00
30 */4 * * * every 4 hours, at half past
0 8 1 * * the 1st of each month at 08:00

A schedule can run at most every 15 minutes. The page shows when it runs next.

A webhook gives the agent a secret URL. When another system sends a POST to it, the agent runs with your instructions followed by what was sent, for example a new ticket, a failed build or a security finding.

  1. Click + Webhook.
  2. Name it, and write what to ask the agent. What the webhook receives is added after this.
  3. Copy the URL. It’s shown only once. Anyone with it can start the agent, so keep it secret like a password.

Point the other system at the URL, or try it from a terminal:

Terminal window
curl -X POST 'https://api.eu.backcrew.ai/v1/hooks/bkh_…' \
-H 'Content-Type: application/json' \
-d '{"ticket": "OPS-42", "title": "Disk full on web-1"}'
  • The body can be any text, usually JSON. Up to 16,000 characters of it are passed to the agent.
  • The URL answers 202 Accepted straight away, and the agent runs in the background. The answer is in the agent’s activity.
  • A webhook accepts up to 30 calls a minute.
  • If the URL may have leaked, click New URL: the old one stops working at once.

Each schedule and webhook shows its last run: when, and whether the agent answered. If it didn’t, it says why: out of credits, the agent wasn’t live, it timed out, or the previous run was still going (runs never overlap; that run is skipped).

Run now runs it straight away with its own instructions and shows the answer. It’s charged like any run.

When a schedule or webhook starts failing, you’re told once in the bell (and by email, unless you turned it off in notifications).

Turn one off with its switch: it keeps its settings and URL, and doesn’t run until you turn it back on. Deleting the agent removes its schedules and webhooks.

All three run the same agent and cost the same. What differs is what starts the agent, and whether anyone waits for the answer.

Schedule Webhook Public API
Starts it The clock Another system sending a POST to its secret URL Your own code
What the agent is asked Your fixed instructions Your fixed instructions, followed by what was sent Whatever your code sends each time
Who gets the answer Nobody waits for it: it’s in the agent’s activity Nobody waits for it: the URL answers 202 straight away, and the answer is in the agent’s activity Your code: in the response, or later through a run it polls or a signed callback
Signs in with Nothing, it runs inside backcrew The URL itself is the secret An API key, which works for every agent in the workspace
Conversation One per schedule: with memory on, it can remember earlier runs One per webhook, the same way You choose it with session_id and user_id, for example one per customer
Two at once Never: a run that would overlap the previous one is skipped Never, the same way Yes, in parallel
Long work Fine, up to the agent’s time limit Fine, up to the agent’s time limit Start a run: a single request that takes more than 100 seconds can time out

Use a schedule for work that repeats on its own: a weekly review, a daily report, a nightly check.

Use a webhook when something happening elsewhere should start the agent, and the agent acts through its tools rather than replying to the sender. For example: a new ticket, a failed build, a security alert. Most systems that can send a notification to a URL can call a webhook, with no code on your side.

Use the API when your own software needs the answer back, such as a chatbot, a form or a script. For long work, start a run and poll it, or have the result sent to your server.