Skip to content
Lyra

Routines

Give an agent a standing order that runs on a schedule.

A routine is a saved prompt plus a schedule. When it fires, it wakes the agent in a conversation, whether or not anyone is there.

Schedules

Schedules use five-field cron expressions, for example 0 9 * * 1-5 for weekdays at 09:00. You can also use:

  • a time zone prefix: CRON_TZ=Europe/Berlin 0 9 * * 1-5
  • an interval: @every 30m, @every 6h

Occurrences are at least one minute apart. Each agent can hold up to 50 routines.

Where results go

A routine posts into the conversation it was created in. If that conversation no longer exists, it falls back to a direct conversation with the person who created the routine.

Managing routines

Pause, resume, reschedule or run a routine right away. Resuming or rescheduling starts from the current time; occurrences missed while a routine was paused are not replayed.

Agents can also manage routines themselves: ask an agent to check something every morning and it can set up the routine for you.