Long-horizon agents can pursue outcomes that take days or weeks, making labor-intensive work such as customer onboarding, purchasing, and healthcare coordination more practical. Unlike conventional automation for predictable processes, these agents navigate changing circumstances through repeated decisions, tool calls, and waits for people or external systems. A stock-replenishment example illustrates the pattern: the agent obtains supplier quotes, seeks a manager’s approval, places an order, handles supplier messages, and tracks delivery. Its loop combines a goal, tools, current state, and a model that chooses the next action; code restricts which tools are allowed, keeping critical business rules out of the model’s discretion.
Durable execution makes such long-running loops recoverable. A runtime such as Temporal records results from interactions with the outside world, then replays the workflow after a crash, reconstructing state while skipping completed steps. Activities perform external calls, while durable waits let the process pause for approvals, replies, or deliveries. This resembles event sourcing, but persistence does not guarantee correctness: a system may not know whether an external action succeeded, the world may change during a wait, and retries can repeat calls, so side effects need careful handling. Long-running tasks also raise concerns about deploying code changes mid-run and deciding what information to retain in agent memory or show the model. Durable execution addresses interruption and recovery, not the harder questions of sound decisions and reliable interaction with a changing world.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.