Trigger on events, check before you work
The cheapest run is the one that never happens. Let the agent wait for a real event, and put a tiny check in front of any expensive work.
Two habits cut background cost dramatically, and they apply to every agent.
1. Wait to be told, instead of constantly looking. Polling asks "anything new?" on a timer. An event trigger fires only when something real happens. Grok Bot can start a routine from a Slack message or a GitHub notification instead of a clock — but its docs warn against broad listeners like "every new message," which is just polling in disguise. The rule: match one specific thing ("a message in #deploys containing FAILED"), not a firehose. With goal-based agents like Muse and Dots, the equivalent is scoping the goal to a real trigger — "when my flight status changes, rebook" — rather than "keep checking my flight."
2. Check before you work. When you genuinely need frequent checking, split the task: first a tiny check that reads one small signal (a status, a count, a timestamp) and stops if nothing changed; only do the full, expensive work when it actually did. On Grok Bot you write this explicitly ("read only the status field; if unchanged, stop — do not look around"). With Muse or Dots, you phrase the goal so the agent confirms a change is real before spending effort acting on it.
Both habits share one idea: don't pay for the times nothing happened. A monitoring task where the answer is "no change" 95% of the time shouldn't cost the same as one doing real work 95% of the time — and with events and a cheap pre-check, it won't.
One discipline that saves real money on any agent that browses: tell it not to "take a quick look around" while it's there. A capable agent left on a page tends to explore, and exploring is full-price work. Say plainly what to read and when to stop.
For a frequent task, decide: can the source send an event you could trigger on? If yes, write the one specific condition that should fire it. If no, write the one small signal a cheap check would read to decide whether the full task runs at all.
Enjoying the free lessons? Get an email when we publish new courses and updates — no spam, unsubscribe anytime.
Discussion (0)
Ask a question or share what worked for you. Comments are reviewed before they appear.
No comments yet. Be the first to start the discussion!