Pattern
How AI agents work without being asked
AI agents work without being asked when something other than a person wakes them: a schedule, a regular heartbeat check or an incoming event. Each wake-up gives the agent a fixed job, a time budget and a way to report back, so it can chase, prepare and flag things before anyone thinks to ask.
Explained from public sources. Mai has not built this yet.
On this page
In plain English
Most AI tools sit and wait for you to type. A useful assistant does not: it notices that a supplier has not replied in four days, that a contract renews next month, or that tomorrow’s diary has a clash. To do that, something has to wake the agent up when nobody is talking to it. That something is a schedule, a regular heartbeat, or an event such as a new email arriving.
How it works
There are three ways to start an agent without a person typing, and most real systems use all three.
Schedules. A scheduler starts a named job at fixed times, written as a cron expression (five fields: minute, hour, day of month, month, day of week). “Every weekday at 07:30, prepare the morning briefing” is a schedule. Cloud platforms run these as jobs: a container starts, does one unit of work and stops. Azure Container Apps, for example, offers scheduled, event-driven and manual jobs, and evaluates its cron expressions in UTC, which matters for a UK business when the clocks change.
Heartbeats. A heartbeat is a short, frequent wake-up with an open question: “is there anything on my watch list that needs me?” The agent reads a checklist (unanswered threads, approaching deadlines, stalled tasks), looks at the current state of each, and either does nothing or creates a piece of work. The important design choice is that most heartbeats end quietly. A heartbeat that always finds something to do is usually badly tuned.
Events. An event-driven run starts when something arrives: a message on a queue, a webhook from a CRM, a new file in a folder. Event-driven jobs scale with the volume of work, so a quiet afternoon costs almost nothing and a busy morning runs several workers at once.
Whatever wakes the agent, each run gets the same envelope:
- a task that names exactly what this run is for, not a vague “check things”;
- a budget: a time limit, a cap on model calls and a retry limit;
- a scope: which tools and records it may touch on this run;
- a report: what it found, what it drafted and what it left for a person, written to the log.
Wake: Schedule, Heartbeat, Event. Then Job runner. Then Agent run. Then Drafts, Run log. Then You approve.
Two scheduling settings deserve attention. The first is overlap: what happens if the next run is due while the last one is still going. Kubernetes CronJobs, for instance, let you allow overlap, skip the new run, or replace the old one. For an agent that sends anything, skipping is usually the safe answer. The second is lateness: if a run was missed (the platform was down, a deployment was in progress), should it still run late, and how late is too late? A morning briefing delivered at 3pm is noise.
Where it goes wrong
- Duplicate work. Platforms may retry a run or start it twice, and Microsoft’s guidance for long-running jobs is to design for at-least-once processing. If the agent’s job is “send the chaser”, a duplicate run sends two chasers. Every action needs a record of whether it already happened, checked before acting.
- Silent failure. A scheduled agent that crashes produces no complaint, because nobody was waiting for it. You find out a week later that the briefings stopped. Runs need monitoring that notices absence, not just errors.
- Noise. An agent that reports on every heartbeat trains people to ignore it. Thresholds and “nothing to report” as the default outcome matter more than clever prompts.
- Cost creep. A heartbeat every five minutes that calls a large model each time adds up. Cheap checks in plain code should decide whether the model is needed at all. See agent cost control.
- Too much autonomy. OWASP lists excessive autonomy, where high-impact actions run without independent checks, as a root cause of agents doing damage. An agent that wakes itself up is exactly where this bites, because no person is watching at that moment.
- Time zones and calendars. UTC schedules drift by an hour twice a year in the UK, and “every weekday” still fires on bank holidays unless you tell it otherwise.
How Mai AI uses it
In a Mai AI system, proactive work is designed as a short list of named jobs, each with an owner, a schedule or trigger, a budget and a clear output. Typical candidates are a morning briefing, a chase list of replies that are overdue, and a weekly pipeline or compliance summary. I write the job list with the client before writing any prompts, because the list is what decides whether the system feels helpful or noisy.
I design the agent’s own initiative to stop at drafting. A scheduled run can gather facts, prepare a reply or flag a risk, but sending, paying or changing a record goes through the same human approval gates as everything else. That mirrors the rule in the AI chief of staff case study: anything that matters needs a signed approval token, and the whole trail is written to an audit log. A run that wakes itself up is logged like any other, so you can see what it looked at and why it acted or stayed quiet (see traces and audit logs).
Where a job follows something for days or weeks, such as a supplier dispute, the heartbeat hands over to a long-running job with its own state. If you want to see which proactive jobs would earn their keep in your business, that is part of designing your custom AI operations system.
Questions and answers
How do AI agents run on a schedule?
A scheduler, such as a cron job or a cloud job service, starts the agent at set times with a fixed task, for example preparing a morning briefing. The agent does the work, records what it did and stops until the next run.
What is a heartbeat in an AI agent?
A heartbeat is a short, regular wake-up where the agent checks a list of things worth watching, such as overdue replies or deadlines, and decides whether anything needs action. Most heartbeats should end with nothing to do.
Can an AI agent act on its own without a prompt?
Yes, if it is started by a schedule or an event instead of a message. In a well-designed system it can prepare and draft on its own, but anything that matters still waits for a person to approve it.
What is the difference between a scheduled agent and an event-driven agent?
A scheduled agent runs at fixed times whatever is happening. An event-driven agent runs when something arrives, such as a new email or a message on a queue, so it reacts as things happen.
Harnesses known for this
- Harness profileOpenClaw
OpenClaw is an open-source, self-hosted AI assistant that runs on your own machine and answers you in the chat apps you already use, such as WhatsApp, Slack, Teams and Telegram. It is best for one person or a small trusted team who want an always-on assistant with scheduled jobs, skills and tools under their own control.
- Harness profileHermes Agent
Hermes Agent is an open-source AI agent from Nous Research that runs on a server or your own machine, talks to you through the terminal or chat apps, and writes reusable skills from the work it does. It suits people who want a long-lived agent that remembers, runs scheduled jobs and improves with use, on any model provider.
- Harness profileDeepSeek Harness
DeepSeek Harness (dsh) is DeepSeek's open-source agent harness, in public preview, built on the idea that every feature is a plugin. It suits developers who want a self-hosted coding and task agent they can reshape, running DeepSeek models or any provider that speaks a supported API.
- Harness profileClaude Code and Agent SDK
Claude Code is Anthropic's agentic coding tool that reads a codebase, edits files and runs commands from the terminal, IDE, desktop app or browser. The Claude Agent SDK packages the same agent loop and tools as a Python and TypeScript library, for building your own agents on Claude.
Related entries
- PatternLong-running jobs
An AI agent can follow a task for days or weeks only if the task lives outside the agent, as a saved record of goal, progress and next step that survives restarts. The agent wakes, reads the record, does one step, writes it back and sleeps, so nothing depends on one long conversation.
- PatternHuman approval gates
Human approval gates sort every action an AI agent can take into three levels: draft only, needs a person to approve, or allowed to run automatically. The agent prepares, a person signs off anything that matters, and the system refuses any action that does not match what was approved.
- PatternAgent cost control
You control AI agent costs by sending routine work to small, cheap models and saving large ones for hard steps, caching repeated prompt content, and putting hard budgets and caps on every key, agent and job. Clients can then pay providers directly on their own keys or use a managed allowance.
- PatternTraces and audit logs
You see what an AI agent did and why by recording a trace of every run, each model call, tool call and decision as a timed step, plus a separate audit log of every action that changed something and who approved it. Traces are for debugging; the audit log is the permanent record.
Sources
- Jobs in Azure Container Apps (Microsoft Learn)learn.microsoft.com
- CronJob (Kubernetes documentation)kubernetes.io
- LLM06:2025 Excessive Agency (OWASP GenAI Security Project)genai.owasp.org