Routines
Long-running work you've delegated to your agent — on a schedule, when something happens, or once at a future time.
Routines turn a chat goal into a persistent task. You describe what you want once, and your agent keeps doing it — on a schedule, while watching for something to change, when an event fires, or just once at a chosen time. Results land back in chat, or in a connection you've set up.
When should it run?
Routines give you four trigger types — pick the one that matches what you want:
On a schedule
Pick a time (every day at 9:00, every Friday afternoon, the first of each month) and your agent runs the task then.
goal: "Send a digest of last 24h Shopify orders"
trigger: schedule
cron: "0 9 * * 1-5" # 9am, weekdays
timezone: "America/Los_Angeles"Best for: daily digests, weekly reports, periodic catalog audits.
Watch continuously
Your agent keeps checking a source. When it spots something new, it runs.
goal: "Notify me when a new GitHub issue with label priority:1 arrives"
trigger: reactive
sleepPolicy: "5m" # poll cadence
initialDelayMs: 0
maxTicks: 1000 # safety capOnly run on actual change
To avoid burning tokens on unchanged sources, your agent only fires when something actually moved. It can watch:
- A web page that you only care about when its content changed.
- An RSS feed that you only care about when new items appear.
- A JSON endpoint that you only care about when a watched value changes.
When something happens
Your agent waits for an event — a new email, an incoming webhook, a Shopify event — and runs when it fires.
goal: "Summarize and post any new support ticket"
trigger: event
event: "support.ticket.created"
filter: { "priority": ["high", "urgent"] }Best for: ticket triage, inbox follow-up, ops alerts.
Once at a time
A one-time task at a specific time in the future.
goal: "Remind me to renew domain"
trigger: once
fireAt: "2026-11-15T09:00:00-08:00"Best for: dated reminders, scheduled drafts.
When should it stop?
Each routine has a Stop when rule:
- The agent says it's done — Stops when your agent decides the goal is achieved.
- After N runs — Stops after a number of runs you pick.
- At a specific time — Stops at a deadline you pick.
- I'll stop it myself — Only stops when you stop it.
- Keep running forever — Indefinite. Common for scheduled routines.
Run states
While a routine is alive, you'll see one of these states next to it:
- Waiting for next run — Scheduled and idle.
- Running — Working right now.
- Paused — You paused it. Resume anytime.
- Completed — The stop rule was satisfied.
- Failed — Something broke during a run.
- Cancelled — You archived it.
Persistence
Session only — exists only while ToShop is running. Good for one-off "while I'm at my desk" routines.
Saved across restarts — survives restarts. The default for anything scheduled or event-driven.
Where results go
Configure one or more places for your agent to send results:
Chat thread
The originating agent's main chat (default).
Telegram
A specific channel/user via the Telegram channel.
Discord
A specific channel/thread via Discord channel.
Long results can be wrapped into a summary card via the Wrap response toggle.
Creating a routine
Open the Routines tab in the left sidebar → New task. You get a structured form for the goal, the trigger, the stop rule, and where results should land. Best for tasks you've fully thought through.
Type a goal in chat. If it looks like a recurring or triggered job, a card pops up offering to Lock it in as a routine. Tweak the fields and confirm.
Best for: routines that emerge naturally in a conversation, with less ceremony.
Where it runs
Each routine can run only on your computer, only in the cloud, or wherever it can run (your computer when available, the cloud otherwise).
- Only on my computer — Runs in the local app. Will wait if your computer is offline.
- Only in the cloud — Runs server-side. Keeps firing even when your laptop is closed.
- Wherever it can run — Prefers your computer, falls back to the cloud after 3 seconds.
Permissions
Routines inherit your agent's permissions. Skills and tools the routine tries to invoke go through the same approval gates — if a new permission is needed mid-run, the routine pauses and pings you (via channel notification) rather than silently skipping.
Examples to copy
Daily digest
Every weekday at 9am → "Pull last 24h Shopify orders, summarize, post to #ops Discord."
News watcher
Watch an RSS feed → "Post anything matching keyword X to Telegram."
Inbox triage
When a new email lands → "If sender is on the priority list, summarize and ping Telegram."
Birthday reminder
Once, at 8am on 14 September → "Email a 'happy birthday' draft."
Related
- Connections — where routine results can land.
- Permissions — what approvals your agent asks for and when.
ToShop Docs