Routines

A routine is work that repeats, handed to one of your agents: when the time comes, or when something happens, the agent carries out an instruction on its own and posts the result to its chat with you. For example "every Monday morning, roll up the watches I follow into a weekly document" or "whenever this watch publishes a brief, pull out what it says about mass production". You can open each run to see what happened, open what it produced and undo it.

What it's for and how people use it: Routines on waper.ai.

The “Open in Waper” link in email, Telegram and Slack takes you directly to the result message for that run.

How it differs from a watch

  • A watch produces a brief that you read and others can follow, through a fixed daily process of fetching, de-duplicating and writing;
  • A routine does one thing when its moment comes. What it does is up to your instruction, and it can use watches as input.

To keep up with a field, use a watch. To have an agent do something for you when the time comes, use a routine.

Whose routine it is

Every routine belongs to one agent. That agent carries it out, its chat is where the results go, and the routine is listed on its profile page under Routines.

  • A routine you create on an agent's profile page belongs to that agent;
  • A routine an agent sets up in a chat belongs to that agent;
  • To hand a routine to another agent, change Belongs to under its settings: the card moves to the new agent's profile page, and from then on its results go to that agent's chat.

Where the results go

Each run posts its result to the chat of the agent it belongs to ("Post results to: Chat with … (default)"), or to a group chat that agent is in: "Post results to" lists the groups it is in. You can also say it in a chat, for example "post the results of the Monday routine in the funding group". If the agent isn't in that group, it can't post there: add it in the group's details first. If the group is deleted or the agent is removed from it, later results go back to the agent's own chat. Under Also send to you can add more places for a copy: email, a document, Telegram or Slack. "A document" is a new document for each run. Telegram has to be linked first (Settings → Connections → Channels) and Slack connected first in Connect apps. When an agent sets up or edits a routine in a chat to post to a Slack channel, the rules for sending in your name apply: if you haven't mentioned that channel (not said in this request, not on your trusted recipients, never sent to through Waper before), it asks once; when you set it in the form, it doesn't ask again.

When a run stops to ask you something, the card is in that same chat, and the chat's row in the list says Needs you.

Briefs and alerts from a watch aren't a routine: where they are posted is set in the watch's settings; see "Briefs" in Watches.

Creating one

Open an agent's profile page, go to Routines and select New routine (the first time, Get started). There are three ways to begin, and all of them make the same thing:

  • Schedule: runs at a time you choose. Pick how often (every hour, every day, every week, every month, or once) and write one sentence on what to do. The default is every day at 10:00 AM, so that sentence is all it takes.
  • Trigger: starts when something happens. Pick what starts it (a watch, a feed, mail to your Agent's address, a webhook, or an app you have connected), then which event, and add conditions if you need them. Everything you can pick is listed under "What can start it" below.
  • Describe it: say in your own words when to act and what to do, and Waper drafts it for you to review, adjust and create. Drafting costs no credits. When no event fits exactly but the agent can check the condition itself (say, whether the price on a web page changed), the draft checks every hour and reports only when the condition holds, and the form says so. Something the agent can neither see nor do (say, "if my fridge is empty, order milk") doesn't get a draft that only looks like it works: one line says what it can't do.

You can also say it in a chat, for example "every Friday at 5 pm, turn what I saved to the library this week into a document". The agent sets it up directly, and the chat shows a card that says when it runs and where results go (written by Waper from what was set up), with Undo beside it.

Under the form you'll find Suggestions: each card reads "what starts it → what the agent does". Select one to put it in the description box, make it yours and draft it; routines that come with an app can be turned on directly.

What a routine is made of

  • Instruction: what to do on each run. Nobody is there to answer questions during a run, so say what to look at and what the result should look like.
  • When it runs: one to five triggers; any one of them starts a run.
    • At a time: every hour, every day, certain days of the week, a day of the month, or once, with times in 15-minute steps; runs are at least an hour apart. The time zone is the one your account used when it was made; when it differs from your current one the card names it, and editing offers Use my time zone.
    • When something happens: see "What can start it" below.
  • Only if (optional, for event triggers): conditions on what the event contains, such as "the brief's entries contain 'mass production'", "the sender contains acme.com" or "has an attachment". Conditions in one group must all hold; any one group is enough; up to 5 groups of 5 conditions each.
  • Post results to and Also send to: see above.
  • Knowledge base (only shown when you have more than one): it reads this knowledge base first, and what it writes goes there.
  • Ends on (optional): the routine stops by itself at the end of that day in your account's time zone and tells you in the chat. The end date can't be before the next run.

Choose one-time run dates and end dates from the calendar. Month names, weekdays and date formatting follow your Waper interface language. Clear the end date with the button next to it to remove the expiry.

These settings are under the slider icon in the form's toolbar (Routine settings). To change any of them later, edit the routine or tell the agent in its chat.

What can start it

Besides a time, a run can start when one of these happens. Some start the moment it happens; for others Waper looks every so often, so the run comes a little later.

What starts it Which event How fast What you give
A watch A new brief is published; an alert you set is met Checked about every 15 minutes Pick a watch (you start following it; alerts only exist on watches you created)
A feed A site or feed publishes something new Depends on how often it publishes: every half hour to twice a day The address of the site or its feed
Agent's mailbox You send or forward an email to your Agent's address At once Nothing; you can copy the address in the form
A webhook Another system sends a request to a private address At once Nothing; you get the address once it is created
Gmail, Outlook A new email arrives By plan: about every 60 minutes on Free, 30 on Personal, 15 on Pro Connect the app first
Google Calendar An event is about to start Same Connect first
GitHub Your review is requested, you are mentioned, something is assigned to you, a watched repository publishes a release, or any notification Same Connect first
Notion A page you shared with Waper is created or edited Same Connect first

Using several apps as triggers makes each one checked less often; the line in the form shows your actual interval. The ones that are checked every so often can be late but do not skip anything: each check carries on from where the last one stopped. Only an app that stays disconnected for more than a day, or more than a hundred items arriving between two checks, leaves something unfetched, and the run history says so.

Mail to your Agent's address. Only mail from the email you signed up with is accepted. Add conditions to choose which mail belongs to this routine (the subject contains "invoice", say). Mail that meets them starts a run instead of an email reply. Without conditions, every email the address receives goes to this routine, and you can no longer talk to Kiki by email, so you will usually want conditions. Attachments themselves are not kept; the agent gets the subject, the text and the attachment names.

Webhooks. Once the routine is created, its card shows a private address with a copy button. Each POST to it starts a run, and the request body is what the agent gets to work with:

curl -X POST -H "Content-Type: application/json" \
  -d '{"build":"failed","branch":"main"}' \
  "<the address copied from the card>"
  • The address contains a secret: do not post it anywhere public. If it leaks, remove the trigger and add a new one.
  • The body can be up to 64 KB and must not be compressed. The answer is 202 when it was taken, 404 when the address is wrong or the routine was deleted, 413 when the body is too large, 415 when it is compressed, and 429 when there are too many requests (60 an hour for one address, 300 a day for one account).
  • While the routine is paused, a request is still answered with 202, but nothing runs: what happens during a pause is not made up for later.
  • Sending the same request again does not run it twice: requests are told apart by an Idempotency-Key header (Webhook-Id, X-GitHub-Delivery and X-Delivery-Id work too); without one, the same body counts once for five minutes.
  • To the agent the body is outside content, and nothing written in it can give the agent orders.

On the profile page

The Routines tab of an agent's profile page lists its routines as cards: what starts it, its state, its name, the instruction and the next run. The ⋯ menu on a card lets you Pause or Resume it, Test run it (run it once now; it is charged like any run and doesn't count toward the daily limit; with only event triggers it uses the most recent real event, or a sample that says it is one), Edit it, or Delete it (with Undo in the message that follows).

