Building Always-On Agents: Five Core Primitives

Always-on agents work through five architectural primitives: an event inbox, timers, memory, permissions and an outbox. Here is how they fit together.

Quick Answer

Always-on agents use five core primitives, an event inbox, timers, memory, permissions and an outbox, to manage context across sessions and take actions without direct supervision. William Hu’s guide on the Claude Platform explains how those components work together to create an agent that can continue operating across many short runs.

The same architectural pattern has implications for businesses that want agents to monitor incoming requests, retain customer context and act on their own. The durable stores, permission controls and delivery rules determine how much of that work the agent can handle reliably.

What Makes an Agent Always-On?

An always-on agent spends most of its time asleep and wakes periodically to perform work. Each period of work is called a run, which begins when the agent receives an event, completes a task and records information about what happened.

Each run operates inside a session, a transcript containing messages and tool calls. When the run ends, the agent returns to sleep and the cycle continues indefinitely. The always-on description refers to the user experience rather than continuous computation.

William Hu attributes the renewed interest in this design to two model advances. Newer models show better judgment in understanding user intent and deciding when to check in, while inference costs for long-horizon tasks have fallen. On one long-horizon coding benchmark, Opus 5.5 cost 78% less per solved task than Opus 5, compared with 40% less on typical workloads.

How Do the Five Primitives Work?

Event Inbox

The event inbox receives triggers from webhooks, scheduled tasks, background jobs and other sources. Instead of allowing each source to call the agent directly, sources send events to a durable list, where a worker retrieves pending work and starts a run.

The recommended starting point includes a durable event list, usually a database table, an HTTP handler that writes incoming events to that list, and a background worker that reads from it. Each event carries a status, and unique identifiers from the source allow duplicates to be removed.

Several operating rules apply to the inbox. The handler should acknowledge events quickly because webhook providers can treat slow responses as failures, while deeper checks such as prompt-injection checks belong inside the run. The inbox remains the source of truth so another worker can retry an interrupted run, and only one worker should be active at a time to prevent duplicated work.

Timers

Timers give always-on agents their ability to act proactively. A follow-up is a deadline the agent sets for itself, such as checking for a reply, while a schedule repeats on a known cadence, such as sending a daily newsletter.

Timers are held in a durable store separate from the event inbox. A scheduler polls that store at a fixed interval, finds due timers and either marks a follow-up complete or advances a schedule to its next occurrence. It then adds an event to the inbox and wakes the worker.

Memory

Memory preserves continuity across otherwise separate runs. It should live in its own durable store, implemented as a directory of files mapped to a database or object store so that memories remain available after a worker stops.

William Hu recommends storing only information the agent cannot retrieve elsewhere. When data already exists in another system, such as an issue tracker, the agent should save a pointer instead of a duplicate copy.

The recommended memory categories are user instructions, user notes, past messages and task progress. User instructions are loaded at the start of every run, and task progress files allow a new run to continue unfinished work. When note or progress collections grow large, a run can initially load only an index and retrieve individual files when needed.

Claude Code’s auto memory and the Messages API’s memory tool use file directories for this purpose. An optional dreaming process can review past sessions to replace outdated entries and identify patterns that appear across many runs.

Permissions

Permissions contain the highest risk because an unattended run carries the user’s access. The guide describes three components. A credential proxy outside the agent’s environment injects passwords or access tokens into outgoing requests, while the agent itself sends requests without those credentials. Auto mode uses classifiers to review higher-risk actions and block dangerous ones, as implemented in Claude Code. Deferred tool calls can pause a run to request approval or clarification from the user.

When a tool call is deferred, the session is saved mid-call and the request is presented to the user. The user’s answer arrives as an inbox event and starts a new run that resumes the saved session.

Outbox

The outbox handles delivery when an agent completes work in the background. It is a separate table of outgoing messages, paired with a dispatcher that reads pending messages, decides what to deliver and sends the selected messages to the user.

A simple implementation can use a send tool, while a formal outbox is needed when messages require pacing or recovery from errors. William Hu recommends building evaluations to tune message volume, with the agent starting quiet and earning more attention over time.

Microsoft Durable Task for AI Agents in 2026

In 2026, Microsoft’s Durable Task for AI Agents supports agents that run for hours, call external tools, and must survive infrastructure failures through durable execution. Durable execution automatically checkpoints progress and resumes from where the agent left off.

