Building always-on agents

Open original

This guide from Anthropic explains how always-on agents work: they sleep most of the time, wake for short runs triggered by events, and rely on an inbox, timers, memory, permissions, and an outbox to stay coherent across sessions. It's a practical blueprint for teams wanting to make agents proactive without constant supervision.

  • An always-on agent runs the same core loop as other agents; the difference is the surrounding architecture that decides when it wakes, what persists between runs, and how output reaches the user.
  • Recent model gains in judgment and falling cost per solved task make long-running agents practical; one long-horizon coding benchmark showed Opus 5.5 at 78% lower cost per solved task than Opus 5.
  • The event inbox should be a durable store with one active worker per user, deduplicated events, and batching, so crashes don't lose events and competing runs don't collide.

Always-on agents are stateful and proactive: they keep context across sessions and act without someone prompting them. Under the hood they run the same core loop as any other agent. What's different is the scaffolding around it. The article's central point is that the agent isn't really always on. It sleeps most of the time, wakes for a "run" when an event arrives, finishes its work, saves what happened, and goes back to sleep. The author says the recent resurgence comes from two model-side gains: better judgment about user intent and when to check in, and falling costs for long-horizon work. As a concrete figure, Opus 5.5 cost 78% less per solved task than Opus 5 on one long-horizon coding benchmark, versus 40% less on typical workloads. The architecture rests on five primitives. The first is an event inbox, a durable table that webhooks, schedules, and background jobs write into, instead of calling the agent directly. Direct calls cause competing runs and lost events on crashes, while an inbox gives you deduplication, status tracking, and retry after a worker dies. The author recommends one inbox per user, a single active worker per inbox, and batching so that several quick user messages get one reply. Timers handle proactivity: follow-ups are deadlines the agent sets for itself, and schedules are recurring tasks like a daily newsletter. They live in a separate store, and a polling scheduler moves due items into the inbox. Memory is a directory-style store backed by durable storage so it outlives any single worker. The article says to keep only what the agent can't look up elsewhere, and to save pointers for anything already in an issue tracker or similar system. It breaks memory into user instructions, user notes, a record of past messages to avoid repeating itself, and per-task progress files. What makes the piece useful is that it reads like practical engineering guidance rather than a product pitch. The advice is specific: acknowledge webhooks fast and defer heavy verification such as prompt-injection checks to the run itself, make the inbox rather than the worker's memory the source of truth, and load only an index of notes at startup, pulling detail files on demand. Anyone building proactive agents into an existing product will get the most from the inbox and timer sections, since those are where the failure modes the author describes tend to show up first.

Ask about this article