Skip to content
OpenNodeFlow.DocsOpen beta ↗
Agent guide ↗
Docs/Agents & API

Durable data for agents

Use versioned records, exact correlation and leased queues to coordinate repeatable automation.

23 Oct 2026 · 3 min read
Markdown ↗

ONF provides durable workspace data for automation that outlives one agent turn or workflow run. Declared variables hold typed values within a workspace. Storage holds versioned records, conversations, questions and queued work within a workspace plus explicit namespace.

Select the right scope#

A runtime workflow cannot request another workspace through the supported variable/storage bridge. Choose a stable namespace for one automation rather than deriving it from a node label or a transient run ID. Administrative MCP tools take explicit workspace IDs; workspace organization does not add a user authorization boundary.

Lists intentionally omit full private bodies. Use onf_list_variables or storage metadata lists for navigation, then deliberately read the selected value/body only when needed. Known credentials can be redacted. Do not roundtrip redacted objects as replacements.

Write under the correct guard#

Variable updates use expectedRevision. Storage records/questions/queue entries use expectedVersion and operation-specific lease or confirmation fields. For new versioned records, the initial expected version is 0. A conflict is a reason to reread and reconcile; it is not permission to overwrite the current value.

Atomic variable operations include increment, append, compare-and-set and path update. They validate the complete result against the variable's declared contract. A variable binding identifies an exact existing variable/workspace/type; it is not inferred by name after deletion/recreation.

Storage writes commit independently and immediately. A later node error, cancellation or failed output validation does not roll them back. Run storage history can reveal accepted mutations even when the final node result failed.

Correlate questions before deciding#

A stored question carries exact business identity, outbound thread/reply anchors, offered option IDs, expiry and conversation identity. question.correlate reports matched, unknown, ambiguous, expired, closed, blocked or general outcomes. Only an exact matched result provides decision routing.

Use question.decide rather than a generic edit to select an option. It rechecks version, correlation, actor policy, expiry and the offered option, then records the decision and enqueues work atomically. Free text or a plausible thread name is not sufficient authority to choose an option.

Coordinate external work explicitly#

Queue progression is strict FIFO per conversation. Claiming returns a lease token; await queue.start immediately before external work, then acknowledge using the current token/version. Full ordinary reads do not reveal lease tokens. A failed or uncertain head cannot be silently skipped to process later work.

Use stable domain deduplication keys rather than new run IDs. Reusing a key for different content conflicts. After uncertain external completion, inspect the actual target and use an explicit recovery decision. Storage itself does not perform provider calls or guarantee exactly-once external effects.

Scoped clear destroys data and deduplication history and requires exact workspace/namespace confirmations. Retention pruning is separate and preserves relevant tombstones. Neither operation is an automatic repair for an agent error.

Source provenance

Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.

  • docs/STORAGE.md
  • docs/VARIABLES.md
  • docs/RUN-STORAGE-HISTORY.md
  • shared/storage-model.ts
  • server/platform-tools.ts
Type to search the documentation.
↑ ↓ to navigate · Enter to openAgent map ↗