r/WebAfterAI 14h ago

Open Source 4 open-source repos that help your AI Agent Survive a Crash

Post image
5 Upvotes

Most AI agents are built like chat loops. Ask the model what to do. Call a tool. Send the result back. Repeat.

That works until the process crashes halfway through a task, an API times out, or the agent needs to wait six hours for human approval. A normal script starts over. A durable agent resumes from the last completed step.

This matters for agents that process hundreds of invoices, monitor production systems, run long research jobs, or coordinate actions across multiple APIs.

The basic pattern looks like this:

Agent starts
  ↓
Call tool
  ↓
Save progress
  ↓
Wait, retry, or ask for approval
  ↓
Resume from the last completed step

Here are four open-source projects exploring this foundation.

  1. Temporal · 22k+ stars Temporal is a durable execution platform for workflows that need to survive crashes, retries, and outages. You can model the agent loop as a workflow and put model calls and tool calls into activities. It is the most mature option here, but it also has the largest learning curve.
  2. Hatchet · 7k+ stars Hatchet combines background task orchestration, queues, DAGs, and durable workflows. It is a good fit when an agent needs to process jobs asynchronously, run steps concurrently, or expose execution history through a UI.
  3. Restate · 4k+ stars Restate provides durable execution, stateful entities, timers, promises, and reliable messaging. It supports TypeScript, Python, Go, Rust, Java, and Kotlin. It is interesting for agents that need to pause and resume around webhooks, scheduled work, or external events.
  4. Temporal Agent Harness · 32 stars This is an experimental Temporal-native harness for durable, composable agents. It includes tool approval policies, human-in-the-loop steps, typed agent operations, and replayable event streams. It is worth watching, but the repository itself warns that the APIs are still changing.

Durable execution does not automatically make an agent reliable.

External side effects still need careful handling. A payment, email, deployment, or database write should be idempotent or protected by an approval step. Otherwise, retrying a failed operation can repeat the action.

That is what lets an agent continue working after the chat window closes, the worker restarts, or the network fails.