Long-Running Agent
Simple Definition
A Long-Running Agent is an AI agent designed to keep working toward a goal over an extended period, minutes, hours, or longer, while preserving its progress and state along the way, rather than completing a single short task and stopping.
What Long-Running Agents Require
- Persistent state, so progress survives interruptions instead of resetting
- Checkpoints, saved points the agent can resume from
- Budget limits, caps on time, cost, or steps so the agent doesn’t run indefinitely
- Progress logs, a record of what’s been done and what’s left
- Retries, a defined way to recover from a failed step without losing everything before it
- Stop conditions, clear rules for when the agent is actually done or should give up
- Resumable sessions, the ability to pause and pick back up later
- Durable files, work saved somewhere that outlives any single execution
- Human escalation, a path to hand off when the agent gets stuck
- Verification, checking that long stretches of unsupervised work are actually correct, not just completed
Why It Matters
A short task that goes wrong wastes a few minutes. A long-running agent that goes wrong without checkpoints, budgets, or verification can waste hours of compute, drift far off course before anyone notices, or take a large number of small wrong actions that compound into a serious problem. The infrastructure listed above exists specifically to catch that early instead of after the fact.
Example
A long-running agent tasked with migrating a large codebase might checkpoint its progress after each module, log what it changed and why, stop and ask for review if test failures exceed a threshold, and resume from the last checkpoint rather than starting over if the session is interrupted.
Related Terms
- Task Budget, the limit that keeps a long-running agent from running away
- Agent Sandbox, the boundary a long session should still respect throughout
- Human-in-the-Loop, the escalation path when the agent gets stuck
- Agent Swarm, multiple long-running agents working in parallel
- AI Loop, the repeating structure that keeps a long-running agent moving
- Verification Gate, the check that should apply throughout, not only at the end
- Persistent Agent State, the specific information that gets checkpointed and resumed
- Event-Driven Agent, an agent that idles between triggers rather than running continuously
Continue learning
Explore related guides, tools, workflows, and prompts that help you go deeper into this topic.
Browse all AI terms.
Learn termSee these concepts in practice.
Open workflowA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termA simple explanation of this AI concept.
Learn termSee AI terms in action
Browse practical AI workflows that use the concepts in this glossary.
Last updated: