Urgent.News

What's breaking now, across thousands of outlets.

AI

The 4 Things That Kill AI Agents in Production (and the Runtime That Survives Them)

Most AI agent demos die the moment reality hits: a restart, a rate limit, a crashed worker. The model is fine — the plumbing isn't. I kept rebuilding the same four pieces for every agent project, so I wrote them once, as a small stdlib-only Python runtime. Here's what actually breaks, and how to handle it. 1. No task state -> a restart loses everything If your agent holds its queue in memory, a…

The four common issues that cause AI agent projects to fail in production are lack of task state, no retries, no lease or heartbeat, and prompts without schema validation.

Firstly, if an agent's queue is stored in memory, a single restart wipes out all the data. To fix this, a durable storage system like SQLite in Write-Ahead Logging (WAL) mode should be used. Two tables are created - tasks and events. Every state transition is recorded as an audit row. States have explicit values: ready, running, done, failed, ready (retry), failed, and dead (exhausted).

Secondly, transient failures such as HTTP 429 or 5xx errors should be retried with an exponential backoff strategy. For client errors like 4xx, the run should fail immediately. Exhausted tasks are placed in a dead-letter state with the last error recorded, making it easier to inspect instead of guessing.

Thirdly, workers should take a lease on a task and renew it with a heartbeat. When a worker crashes, a reclaim job should reset expired leases back to the ready state. This can be scheduled to run every 5-15 minutes using Python's CLI command.

Lastly, prompts need to have a schema to ensure the structured responses are parseable at scale. The responses should be validated against a JSON schema before entering the pipeline. The kit includes 32 system prompts in 6 categories and 3 schemas.

The runtime is entirely built with stdlib and includes OpenAI-compatible and Anthropic LLM clients. It has 2 example pipelines, 11 tests, and a machine index. It also includes 32 system prompts and 3 JSON schemas. The kit is available for a 50% discount using the code LAUNCH50.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

When the AI Brain Crashes: The 'Naked Position' Crisis and Engineering Trade-offs Under Fail-Open Mechanisms

When the AI Brain Crashes: The 'Naked Position' Crisis and Engineering Trade-offs Under Fail-Open Mechanisms Tags: #algotrading #crypto #ai #buildinpublic The Midnight Alert It was 00:12 AM on October…

  • AI-driven crypto trading system crashed on October 10, 2026, at 00:12 AM
  • System went into Naked Position mode, exposing leveraged positions
  • Engineering team chose fail-open mechanism to avoid panic-sell executions

More from Sunday 11 October →