NAVIN
RESEARCH

智能体 / NAVIN RESEARCH

Build Long-Running AI Agent Jobs That Can Resume Safely

Use checkpoints, idempotent tools, bounded retries, and cancellation for tasks that outlive one request.

0:00分钟阅读

Use checkpoints, idempotent tools, bounded retries, and cancellation for tasks that outlive one request.

简要回答: Persist explicit workflow state after meaningful steps instead of relying on a live model session. Each resumable step should have an idempotency key, recorded inputs, result status, and a clear rule for retry or human escalation.

实施步骤

  1. Represent the job as a state machine with terminal and recoverable states.
  2. Checkpoint tool outputs and decisions, excluding hidden reasoning.
  3. Propagate deadlines and cancellation to workers and external calls.
  4. Resume from the last verified state using current credentials and policy.

验证清单

  • Kill the worker between every pair of steps and resume.
  • Replay callbacks and confirm side effects are not duplicated.
  • Verify expired permissions stop the resumed job safely.

常见错误

  • Keeping progress only in conversation history.
  • Unlimited automatic retries.
  • Marking a timeout as success because partial prose exists.

实际决策

先交付能够通过上述检查的最小设计。记录测试中使用的模型、提示词、工具、数据集与运行时版本,让后续变化可以被比较而不是被猜测。依赖供应商的限制、模型名称、价格或预览功能之前,请重新检查链接文档;这些细节变化往往快于本文的工程原则。