The Durable Task runtime checkpoints every state transition to durable storage, including LLM responses, tool call results, and control flow decisions. After a failure, execution resumes automatically on a healthy virtual machine. Completed LLM calls are not repeated, preserving token spend and wall-clock time.

Configurable retry policies with backoff handle transient failures from LLM APIs, external tools, and downstream services without additional code.

How Does the Complete Cycle Work?

Every run starts with an event in the inbox, whether that event is a user message, a webhook or a timer. The worker starts the agent in a new or existing session, where it loads memory, works within its permissions and updates its records with anything learned.

After the run finishes, the agent writes an outgoing message to the outbox and the dispatcher delivers it. The run can also set a timer for a later activation, and a user’s reply returns to the inbox as another event. Each run is brief, but the cycle continues indefinitely.

What Does the Evidence Show?

The Claude Platform guide reports that Opus 5.5 cost 78% less per solved task than Opus 5 on one long-horizon coding benchmark, while the reduction was 40% on typical workloads. The guide does not identify the benchmark in the passage.

A separate survey, Always-On Agents: A Survey of Persistent Memory, State, and Governance in LLM Agents, reviewed a coded corpus of 435 works. The authors found that the literature concentrates more heavily on accumulating and retrieving state than on governing, recovering or relinquishing it. Their Always-On Evaluation Protocol, described as a pilot evaluation contract, scores state mutation and recovery obligations rather than answer quality alone.

The same survey treats permissions, credentials, provenance and audit records as part of the operative state for always-on agents, alongside retrievable memories and task ledgers. It introduces the Always-On Evaluation Protocol to make governance requirements measurable.

What Does This Mean for Business Visibility?

An inbox can collect requests from webhooks, scheduled tasks and background jobs, while timers support follow-ups and recurring communications such as daily newsletters.

Memory gives an agent continuity with customer instructions, preferences and task progress. Permission controls determine which actions it can take unattended, and an outbox gives the business control over how completed work reaches the user.

Consider how the architecture affects the way an agent finds and presents business information. A progress record showing what has already been handled can prevent repeated outreach, and retained user notes can help a future session respond with relevant context. For broader measurement of how a business appears across AI search and business listings, BizScoreAI provides AI visibility for business listings.

What to Do Now

  1. List every event source that should be able to trigger an agent.
  2. Define the memory categories your agent needs to retain between runs.
  3. Separate each tool call into automatic, blocked and approval-required actions.
  4. Set delivery rules for completed work and follow-up requests.
  5. Build evaluations to measure agent response volume and accuracy over time.

Key Considerations

  • The event inbox should remain the source of truth, with one active worker at a time, according to the Claude Platform guide.
  • Only one worker should process an inbox at once to prevent duplicated work or overwritten results.
  • User review remains necessary for the highest-impact decisions, even when auto mode is enabled.
  • Session compaction and new sessions both lose detail, so persistent information needs to be saved to memory along the way.
  • The 435-work survey found stronger research emphasis on accumulating and retrieving state than on governing, recovering or relinquishing it.

FAQ

What Are Always-On Agents?

Always-on agents are stateful, proactive systems that manage context across sessions and take actions without direct supervision. They spend most of their time asleep, waking periodically to complete short runs that each end with saved information about what happened.

What Are the Five Core Primitives of an Always-On Agent?

The five primitives are an event inbox, timers, memory, permissions and an outbox. Together they control when an agent wakes, what carries over between runs, which actions it may take and how completed work reaches the user.

How Should an Always-On Agent Receive Events?

Each event source should send events to a durable inbox rather than calling the agent directly. A handler writes events to the list, and a background worker retrieves pending events and starts the runs. The inbox should track event status and deduplicate events using source identifiers.

What Is the Difference Between a Follow-Up Timer and a Schedule?

A follow-up is a deadline the agent sets for itself, such as checking on a reply. A schedule is a recurring task that runs on a known cadence, such as a daily newsletter, and requires tracking for its next occurrence.

Why Do Always-On Agents Need an Outbox?

A formal outbox allows a business to pace outgoing messages and recover from delivery errors. A dispatcher reads pending messages, decides which ones to deliver and sends them to the user. The guide recommends using evaluations to find the right balance between too many messages and too few.

Try the business directory

BizScoreAI, which includes the business directory

BizScoreAI scores how visible a business is to AI search and shows what its listing looks like to the engines people ask. Open the business directory.

Sources


See our editorial disclaimer for how our articles are produced.

🤖
Is your business visible to AI assistants?

Run a free scan to see your AI Visibility Score, SEO rating, and local citation accuracy.

Check Your Score →