Five Component Practices for Building Token-Efficient Always-On Agents
Always-on agents often waste their token budget on idle wake-ups, duplicate reports, and creeping scope. This article breaks always-on behavior into five governable components—inbox, scheduler, memory, permissions, and outbox—and shows how to enforce them through prompt constraints or code, along with the engineering metrics and caveats needed to cut idle costs without losing proactive alerts.
1. The Problem: The Hidden Cost of Proactivity
In the AI era, the real efficiency bottleneck is often not model capability but human attention. Yet a related problem is that the running cost of always-on agents is frequently underestimated. Many teams using a Personal Agent run into the same dilemma: to make the assistant “more proactive,” they configure a large number of recurring tasks, only to see most of their quota consumed by idle scheduled wake-ups.
There are three typical patterns. First, full re-runs even when nothing has changed: regardless of whether upstream information is updated, the agent executes the entire workflow from start to finish. Second, generating content to “prove it is working”: even with no new facts, it outputs a well-structured “no major updates” report. Third, scope creep during execution: a very small change request is gradually expanded into a pile of additional work—multi-language support, scheduled refreshes, extra modules—eventually producing a complex artifact that is hard to maintain.
These three forms of consumption share the same root cause: the agent mistakes “being woken up” for “must produce output,” and mistakes “producing output” for “must expand scope.” To fix this, repeatedly telling it to “be more concise” is not enough. Instead, always-on behavior must be decomposed into structured components that can be constrained.
2. Five Components: Breaking Always-On Behavior into Governable Stages
When building long-running agents, the industry commonly distinguishes the following five layers of responsibility. Their value lies in turning vague “proactivity” into explicit contracts for inputs, state, and outputs.
- Inbox: receives tasks and performs deduplication. The criterion for judging whether something is the same task should be a stable task identifier plus a content version, not a timestamp. When a source cannot be accessed, mark it as pending verification and do not retry indefinitely.
- Scheduler: decides when to wake up. It needs to distinguish two modes—“short-delay self-check” and “fixed-interval inspection”—and allow no wake-up at all when there are no pending events.
- Memory: records what has already been reported and its version, ensuring the same fact is not pushed repeatedly, while providing a baseline for incremental judgment.
- Permissions: constrain what can be executed after a wake-up, such as read-only, read-write, or whether external capabilities may be called, preventing the agent from overstepping during inspections.
- Outbox: controls output pacing and aggregation strategy, allowing either an immediate single reply or batching results into one consolidated report at a fixed time.
Agents with a code execution environment can usually implement these five layers directly as modules. For scenarios where only prompts and memory can be configured, the same semantics need to be compressed into a strongly constrained instruction.
3. Enforcing Constraints at the Prompt Level
The following is an illustrative constraint that can be written directly into long-term memory, covering the five layers in natural language:
[Inbox] Deduplicate by task ID and content version; a timestamp change alone is not treated as an update;when a source is inaccessible, mark it as pending verification and do not retry repeatedly.[Scheduler] Do not wake up when there are no pending events; when events exist, inspect on the configured interval.[Memory] Do not push the same version that has already been reported.[Outbox] When there is no substantive change, reply only "no update"; do not generate summaries, analysis, or suggestions.When there are changes, list them one by one: the task itself, the new facts, and the impact on the task.[Permissions] Execute only within the authorized read/write scope; do not expand sources on your own or create new tasks.
Two of these constraints are the most critical. “Do not generate summaries to prove you are working” targets the action bias of turning in a blank sheet; “do not expand sources or create new tasks on your own” targets scope creep. The former saves compute on the output side, while the latter saves compute on the execution side; only when combined can idle costs be pushed down.
4. Engineering Implementation Suggestions
If conditions allow, moving the above semantics into the code layer is more stable, because prompt constraints can still be diluted by long context. The following pseudocode skeleton is a reference:
def on_wake(event):key = (event.task_id, event.content_version)if seen(key): # memory layer deduplicationreturnif not has_new_facts(event):outbox.reply("no update") # outbox: zero redundant outputreturnif not permission.can(event.action):returnresult = run(event, scope=permission.scope(event))seen.add(key)outbox.buffer(result) # batch and consolidate the report
Supporting engineering practices include: instrumenting every wake-up to measure the idle-run rate and incremental hit rate; using the “no update” ratio as a core observability metric; keeping audit logs for permission calls to trace overreach attempts; and aligning the batching window with people’s schedules to reduce attention interruptions. For stronger consistency, you can use a message queue for event buffering, object storage to save version snapshots, and logging, monitoring, and alerting services to observe idle-run trends—all of which fall under general cloud capability categories.
5. Benefits and Caveats
After such a redesign, the common benefits are a sharp drop in idle runs and a lower proportion of recurring tasks, compressing quota usage to roughly half without sacrificing proactive alerts, and possibly reducing the need for a higher subscription tier. Three caveats apply: first, the version criterion must be stable, otherwise deduplication fails; second, the “no update” strategy must allow temporary manual disabling to avoid masking real changes; third, after tightening permissions, the authorization list needs periodic review to prevent features from being over-restricted.
