Task Lifecycle
The defined states an AI agent task moves through — received, in-progress, awaiting-approval, completed, failed, expired — and the events that drive each transition.
Production AI is not a prompt. It is a system of context, tools, permissions, traces, evals, and feedback loops.
What it is
The task lifecycle is the explicit state machine for an agent task. Instead of treating tasks as 'fire and forget,' the runtime tracks every task through defined states: received, in-progress, awaiting-approval, awaiting-tool, completed, failed, cancelled, expired. Each transition is logged. Each state has expected next-states and SLAs.
Why it matters
Without an explicit lifecycle, long-running tasks become unobservable: you can't tell whether a task is still running or stuck, whether an approval is awaiting human or has timed out, whether a tool call is mid-retry or abandoned. Explicit states make all of that queryable.
How it works
The runtime persists task state; transitions emit events; approval inboxes track 'awaiting-approval' tasks with SLAs; expired tasks follow declared default actions. Substrates like Temporal and Inngest build durable-execution patterns around this lifecycle. Bespoke runtimes implement it explicitly with a database-backed state machine.
Related resources
The engine that runs an AI agent workflow as a durable, observable, restartable process instead of a one-shot script — what separates an agent demo from an agent deployment.
The execution engine that turns an AI agent from a chat-window demo into a long-running, event-driven, restartable process you can trust with real operations.
A point in an AI workflow where an action is suspended until a human reviews and approves, rejects, or modifies it.
Deterministically re-running an AI workflow from its stored trace — the debugging primitive that makes 'why did the agent do that' a question with an answer.