惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
腾讯CDC
GbyAI
GbyAI
I
InfoQ
博客园 - Franky
G
Google Developers Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Vercel News
Vercel News
博客园_首页
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
V
V2EX
T
The Blog of Author Tim Ferriss
M
MIT News - Artificial intelligence
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
[I Ran an AI Agent for 30 Days Straight — Here's the Bori...
Tijo Gaucher · 2026-05-25 · via DEV Community

Most "AI agent" demos die at the same place: a tweet, a screenshot, a five-minute video. Then the founder closes the laptop and the agent quietly stops existing.

I wanted to know what it actually takes to keep an agent running for a month — not "working in a Jupyter notebook for an afternoon," but on for 30 consecutive days, processing real inputs, surviving real failures, without me babysitting it.

The headline answer: the model isn't the hard part. The hard part is the eight unglamorous engineering decisions you make before the agent ever generates a token.

Here's what shipped, what broke, and what fixed it.

The setup

One agent. Scheduled job, runs every 6 hours. Job: pull a queue of unread customer support emails, classify them, draft a reply for the human to review, and tag the thread. Stack: OpenClaw runtime, Sonnet as the model, Postgres for state, Docker container with a restart policy. Boring on purpose.

Why this specific job? It's the kind of workload that actually has a budget attached. Nobody pays $99/mo for a chatbot that does nothing. They pay for a thing that processes 200 emails a night while they sleep.

What broke (and what fixed it)

1. The agent forgot it was a process, not a script

First crash: day 4. The container OOM-killed itself loading a 300-email batch into memory at once. The agent had been written like a Python script — "read everything, process everything, write everything."

Fix: queue plus worker, with explicit checkpointing after every N items. If the worker dies on item 47, the next run picks up at item 48. This is so obvious in retrospect that it's embarrassing, but every first-pass agent I've reviewed makes this mistake.

The pattern that works:

for batch in queue.pull(limit=10):
    for item in batch:
        result = agent.process(item)
        db.write_result(result)
        db.mark_done(item.id)  # commit point

The commit point is the whole game. No commit point means the agent has to redo work on restart. No redo means lost work. There is no third option.

2. The retry loop became a money fire

Day 9: I woke up to a $40 inference bill from the previous night. The agent had hit a model timeout on one weird input, retried infinitely, and burned through tokens.

Fix: exponential backoff with a hard ceiling. Three retries, then dead-letter the item with the full input attached so I can debug. The dead-letter queue is the unsung hero of agent reliability — it turns "agent failed silently" into "agent failed loudly, in a place I can see."

3. State drift across restarts

Day 14: the agent started replying with stale facts. Turned out it was caching the customer's previous order details in memory, and a container restart wiped the cache mid-conversation. Replies were referencing orders the customer had already received and forgotten about.

Fix: treat in-memory state as a lie. Anything the agent needs to remember across runs goes in Postgres before the next inference call, not after. If I cannot survive a kill -9 between any two lines of code, I have not built a long-running agent — I have built a long-running prototype.

4. The "it works on my laptop" infrastructure tax

Day 19: I tried to hand the agent off to a non-technical operator to run on their own. They could not. They did not know what docker compose up meant, did not have a Postgres instance, did not want to learn what an environment variable was.

This was the moment I stopped pretending the model was the product. The product is the operating environment — the thing that makes the agent run for someone who never opens a terminal. That is the actual moat, and it is where most of the "AI agent" market is going to consolidate over the next 18 months.

If you're building this layer yourself, you have signed up to operate infrastructure for the rest of your life. If you don't want to do that, managed OpenClaw hosting exists for the same reason managed Postgres exists. You don't run your own database server in 2026 unless you have a very good reason.

The boring uptime math

After the four fixes above, the agent ran the remaining 11 days without intervention. Final tally:

  • Total scheduled runs: 120
  • Successful completions: 117
  • Dead-lettered items: 14 out of roughly 6,000 (0.23%)
  • Human interventions required: 3 (all dead-letter triage, took ~10 minutes total)

That ratio — three interventions in 30 days — is the only number that matters to the buyer. They don't care which model you used. They care whether the thing keeps running when they go on vacation.

What this means if you're shipping an agent

The next wave of agent winners aren't going to be the ones with the cleverest prompts. They're going to be the ones who treat the agent as a long-running process — checkpointing, dead-lettering, observability, snapshot/rollback — and ship that whole stack as the product.

If you want to skip the four lessons I learned the dumb way, the Builder Sandbox tier gives you a MicroVM with sudo and live port-forwarding, and the Dev Agent tier adds observability and snapshot/rollback. That's the layer you actually want when there's a paying customer's workload on the other end.

Either way, the lesson is the same: agents don't fail because the model is bad. They fail because nobody wired up the boring stuff. Wire up the boring stuff. The model is the easy part.