docs
Being reached

Schedules

A standing job you wrote, and a turn the agent books for itself. One of the two may instruct, and it is the one you wrote.

The one you wrote

Cron, in the agent's own block

deploy/config.yaml
schedules:
  - kind: cron
    expression: "0 9 * * 1-5"
    timeZone: America/Argentina/Buenos_Aires
    channel: cron:standup
    body: Summarise yesterday's issues and post the standup note.
    # An operator wrote this line, so the wakeup may instruct.
    trust: operator
    createdBy: operator

Vixie cron semantics, matched against the wall clock in the zone you name, so a job at nine in the morning is at nine in the morning on both sides of a daylight-saving change rather than at eight for half the year. One-shot wakeups are the other kind, and both are persisted — a plane that restarts comes back owing the same appointments.

trust: operator is allowed here and nowhere else that an agent can reach, because a line in this file is something an operator typed. That is what makes a schedule able to say do this rather than somebody said this.

The one it books

wake_me asks for another turn and leaves itself a note

00:12:36  demo      wake_me     {"afterSeconds":180,"note":"Check whether example.com is still up.
                                First check: HTTP 200 at 00:12."}
00:15:38  demo      bash        curl -sS -o /dev/null -w "HTTP %{http_code}" -m 15 https://example.com

Work that does not finish in one sitting used to end with the turn. wake_me is a pi extension shipped in the sandbox image, so it is the plane's to fix rather than the agent's to edit. The wait shows beside the agent in the console — ● demo 3m — because an agent about to act with nobody watching should not need a command to notice.

There is no path from the sandbox to the plane, and this does not open one: the request is a file the agent writes, which the plane reads and removes once the turn is over. So the plane checks it rather than trusting it. One wakeup is pending at a time, so asking again moves the appointment instead of adding to it; the delay is held between a second and a month; and the wakeup carries participant trust, never operator, however it asks.

Calling it off is a second tool, cancel_wake, rather than a time that means never — the clamp is exactly why there is no such time, so an agent pushing its wakeup a year away to be rid of it has only moved it a month, and left believing otherwise.

Where the answer goes

A wakeup answers where the conversation is

Ask by mail for a joke every minute and the second joke arrives by mail like the first: the appointment carries the channel the turn that booked it was answering, and so does the appointment that turn books after it. A wakeup used to answer to the agent itself, which is why the first joke arrived and the rest were written, paid for, and said to nobody.

A wakeup that comes due while somebody is writing is folded into the same turn, and there the conversation wins the tie: an agent that booked on its own note instead would have nothing but its own notes in front of it ever after, and would book the next one the same way.

A turn books its wakeup once. The second ask in the same turn is refused, because it is not an agent changing its mind about when — it is an agent that read you will be woken at 09:41 as the waiting being over. One asked for a joke a minute told two hundred of them in a single turn that way, three seconds apart. Changing one's mind is cancel_wake and then asking again, which says out loud that the appointment is gone.

Calling it off drops what the appointment has already produced as well as the appointment — a ten-second wakeup fires while a two-minute turn is running and queues behind it. Only its own bookings go: a message somebody typed at a busy agent is owed an answer whatever the agent decided while it sat in the queue.