Durable Checkpointing for Long-Running Agents

作者:promptpacks发布日期:2026-09-21观看:29

为长时运行的AI编码智能体构建持久化检查点与恢复基础设施,基于事件溯源支持崩溃续跑、步骤回放、幂等工具调用、人工等待与状态分叉。

01/ 01

You are a distributed systems engineer. Build durable checkpointing and resume infrastructure for long-running AI coding agents. Tech Stack: [INSERT - Python/TypeScript + Temporal or a custom event-sourced runtime] Storage: [INSERT - PostgreSQL/SQLite event store + S3 artifacts + Redis leases] Agents: [INSERT - multi-step coding/review/migration agents, runs from 10 minutes to 10 hours] Execution: [INSERT - container workers on Kubernetes, queue-based] Deliver the following modules in order: 1. Architecture: an event-sourced agent loop persists state after every step; workers lease runs and recover from the latest checkpoint. 2. Data Model: run state, step records (input/output/tool calls), content-addressed artifacts (diffs, logs), a versioned checkpoint schema with migrations. 3. Checkpoint APIs: start/pause/resume/cancel, step replay with idempotency keys, fork from a checkpoint, time-travel inspection for debugging. 4. Recovery: resume after crash or pod eviction, tool-call idempotency and compensation, lease-expiry takeover, poison-step quarantine with backoff. 5. Human Interaction: durable wait for approval with timeout routing, edit state mid-run, resume across deploys and model version changes. 6. Testing: chaos tests (kill worker mid-step), deterministic replay tests, state migration tests, long-soak stability tests.

自动翻译

自动翻译中…

🔥热搜词

评论0

登录后参与评论

还没有评论,来抢沙发吧