Build an Always-On AI Agent with OpenRouter Agent SDK
OpenRouter published a TypeScript tutorial for building an always-on agent with @openrouter/agent 0.11.0 that monitors Hacker News, produces a digest, and remembers previously seen stories across restarts. The example combines scheduled execution, tools, persistent state, human approval for consequential actions, per-run step and cost limits, and an API-key credit limit. OpenRouter reported that Claude Haiku 5.5 cost $0.0003 to $0.0012 per check in its October 13, 2026 tutorial runs.
The tutorial provides a concrete implementation pattern for scheduled AI agents that combine persistent memory, approval gates, resumable runs, and explicit cost controls.
How to Build Your Own Always-On AI Agent
OpenRouter ·10/31/2026


An always-on AI agent is a program that wakes up on a schedule, uses tools to check on something, decides what matters, and acts or reports without you asking each time. At DevDay 2026, OpenAI announced Dots, its version of always-on agents. You can also build your own, choosing the model, tools, and how much each run can spend.
In this tutorial, we build one in TypeScript with the OpenRouter Agent SDK that watches Hacker News for topics you choose, writes a digest of what’s worth reading, remembers what it has already seen across restarts, and stops any run that reaches five cents. Each check costs us between $0.0003 and $0.0012. This same structure works for any agent that should keep running, such as one that watches a repository or a status page, and then takes an action.
#OpenRouter Agent SDK#@openrouter/agent 0.11.0#Claude Haiku 5.5#Hacker News