Skip to content

Deploy and operate

Storage

Storage answers what survives a restart. A host answers who can execute now. Keeping conversation history and recovering unfinished work are separate choices; a database alone does not start workers or drive recovery.

Persistence and execution ownership. A durable host owns execution and uses storage to retain canonical history and the current state of unfinished Runs.
  • Yielded Agent: Durable hostLive ownership and execution
  • Yielded Agent: Storage adapterAtomic persistence
  • External: Thread historyAppend-only facts
  • External: Unfinished workCurrent checkpoints and obligations
  • Durable host to Storage adapter
  • Storage adapter to Thread history
  • Storage adapter to Unfinished work
Need Assembly
Conversation within one application Scope InMemory.layer
Successful Runs retained across restarts PersistentHistory.layer with SQLite or PostgreSQL
Accepted work recovered after interruption Node or Cloudflare durable host

For example, a chat that only needs yesterday’s completed conversation can use persistent history. An accepted research job that must continue after process loss needs durable execution. Both reuse a Thread ID for follow-ups.

Durable storage retains canonical history, current execution checkpoints, admissions, and unresolved operations. Settlement deletes the finished Run’s checkpoint. Applications own disposable query projections over canonical records. Every backend requires one live owner per Thread; PostgreSQL does not add distributed ownership.

Export an idle Thread with streamExport, keep the source quiescent until all pages are saved, then import the completed archive into an empty destination Thread. Pending work, approvals, unknown outcomes, or deliveries can prevent export. See operations for the procedure.

Adapters reject unsupported or ambiguous storage layouts and record formats without changing the store.

Recognized SQL layout upgrades preserve unfinished work and continue an incomplete work-index transition in bounded discovery passes. Cloudflare maintenance schedules the next pass while progress continues. This does not replay operations whose external outcome is unknown; missing or damaged indexes still require explicit repair.

@yielded/agent-storage-sql provides shared SQL implementations. Durable adapters must co-own the Thread log, Submission ledger, and atomic settlement publisher. Peer messages, worker reports, and parent updates also require a paired delivery store: their frozen source records and initial outbox rows commit atomically under the same owner and capacity limits. Start with the package map and adapter verification.