Skip navigation
Always-on agents, clearly explained!
0:00 / 0:16

Always-on agents, clearly explained!

Akshay 🚀

@akshay_pachaar293K followers

Visit on X

14,070 views

Always-on agents, clearly explained! (and how to build one, 100% open-source) An agent in a chat window only works while someone is typing to it. Once the tab closes, it stops and can't act on anything that happens next. Always-on agents keep state across sessions and act without supervision. Anthropic's new guide on building them shows that the agent loop itself doesn't change, and everything new is the architecture around it. The agent also isn't running all the time. It sleeps and wakes up for short runs, where each run receives an event, does the work, and saves what happened. That cycle needs five primitives. 1) An event inbox Webhooks, scheduled tasks, and user messages all land in a durable table instead of calling the agent directly. Direct calls let two events start competing runs, and a crash loses the event. A single worker per inbox reads the table and starts runs. Events are deduplicated by source ID, and if a worker dies, a new one retries the pending event. 2) Timers Follow-ups are deadlines the agent sets for itself, and schedules are recurring jobs. A scheduler polls for due timers and adds an event to the inbox, so every run still starts there. 3) Memory Each run starts with a fresh context, so anything worth keeping lives in durable storage. The agent stores only what it can't look up again and keeps pointers for the rest. Instructions, an index, and a log of what the user was already told load on every run. User notes and per-task progress files are read on demand, and anything that must survive compaction gets written during the run. 4) Permissions This carries the most risk, since the run holds the user's access and nobody is watching. The agent sends requests without credentials, and a proxy adds them before forwarding. For decisions that need a human, the agent makes a deferred tool call. The session is saved mid-call, the user sees an approval card, and the answer returns as an inbox event that resumes the session. 5) An outbox The user gets the outcome, not every step. A run ends by sending a message, deciding nothing is worth sending, or asking for permission. Too many messages make the agent noisy and too few miss what matters, so the guide recommends starting quiet and tuning it with evals. Timers and user replies keep feeding new events into the inbox, and those short runs repeated indefinitely are what make the agent look always on. I wrote a hands-on article that shows these ideas running in a real system built on Alook, an open-source, self-hosted platform that turns coding agents like Claude Code into an org chart with roles and real email inboxes. Alook GitHub: Anthropic's Guide on always-on agents: My article is quoted below.

Comments

Comments from the original post on X (Twitter)

No comments yet