frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I built a personal AI agent that runs 24/7 on my home server

https://github.com/randomchaos7800-hub/always-on-agent
3•cha0tikdino•1h ago

Comments

cha0tikdino•1h ago
For the last 6 months I've been running a personal Claude agent as a systemd service on a Beelink mini PC. It gives me a morning briefing in Discord, monitors my email, tracks my finances, and actually remembers things across conversations — not just the last session. Here's how the memory system works and why the naive approach falls apart.

The memory problem

Every agent tutorial I found did one of two things: forgot everything on restart, or shoved the full conversation history into every prompt until it hit the context limit and broke. Neither is usable long-term.

What actually works is three tiers:

- Core Memory — permanent facts about you, always in the system prompt, kept small (~500 chars). Who you are, current tasks, standing preferences. - Recall — every conversation logged to SQLite, FTS5 searchable on demand. The agent can look back, but it doesn't have to carry it all. - Archival — long-term knowledge store, same FTS5 search. Stuff like "user doesn't like meetings before 10am" or "the Plaid API returns dates in UTC not local time."

The key insight: Core Memory is always in context. Everything else is searched when needed. After 6 months of daily use the system prompt is still ~2KB.

The MCP subprocess thing

The Claude Agent SDK lets you expose tools as MCP servers. The natural approach is an in-process bidirectional channel — but there's a race condition on it (issue #148 in the SDK repo) that causes intermittent crashes under load.

The fix: run the memory MCP server as a standalone stdio JSON-RPC subprocess. The parent spawns it at startup and communicates over stdin/stdout. It's a few extra lines but eliminates the crash entirely. The skeleton in the repo does it this way.

Loop detection

Tool call loops are a real problem. Agent tries a bash command, it fails, agent tries the exact same command, it fails again, repeat until you've burned $3 and gotten nothing. The fix is trivial once you know to do it: track the last N tool call names in an array. If the last 3 are identical, call q.interrupt() and bail with an explanation.

What's in the repo

The GitHub repo is a working skeleton — the core loop, SQLite memory system, and a terminal REPL. npm install && npm start and you're talking to an agent that already has persistent memory. It type-checks clean on Node 22.

What it doesn't have: Discord integration, cron jobs, the systemd service setup, semantic memory search, or the pitfalls I hit over 6 months. I wrote all of that up in a guide — link in the README if you want the full thing, but the skeleton runs standalone.

Cost

Claude Max subscription is $20/month flat with no per-token charges. Server is a Beelink mini PC pulling ~15W — call it $2–3/month in electricity. Total: ~$25/month for something that never sleeps, has real tool access, and actually knows who you are.

Happy to answer questions about the architecture.

Epsteincoin Is Collapsing

1•zerosizedweasle•3m ago•0 comments

Would you choose the Microsoft stack today if starting greenfield?

1•JB_5000•4m ago•0 comments

What's the right trust model for an agent-to-agent network?

https://platia.ai/
1•alexandroskyr•5m ago•1 comments

IBM stock drops by 13% after Anthropic publishes a blog post

https://www.businessinsider.com/ibm-stock-price-anthropic-ai-update-cobol-language-software-sello...
2•seagram•8m ago•0 comments

Uber acquiring parking app SpotHero as it moves beyond ride-hailing

https://www.cnbc.com/2026/02/23/uber-acquiring-spothero.html
1•avonmach•8m ago•0 comments

Show HN: LexReviewer – Because "Chat with PDF" is broken for legal workflows

https://github.com/LexStack-AI/LexReviewer
1•sherebanuk•9m ago•1 comments

Strategic choices: When both options are good

https://longform.asmartbear.com/strategic-choices/
1•doppp•10m ago•0 comments

Why is the toilet often called the debug chair?

https://blog.ptidej.net/debug-chair/
1•yann-gael•10m ago•0 comments

Intel XeSS 3: expanded support for Core Ultra/Core Ultra 2 and Arc A, B series

https://www.intel.com/content/www/us/en/download/785597/intel-arc-graphics-windows.html
2•nateb2022•11m ago•0 comments

Railway surpasses 1M deployments per day

https://railway.com/stats
1•dban•12m ago•0 comments

An Open Fan Differs from Turboprop and How It Beats Turbofans [video]

https://www.youtube.com/watch?v=fT7Zi_xF8Ts
1•sxzygz•12m ago•0 comments

FreeBSD 2025 Q4 Status Report

https://www.freebsd.org/status/report-2025-10-2025-12/
1•vermaden•13m ago•0 comments

United States Withdrawal from the Joint Comprehensive Plan of Action

https://en.wikipedia.org/wiki/United_States_withdrawal_from_the_Joint_Comprehensive_Plan_of_Action
2•treetalker•17m ago•0 comments

Show HN: LookTake – Try anyone's makeup, outfit, or hairstyle on your photo

https://about.looktake.io/
1•takeaura25•17m ago•0 comments

Debunking Cato's "Immigrants Use Less Welfare" Claim

https://samuelgabrielsg.substack.com/p/debunking-catos-immigrants-use-less
1•samuelgabrielsg•17m ago•0 comments

NASA will return its moon rocket to the hangar for more repairs before astronaut

https://phys.org/news/2026-02-nasa-moon-rocket-hangar-astronauts.html
3•bookmtn•19m ago•0 comments

VidSoda is an all-in-one AI creative platform

https://vidsoda.com/
1•nikiki•22m ago•1 comments

Proposal limiting foreign scientists at NIST disrupts Colorado quantum industry

https://coloradosun.com/2026/02/19/colorado-quantum-industry-scientists-foreign-nist-federal-labs/
3•osnium123•22m ago•0 comments

Lamborghini cancels their multi-year EV project

https://www.engadget.com/transportation/evs/lamborghini-ditches-plans-for-its-all-electric-superc...
4•dreadsword•24m ago•1 comments

The Weird OS Built Around a Database [video]

https://www.youtube.com/watch?v=pWZBQMRmW7k
1•surprisetalk•24m ago•0 comments

Record-breaking Antarctic drill reveals 23M years of climate history

https://phys.org/news/2026-02-antarctic-drill-reveals-million-years.html
3•wglb•25m ago•1 comments

The AI productivity boom is not here (yet)

https://www.economist.com/finance-and-economics/2026/02/22/the-ai-productivity-boom-is-not-here-yet
6•andsoitis•26m ago•3 comments

NPM install is stealing your passwords – I built a tool to catch it

https://westbayberry.com/product
2•ComCat•29m ago•1 comments

Lamplight.Cafe

https://lamplight.cafe
2•ryuura•31m ago•0 comments

NASA's Artemis II launch date gets pushed back again

https://qz.com/nasas-artemis-ii-launch-delayed-april
2•bookmtn•34m ago•0 comments

Show HN: MFLScout – Analytics Platform for Metaverse Football League

1•iedayan03•34m ago•0 comments

Claude on Socialization

https://claude.ai/share/486be97b-df4f-4e11-abc9-53021038f141
1•s1gs3gv•36m ago•1 comments

Show HN: CodeAnswr – AI-powered Stack Overflow alternative, free forever

https://codeanswr.com
1•mobinpo•37m ago•1 comments

Show HN: BudgetFast – Upload a bank statement screenshot, AI does the rest

https://budgetfast.co
1•ivanramos•38m ago•0 comments

I made a game about the nihilist penguin

https://store.steampowered.com/app/4343410/ULTRATAP_Demo/
1•luckyape_•42m ago•0 comments