Undead Agent - My AI Agent Dies, Comes Back, and Tells Me What It Saw
Description and use
The Undead Agent shows how a local AI can survive process termination by using Temporal durable workflows to resume from the last checkpoint, avoiding redundant model calls and providing a ghost‑style narration.
Problem
AI agents performing long multi‑step jobs often crash, causing the entire job to restart and incur repeated model calls.
Outcome
The Undead Agent demonstrates that a local AI workflow can be made resilient to process termination by separating disposable workers from durable workflow state. The agent resumes exactly where it left off, avoiding redundant model calls and providing a ghost‑style narration of its last moments.
Workflow
- Install Ollama and pull Gemma model
- Start Temporal dev server
- Run keepalive script
- Run dashboard
- Run client to trigger job
- Kill the agent via dashboard
- New worker resumes workflow from last checkpoint
- Ghost narrates last state
- Agent completes remaining steps and writes report
Evidence
Every step runs as a durable Temporal workflow, so if the process is killed mid‑thought, a brand new process takes over the workflow without redoing any finished work.
The agent itself is a short Temporal workflow. It lists the files, summarizes each one as its own activity, then writes the report.
- Record date: 2026-11-01T12:14:01.510Z