Run history lists every recent run: when, how it went (Running, Done, Nothing to report, Needs you, Failed, Skipped), one line on the result, what started it, and where the result also went (for example "Sent to: chat, email", with one sentence for anything that did not go out). Switch to Calendar to see past runs and upcoming scheduled ones on the same month.

The built-in routines of apps you turned on (such as the daily GitHub brief) are listed on Kiki's profile page, where you can pause and resume them. Change their settings on that app's page in Connect apps. When you ask an agent in a chat which routines you have, it lists these too, saying which app each came with and whether it is running; you can also ask it to pause or resume one.

Does a run ask before acting

A run follows the same rules as a chat (see When it asks first), with no separate setting. There is one difference: what a routine does isn't something you asked for in the chat yourself, so nothing happens just because "you said so".

  • Just happens: reading, searching, research; anything in Waper that can be undone or restored (creating or editing documents, saving and filing items): what it created or saved can still be undone, and an edited document can be restored from its version history.
  • Goes through the auto-review: every other action, such as sending, writing to a connected app, running a command on your computer, a delete that can't be undone, and changing what happens later (creating, editing, pausing, resuming or deleting a routine, creating a watch, saving a skill). The review checks whether this is what you set the routine up to do: if so it runs; if it isn't sure, the run stops and waits for you, and you get a notification; something clearly unsafe is blocked. Once a run has read outside content (the brief, alert, email or webhook request that started it, a web page, data from an app), an "Always allow" you chose no longer lets an action through on its own; it goes to the review as well.
  • Asks you every time: a payment; sending in your name to someone you haven't mentioned; a single action expected to cost more than 600 credits.

A run can't ask another agent for help: routine work is done by the agent it belongs to.

More rules for runs

  • Nothing to report means no interruption. When the instruction has a condition ("tell me only if the price drops below 50") and it isn't met, the run ends quietly: no message, no notification, just a line in the run history.
  • It remembers what it saw last time. A routine can leave notes for its next run (for example "price on 7 October: 49"), so "tell me only when it changed" works.
  • Events are handled together. Mail and webhook requests start a run as they arrive; everything else is handled every 15 minutes, and several events arriving in that window are handled in one run (up to 20, oldest first; the next run carries on with the rest).
  • A routine runs at most 24 times a day (a UTC calendar day; test runs don't count). Past that, timed runs are skipped and waiting events are kept for the next day.
  • Credits: 24 credits are reserved before each run and settled at the actual usage afterwards; a single action that would cost more than 600 credits asks you first.
  • A run that didn't work is tried again (not enough credits, the model briefly unavailable): what started it is kept and the next check runs it again. A run you stopped yourself is not repeated.
  • After 3 runs in a row that didn't work, it pauses itself and tells you in the chat. A successful test run turns it back on.
  • It can use your computer too. If the computer it needs is offline, the run waits, checking about every 15 minutes, for up to 6 hours, then runs anyway and says the computer was offline. See Your computers.

How many

Free lets you set up 3 routines across all your agents (built-in app routines don't count); at the limit, New routine first explains what upgrading adds. Personal and Pro have no limit, and each run uses credits for what it does. See Plans & credits.