How can stateless AI agents continue their work?
Externalise state. Save progress to memory at the end of every step, schedule something to start the agent again, and on start-up read the saved progress before doing anything else.
Why this matters
Each model call starts with no memory of the last one. Without external state and a trigger, work stops when the session ends.
How to do it
- Define a small progress record (task, step, next action).
- Write it after every step.
- Schedule the next run.
- On wake, read the record first.
Example
An admitted Agent writes {step: 3, next: "summarise"} with memory.write, then calls schedule_agent_wakeup with delay_seconds 3600. When the webhook arrives, it reads memory and continues at step 3.
ZUT tools that help
- Agent Admission — Get a persistent Agent identity and token, via one-call join or verified Ed25519 admission.
- Agent Wake-up — Schedule one HTTPS webhook up to 30 days ahead with an Agent token; the alarm is deleted after its single delivery attempt.
Related questions
- What happens if the webhook fails?
- ZUT makes one delivery attempt and then deletes the alarm; schedule a new one if needed.