Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(storage): document tinyflows stores on the storage backend

Steven Enamakel654eaf530765
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.md
index 1720daed6d..2ebd49c5e5 100644
--- a/crates/openhuman-core/src/cron/README.md
+++ b/crates/openhuman-core/src/cron/README.md
@@ -231,6 +231,16 @@ missing row, reschedules a drifted one, and removes the retired
`memory_context_refresh` row. It runs from [`core/runtime/services.rs`](../core/runtime/services.rs) and from
[`security/credentials/ops/user_scope.rs`](../security/credentials/ops/user_scope.rs).
+### On a storage backend
+
+With a storage backend configured (`OPENHUMAN_STORAGE_URL` / `[storage] url`,
+see `crate::storage`), every `store` function is served by
+`tinyflows_drivers::schedule::CronDocuments` instead of `cron/jobs.db`: the
+same jobs and runs on the document port, in the acting agent's storage scope,
+with the same history cap and due-job batch size. `reschedule_after_run`
+advances a job only if its stored schedule still matches the job that fired,
+so two processes sharing one database don't double-advance it.
+
## Layout
| Path | What it does |
diff --git a/crates/openhuman-core/src/flows/README.md b/crates/openhuman-core/src/flows/README.md
index a4ed70dc04..8b43c155ce 100644
--- a/crates/openhuman-core/src/flows/README.md
+++ b/crates/openhuman-core/src/flows/README.md
@@ -233,6 +233,19 @@ so the digest subscriber, `flows_delete`, the `memory` node adapter
(`tinyflows::memory_adapter::OpenHumanMemory`) and the agent tools all tag the
same way.
+### On a storage backend
+
+With a storage backend configured (`OPENHUMAN_STORAGE_URL` / `[storage] url`,
+see `crate::storage`), the catalog (`store.rs`), drafts (`draft_store.rs`),
+per-flow state and the run checkpointer move off `flows/flows.db`,
+`flows/drafts/` and `flows/checkpoints.db` onto the document port, in the
+acting agent's scope: `tinyflows_drivers::catalog::FlowCatalogDocuments`,
+`FlowStateDocuments` (through `tinyflows/state.rs`'s `FlowState`, which the
+engine's `StateStore` and the dedup settlement share) and
+`DriverCheckpointer`. When the scope cannot be resolved (SaaS mode with no
+acting agent) flow state fails every call rather than falling back to the
+local file.
+
## Layout
Top level:
diff --git a/crates/openhuman-core/src/storage/README.md b/crates/openhuman-core/src/storage/README.md
index af7526a703..e8914e9b6f 100644
--- a/crates/openhuman-core/src/storage/README.md
+++ b/crates/openhuman-core/src/storage/README.md
@@ -52,6 +52,15 @@ on `storage-mongodb`.
approvals (`security::approval`), paired devices (`security::devices`),
notifications (`desktop::notifications`) and task sources
(`integrations::task_sources`).
+- tinyflows' own stores on the ports (`tinyflows-drivers`), picked per call
+ the same way: cron jobs and runs (`cron::store`, `CronDocuments`), the flow
+ catalog and drafts (`flows::store`, `flows::draft_store`,
+ `FlowCatalogDocuments`), per-flow engine state and dedup settlement
+ (`flows::tinyflows::state::FlowState`), and the flow-run checkpointer
+ (`DriverCheckpointer`). The delegation graph's checkpointer uses
+ tinyagents-graph's `DriverCheckpointer`.
+- `block_on_anyhow(future)`: `block_on` for those stores, whose errors are
+ `anyhow::Error` (a typed `FlowUpdateError` passes through unchanged).
## Boundaries