A Practical Guide to the Five-Component Architecture for Token-Efficient Always-On Agents
This article explains why always-on AI agents waste tokens and attention, and how a five-component contract—event inbox, scheduler, memory, permissions, and outbox—solves the problem. It covers the three common causes of waste, a reusable prompt pattern for routine-driven bots, engineering practices such as idempotency and event-driven execution, and the cost reductions reported after adoption.
1. The Bottleneck Has Shifted From Model Capability to Attention and Quota
Once agents move into an always-on stage, one conclusion keeps proving itself: the efficiency bottleneck in the AI era is not the model but human attention. At the same time, always-on does not mean “online all the time.” When a scheduled task idles, it produces no new information and only keeps consuming call quota and credits. These two points look contradictory, but they point to the same engineering problem: an always-on agent lacks a scheduling contract that defines when to wake up, what to do after waking, and what to say when finished.
The symptoms are highly consistent. A user configures several personal agents, relies on their initiative to surface small reminders, and uses periodic tasks to keep the workflow alive, with a fixed number of reports per day. The quota drains fast: even when nothing important has changed, the agent still runs the full pipeline from start to finish on schedule, spends a large amount of extra quota on cross-validation, and finally emits a complete report saying “no major updates; here is an overview of current progress.” That output has no decision value for the user, yet it accounts for most of the cost.
2. Root Causes: Three Typical Kinds of Waste
The first is repeated processing. The same event arrives repeatedly through multiple messages and multiple sources; without an idempotency key, one thing gets processed several times.
The second is unconditional wake-up. The scheduler understands time but not state, so it runs the full flow regardless of whether there are new facts. This is the “scheduled idle run.”
The third is action bias and scope creep. On one hand, the model tends to prove it is working by producing summaries, analysis, and suggestions, and will hand in a blank sheet even when the conclusion is empty. On the other hand, excessive initiative keeps appending suggestions during execution—for example, expanding “add a sliding effect” into internationalization, scheduled updates, and more. The user finds each suggestion valuable and accepts them one by one, which accumulates into a huge, hard-to-maintain pile of code.
3. The Five-Component Model: Turning Always-On Behavior Into a Governable Contract
Mature always-on agent designs in the industry usually split behavior into five independently configurable components, a split consistent with the skill layering used in AI coding tools.
- Event inbox: receives work and removes duplicates. It uses “task ID + content version” as the idempotency key, so multiple messages about the same event are processed only once, and a timestamp change alone does not count as an update. When a source cannot be opened, it is marked as unverified rather than retried repeatedly.
- Scheduler: decides when to wake up. It distinguishes a “short-delay self-review” from “run on a fixed cycle,” and allows skipping the full flow when there are no new events.
- Memory: records what has already been reported and at which version, so the same version is never pushed twice and the same reminder is not repeated across cycles.
- Permissions: constrain the action boundaries after wake-up, specifying read-only or read-write to avoid unauthorized access and side-effect operations.
- Outbox: controls output pacing, choosing either an immediate single reply or aggregation into one report at a fixed point in time.
For agents with a code layer, these five layers can live in the engineering implementation. For always-on bots with no code layer, driven only by a routine, the five components have to be “translated” into an executable memory prompt.
4. A Reusable Prompt Pattern
Every time a batch of tasks arrives:1. Deduplicate by task ID and content version; a timestamp change alone is not an update;2. Mark the source as unverified when it is inaccessible; do not retry repeatedly;3. When there is no substantive change, reply only "no update"; do not generate summaries, analysis, or suggestions;4. When there are changes, list them one by one: the task itself, the new facts, the impact on the task;5. Do not push the same version again once it has been reported;6. Do not expand sources on your own; do not create new tasks.
Rule 3 suppresses the “blank sheet” proof-style output, rule 6 suppresses scope creep and embellishment, rules 1 and 5 form the idempotency and memory loop, rule 2 avoids cost amplification from futile retries, and rule 4 defines the minimum usable output structure.
5. Engineering Recommendations
- Idempotency first: for any always-on flow, define the idempotency key before the execution logic.
- Event-driven instead of time-driven: replace “run everything on schedule” with “run only when there is an event; otherwise reply no update.”
- Budget the output: set an output cap for each wake-up, and write nothing long for an empty result.
- Least privilege: default to read-only; write operations require explicit authorization.
- Observability: use a general logging service with monitoring and alerting to count idle runs, deduplication hit rate, and cost per wake-up as a basis for tuning.
- Architecturally, a message queue can buffer events, object storage can hold versioned memory, and a container platform can host the always-on process.
6. Benefits and Limits
After running stably with this pattern, idle runs dropped from roughly 18 per week to around 3, and the share of usage fell from about 75% to around 30%. Together with a few high-quality use cases and daily overhead, total usage dropped by about 55%, which a basic tier can cover. The specific numbers vary with task density, source stability, and model implementation, so they should be calibrated against your own monitoring data.
The conclusion is clear: the value of an always-on agent comes from delivering incremental information at the right moment, not from continuously proving it is online. Writing deduplication, scheduling, memory, permissions, and the outbox into a contract is what preserves initiative while controlling cost—a win for both the user and the agent.
