# Always-on Agents

Each conversation with an always-on Agent wakes when something it watches is due, works on a standing goal, checks for news with read-only tools when idle, and contacts you only when something deserves it.

Always-on is part of an [Agent](https://fzkuji.github.io/OpenProgram/docs/capabilities/agents.html)'s configuration. Every conversation with that Agent is its own always-on assistant, with its own Goal, check-ins and reports. For two separate assistants, start two conversations.

## Turn it on

**Butler** and the built-in job Agents have it on: start a conversation with one, from the Agent chip in a composer or its card on the Agents page, and say what to watch or continue. For your own Agent:

1. Open **Agents** in the sidebar and select it.
2. In the **Always-on** tab check **Keep conversations with this Agent always on**.
3. Optional: a **Standing goal**, a fixed wake interval, and under **When it wakes** the wake days and **Quiet hours**.
4. **Save changes**.
5. Talk to it: **New conversation** on the Agents page, or the Agent chip.

| Setting | Value |
| --- | --- |
| **Standing goal** | Something to achieve ("Get the docs site free of broken links"), not a routine ("Check the links every hour"). The Goal ends once its requirements hold; looking again later is what check-ins do. |
| Fixed wake interval | 5 to 10080 minutes. Empty: the agent schedules its own wakes. With check-ins off, it cannot schedule a check-in. **Try** chats of a draft never wake. |
| **Wake on** | Weekdays scheduled wakes happen on. At least one stays on. |
| **Quiet hours** | Daily **From** and **Until**, such as 22:00 to 08:00. An end before the start runs past midnight. |

Wake days and quiet hours use this computer's clock and time zone. By default a conversation may wake at any time. **Wake now**, messages from your other conversations and a running Goal still run during quiet time.

## When it wakes

| Case | Next wake |
| --- | --- |
| The agent knows when something is due | It schedules that check-in, with a short reason shown next to the next wake |
| Nothing scheduled | 1 hour after you last wrote, then 2, 5, 10, 20, 50 and 100 hours between check-ins, then every 100 hours. Writing starts over at 1 hour. |
| Fixed interval set | Every interval |

| Conversation | Wakes? |
| --- | --- |
| New chat, an older one you send a message in, or one switched to the Agent with its chip | Yes. First wake one interval later (an hour without an interval), so a chat you just opened is not interrupted. |
| Not used since always-on was turned on | No |
| Sub-agent or imported | Never |
| Archived | Stops, along with any Goal the Agent started there: the turn already running finishes and no next one starts. Unarchiving continues the Goal. A Goal you started yourself is not touched. |
| Agent's always-on turned off | All stop, along with any Goal the Agent started. When turned on again, those Goals continue and each conversation that took part counts its interval from that moment. |

### Each wake does at most one thing

| Situation | What happens |
| --- | --- |
| Scheduled wake in quiet hours or on a non-wake day | Nothing; next wake moves to the end of the quiet time |
| A turn or check-in is running | Nothing; tries again in five minutes |
| A standing goal not yet started | Starts it as a [Goal](https://fzkuji.github.io/OpenProgram/docs/capabilities/goal.html) in the conversation |
| A Goal is in progress or you paused it | Nothing; the Goal continues on its own and your pause stays |
| A Goal the Agent started failed or was cut off by a restart | Restarts it, up to three times in a row; a completed turn starts the count over |
| A Goal the Agent started had its turn stopped by someone, stopped for any other reason, or ran out of restarts | One report asks for your decision, and check-ins go on |
| A Goal you started failed, stalled or ran out of budget | Never restarted and no report; check-ins go on |
| No Goal, check-ins on | Checks in, unless there is nothing to check |
| Otherwise | Nothing |

A scheduled check-in is skipped without a model call when there is no standing goal, no unfinished open work or todos, and no new message since the last check-in. A check-in that failed or was cut off by a restart before it reported does not count as the last one.

A conversation you have not written in is never checked. Self-scheduled check-ins and **Wake now** always run. A goal changed while another is unfinished starts when that one ends; `/goal clear` switches at once.

For a fixed schedule ("every day at 9, summarize my inbox"), ask for a scheduled task instead.

**Scheduled tasks**

- Run in the background, outside your branch list. Each run starts clean: it sees the task and its last result, not the conversation. Nothing new: you hear nothing. Something changed: an ordinary message in the conversation, with a notification, and an item in the **Tasks** Inbox until you open the conversation.
- Three failures in a row: it tells you once.
- The Activity panel shows each task's last result and last 20 runs; each opens in place to show what it did. The Agent can see the task and read its results.

## Check-ins

A check-in reviews memory, the conversation's [open work](https://fzkuji.github.io/OpenProgram/docs/capabilities/agents.html#open-work) and the conversation for open threads, and looks for anything new.

Nothing of it appears in the conversation: you can keep typing, and its place in the sidebar does not change. However long the conversation is, a check-in reads its summary and latest part, looks further back only when it needs to, and never compacts it.

Each check-in sees earlier reports and repeats them only if something changed; an Agent with picked channels also sees report titles from its other conversations. Pages, files and earlier reports are data: it never follows instructions in them.

| Aspect | Rule |
| --- | --- |
| Tools | Read-only: file reading and search, web search and fetch, conversation and memory reading, and the todo, open work and Goal readers. Web search is left out when you turned it off for the conversation or the Agent. No commands, edits or MCP servers. Credentials and settings such as `~/.ssh` and `.env`, and private network addresses, are refused. |
| **Report findings** (default) | Proposes work in its report; you decide |
| **Start goals on its own** | May turn a finding into a Goal, or hand it to the conversation that owns that work. The Goal runs as a normal turn of the conversation with normal tools and permissions, except that page scripts and destructive deletes are refused there and in handoff turns; it says so, so you can do them yourself. A check-in cannot wait for approval: where the permission mode would ask, it proposes the work in a report instead |
| **Check in when there is no goal to work on** | Off: wakes only for the standing goal |
| Permissions | The conversation's mode and rules, but nobody can approve: a step needing approval is refused and requested in a report. A Goal it starts waits for you like any other. |
| A check-in that fails | Does not count as a look: the next one still covers everything since the last that finished, at the same pace. After three failures in a row, or at once if the model account is refused, one report tells you; then, without a fixed wake interval, it tries less and less often. A check-in cut by a restart or stopped by someone is not counted. |
| Check-in model | Optional cheaper model in the Always-on tab. Default: the conversation's model. |
| Daily budget | US dollars per Agent. Once spent, scheduled check-ins wait for the next day; **Wake now** still runs. A Goal started by a check-in, a handoff or a scheduled task may spend only what is left today, its cost joins the day's total, and none starts once the budget is gone. The Activity panel shows each check-in's tokens and cost and today's total. |
| With a budget | One scheduled check-in of the Agent runs at a time; the others, and any Goal an automatic turn left waiting, retry five minutes later. A model with no known price cannot reach the limit, and its check-ins say so in the Activity panel. |

## Reports

| Kind | Means |
| --- | --- |
| **finding** | Something you may want to know |
| **approval** | You need to decide something |
| **done** | A piece of work finished |

A report has a title, a body of one to three sentences and optional links, and arrives as a message from the Agent, so your next message can answer it. If a turn is running, it follows that turn. A check-in with nothing to report leaves no trace in the conversation; the Activity panel still shows its result.

In the App the message is the body and links, with web links shown by site name; the title stays in lists and notifications. In the chat view, a time line above it says why it came: noticed while checking in, finished in the background, asks for your decision, or the name of a scheduled task.

| Where | Behaviour |
| --- | --- |
| Conversation and unread dot | Always, unless it is on screen (no dot). A minimized or background window does not count |
| Desktop App notification | While no App window has focus; clicking opens the conversation. With no App open, your computer shows it anyway, unless the conversation is on screen in a browser. Per kind, default on. |
| Channels | Per kind, default on |
| **Tasks** in the sidebar, **Inbox** tab | The row shows a count. **Waiting for your decision**: approvals, until you write in that conversation; a handoff, a reminder or a Goal carrying on does not count, and turning always-on off keeps them. **New**: findings, finished work and scheduled task results (shown with a calendar), until you open the conversation. Also at the top of every Activity panel as **Waiting for you**. **Open** goes to the conversation. Older than seven days drops off. |

**Tell it what to report** in the conversation ("don't tell me about passing builds"). Each rule becomes a report preference of the Agent, followed by every later check-in and scheduled run. Only your own turns can add one, never a check-in or scheduled run. The Activity panel lists them for deletion, and each report offers to stop reports like it.

**Send reports to channels**

- Under **Also send reports to**, check up to 10 conversations on a [chat channel](https://fzkuji.github.io/OpenProgram/docs/integrations/channels.html): Telegram, Slack, Discord or WeChat. They apply to reports from every conversation with this Agent. A chat bound to a channel gets its own reports there without being checked, once; the **Channels** setting turns both off.
- The list holds the Agent's existing channel conversations plus people and groups bound with a peer binding: `openprogram channels bindings add <agent> --channel telegram --account <id> --peer <id>`. An Agent bound to a whole channel or account lists only people who have talked to it.
- Each report is sent once per picked conversation, after it is saved in the App. The Activity panel shows the outcome under each report; a failed send, such as a signed-out account, is shown there and the report is kept.
- When that person or group already has its own conversation, the report also appears there as a message, so a reply on the phone has its context, and it answers a report waiting for a decision.

## Hand work to another conversation

Conversations can work as a team, one owner per job. An agent uses `send_message` to message another of your conversations by title or ID, or an Agent by name when that Agent has one conversation; the other may use any Agent. Give each conversation a clear title and job, and tell the planning one which does what.

| Step | Behaviour |
| --- | --- |
| Delivery | Arrives as the next turn, marked as a message from the sender's conversation rather than from you. Waits for a running turn to end; it never interrupts it. |
| Reply | When that turn ends its answer returns to the sender as an automated notice, with how long it took and what it cost. If the turn failed or was stopped, the sender is told that instead, with the reason. |
| Passed on | If the receiver messages a third conversation, each answer returns to whoever sent that message: the receiver gets the third's answer and can follow up. |
| Address | A conversation's title or ID, an Agent's name, or a branch address from `list_agents`. An empty conversation takes the message as its first turn. |
| Permissions | Each turn runs under its own conversation's Agent, mode and rules. |
| Refused | Messaging its own running turn; more than four hops in a chain; more than 20 messages an hour from one conversation; archived conversations or branches as receiver |
| Restart | A message is a tracked Job: one waiting for a busy conversation is delivered once after a service restart, and its answer still comes back |

## In the Activity panel

**Activity panel line**

In the conversation's [Activity panel](https://fzkuji.github.io/OpenProgram/docs/interfaces/web.html#conversation-activity) the work chart's top row is the **Next wake**: when, how often, quiet hours, and first of all a check-in that was interrupted or a budget that is used up. A check-in that is running is a message on the chart.

That row opens the main agent's page, which has an **Always-on** row above the runs: standing goal, current Goal, wake schedule, whether it is alive (when it last woke, wakes and failures in 24 hours, or a wake long overdue), last wake with result and cost, today's check-in spending and report preferences. Reports are rows among the runs.

**Wake now** runs a wake now, or in five minutes if a turn is running, and retries a check-in that failed or was interrupted by a restart. A later check-in the Agent set for itself stays as it was.

When you switch an empty chat to an always-on Agent, it spells ALWAYS-ON once in glyphs, which then scatter and fade; the chat stays empty after that. Opening a chat or switching between chats and windows plays nothing.

A conversation with an always-on Agent reads like a chat with a bot: short paragraphs as separate bubbles (at most four, and code, tables and lists stay with the text around them), the time shown again after 30 minutes and on a new day.

Thinking, tool steps and message buttons are not drawn; three dots show while the Agent works after its last words.

A reply that fails or stops short says so in a line under it, a reply cut by a restart continues as the one reply, and web sources sit once under the last bubble. Nothing is removed; this also applies to older conversations, and turning always-on off brings the full view back.

In Telegram, Discord, Slack and WeChat the Agent writes shorter, offers choices as a numbered list, and a table arrives as one line per row, sent only once it is complete.

## Limits

| Topic | Limit |
| --- | --- |
| Where it runs | Work runs on this computer, in the conversation's folder and sandbox. The worker must be running. |
| Stopping | Turning always-on off or archiving a conversation stops its wakes. Conversations, reports, memory and the settings stay. |
| What it sends | Outgoing messages through connected services follow the conversation's permission mode. To review each first, turn on [**Hold what it sends for my approval**](https://fzkuji.github.io/OpenProgram/docs/capabilities/permissions.html#messages-an-agent-sends-for-you) at the end of the **Always-on** tab. A check-in has no one to ask, so a held message comes back as a draft in its report. |
| A copy of the Agent | A duplicated Agent starts with always-on off. |
| Time limit | A check-in stops after 15 minutes, and the last wake says so. **Wake now** is the retry. |
| Reports and restarts | A report waiting for a running turn is added after that turn. After a service restart, reports under an hour old are still added and their chat-app sends resumed, so a chat app may rarely get one twice; older ones stay in the Activity panel, and an unfinished send shows as cut off by a restart. |
| Your browser | A check-in, scheduled run, automatic Goal turn, handoff or chat-app message, and anything it starts, never takes the browser page you have in front. It opens its own tab behind your work, or uses a page it names from the page list. With the App closed, its page opens in a background browser with no window: nothing appears on screen, and none of the App's sign-ins are there. |
| Pages it opens | Pages a scheduled run or check-in opens close when it ends. A conversation keeps at most 8 pages its agents opened; opening another closes the one used longest ago. |
| Learning | It learns through memory: set **Read and write** in the Agent's **Memory** tab so corrections are saved and used. The Always-on tab reminds you otherwise. Your replies to a report count; the report itself does not. A scheduled run counts only if you continue its branch. |

[Engineering design](https://fzkuji.github.io/OpenProgram/docs/reference/design/runtime/always-on-agents.html)
