Anchor — the Durable Execution Engine for Mission-Critical AI Agents
Описание и применение
Anchor обеспечивает отказоустойчивость многопроцессных ИИ‑агентов, предотвращая двойные платежи, дублирование писем и лишние токены. Он использует атомарные журналы в PostgreSQL, эпохальный контроль доступа и очередь ручного обзора для небезопасных действий.
Задача
AI agents executing multi‑step workflows crash due to OOM, redeploys, spot preemption, or network drops, causing duplicate side‑effects, lost state, and wasted token costs.
Результат
Anchor reduces duplicate token costs by >$12k/month, eliminates double‑billing and spam, and removes the $5k+ infrastructure tax of external orchestrators. It achieves sub‑second recovery and guarantees idempotent side‑effects.
Рабочий процесс
- 1. Install Anchor:
pip install anchor-runtime anchor dev - 2. Define tools with
@anchor.tool(specify safety and idempotency) - 3. Define an agent with
@anchor.agentand yieldanchor.ToolCallfor each step - 4. Run the agent; Anchor writes TOOL_INTENT and TOOL_RESULT entries to PostgreSQL
- 5. On crash, a secondary worker acquires the lease, checks the journal, and replays completed steps
- 6. If a tool was unsafe and crashed mid‑execution, Anchor sets run to
needs_review; operators resolve viamark_executedormark_not_executed
Доказательства
Unmanaged retries waste over $12,400/month in duplicate prompt tokens
Anchor atomically writes a TOOL_INTENT journal entry to PostgreSQL
If a worker process dies mid‑execution, the secondary worker checks the journal on recovery—replaying completed steps in <5ms
- Дата записи: 2026-09-08T06:14:45.101Z