How to Build Your Own Always-On AI Agent
Blog post from OpenRouter
OpenRouter’s tutorial explains how to build an always-on TypeScript AI agent using version 0.11.0 of its Agent SDK to monitor Hacker News, identify relevant stories, write a digest, and optionally request approval before posting urgent updates to a team channel. The design combines scheduled execution, tool calling, persistent file-based memory for seen stories and conversation state, per-run limits of six steps and five cents, and human approval for consequential actions, allowing unfinished or paused runs to resume safely after failures or restarts. It recommends beginning each scheduled check with a fresh conversation to prevent context and cost growth while retaining only essential long-term memory, and it addresses prompt-injection risk by treating external story titles as untrusted data and requiring approval for external communications. Example runs using Claude Haiku 5.5 cost roughly $0.0003 to $0.0012 each, which the tutorial estimates at about $0.86 to $3.46 monthly for checks every 15 minutes, while suggesting API credit limits to cap total spend. The agent can be hosted as a persistent process on a VPS or home server, or run as a single scheduled job through cron, GitHub Actions, or cloud schedulers, provided its state files or database remain persistent.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| AI Agents | 16 | 6,921 | 1,636 | 267 | +23% |
| LLM | 14 | 6,513 | 1,228 | 231 | +8% |
| AI Coding Assistant | 2 | 1,951 | 537 | 146 | +22% |
| Real-time | 2 | 4,153 | 1,091 | 236 | -14% |
| Opus 5.5 | 1 | 624 | 118 | 53 | +19% |
| Serverless | 1 | 1,363 | 319 | 106 | +11% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.