Skip to content

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

docs: update agent orchestration docs for TinyAgents migration

Steven Enamakel4b0ec2a4810f
diff --git a/docs/gitbooks/en/developing/architecture/agent-harness.md b/docs/gitbooks/en/developing/architecture/agent-harness.md
index 64a60ba256..3a36dbac51 100644
--- a/docs/gitbooks/en/developing/architecture/agent-harness.md
+++ b/docs/gitbooks/en/developing/architecture/agent-harness.md
@@ -107,7 +107,7 @@ OpenHuman depends on the split TinyAgents 2.1 crate family by path into the vend
- `sqlite` feature enabled with one native sqlite chain. OpenHuman's root and Tauri Cargo worlds pin `rusqlite = "=0.40.2"` (`bundled`); the pinned Rust 1.96 toolchain provides the `cfg_select!` macro its build script needs. Both worlds resolve to a single `libsqlite3-sys` chain. Durable graph checkpoints run through TinyAgents' own `SqliteCheckpointer` (see [`orchestration/delegation.rs`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/orchestration/delegation.rs)).
- WhatsApp Web storage bridge. `whatsapp-rust`'s Diesel-backed `sqlite-storage` feature links sqlite separately from rusqlite 0.40, so the optional `whatsapp-web` feature (forwarded to `tinychannels/whatsapp-web`) builds against `wacore::store::InMemoryBackend` and logs that sessions are not durable. Web sessions stay non-persistent until a rusqlite-backed durable WhatsApp store exists.
- No scripting runtime. There is no `repl` or Rhai scripting feature and no `rhai_workflows` tool. Rhai still appears as a dependency of `tinyflows` for its own JSON-query stack, unrelated to the agent harness.
-- Ownership map: model construction → `inference::provider::create_chat_model*`; durable graph checkpoints → TinyAgents' `SqliteCheckpointer`; generic detached executor state → `DetachedTaskRegistry`; controller-facing durability → OpenHuman SQL/JSON run ledgers (`running_subagents`, `workflow_runs`, `command_center`). The generic harness/graph/middleware/event primitives are used as-is.
+- Ownership map: model construction → `inference::provider::create_chat_model*`; durable graph checkpoints → TinyAgents' `SqliteCheckpointer`; generic detached executor state → `DetachedTaskRegistry`; controller-facing projections → OpenHuman sub-agent sessions and command center. TinyAgents provides the generic harness, graph, middleware, and event primitives.
The agent harness is the runtime that turns a user message (or a webhook fire, or a cron tick) into a complete, tool-using LLM interaction. It owns the tool-call loop, sub-agent dispatch, the trigger-triage pipeline, and the hook surface around them. It does not own provider HTTP transport, tool implementations, prompt-section assembly or memory storage. Those are separate domains the harness composes.
diff --git a/docs/module-boundary-inventory.md b/docs/module-boundary-inventory.md
index 0a54b1e592..844087340b 100644
--- a/docs/module-boundary-inventory.md
+++ b/docs/module-boundary-inventory.md
@@ -536,8 +536,8 @@ Behaviour notes: a job's policy is read from the job document (an unreadable job
the flows code stays compiled in. On the next core start it narrows
`DomainSet::flows` (no flow trigger or run-digest subscribers, no boot
reconcile), turns the `workflows` tool group off, and answers every `flows.*`
-RPC with `COMPONENT_DISABLED:flows`. `about_app` reports the `flows` and
-`workflow_runs` capability domains as disabled. TinyFlows is a plain library
+RPC with `COMPONENT_DISABLED:flows`. `about_app` reports the `flows` capability
+domain as disabled. TinyFlows is a plain library
gitlink with no registry record, so `modules.list` has no row for it.
Relation to `cron.enabled`: independent switches. With `flows = false` the
diff --git a/docs/plans/migrate-agent-orchestration-to-tinyagents.md b/docs/plans/migrate-agent-orchestration-to-tinyagents.md
index fff8a6bf8a..9ff3a89c4e 100644
--- a/docs/plans/migrate-agent-orchestration-to-tinyagents.md
+++ b/docs/plans/migrate-agent-orchestration-to-tinyagents.md
@@ -1,142 +1,11 @@
-# Extract `tinyagents-orchestration`
+# TinyAgents orchestration migration
-> **Status, verified 2026-10-07:** landed except O6, which would add
-> `tinyagents-orchestration/src/parallel/`. See [`README.md`](README.md) for
-> the whole set and how to re-check it.
+The host-neutral orchestration primitives have moved to TinyAgents. OpenHuman
+retains adapters for product policy, agent execution context, detached-task
+projection, progress, and worktree isolation.
-Create the correctly spelled `vendor/tinyagents/crates/tinyagents-orchestration`
-workspace crate for host-neutral *composition* of agent work. It is not a new
-task registry, graph runtime, session database, tool package, or policy layer.
-
-## Non-negotiable boundary
-
-`tinyagents-orchestration` may depend on `tinyagents-harness`,
-`tinyagents-graph`, and `tinyagents-session`. Those three crates must not depend
-back on it. OpenHuman continues to depend directly on all four where it uses
-their APIs. Do not add forwarding modules or re-export moved APIs from
-`crate::agent::orchestration`.
-
-Existing owners remain authoritative:
-
-- graph: `DetachedTaskRegistry`, task stores/reconciliation/steering,
- DAG/map-reduce/workspace claims, checkpointing and delegation graph;
-- harness: subagents, cancellation/steering, workspace interfaces and git
- worktrees;
-- session: durable sessions, run ledger, workflow rows and CAS;
-- OpenHuman: config, policy/security/approval, concrete execution adapters,
- BUS/progress/chat projection, persistence-root wiring, RPC schemas, tools,
- worktree policy and product prompt/catalog choices.
-
-## Public API
-
-The crate exposes host-neutral workflow composition and execution seams, never
-OpenHuman values:
-
-```rust
-pub trait WorkflowStore: Send + Sync { /* load/upsert workflow snapshots */ }
-#[async_trait]
-pub trait WorkflowExecutor: Send + Sync {
- async fn execute(&self, request: WorkflowChildRequest,
- cancel: CancellationToken) -> Result<WorkflowChildResult, OrchestrationError>;
- async fn cancel_children(&self, child_ids: &[String]);
-}
-```
-
-Provide `workflow::{WorkflowDefinition, WorkflowPhase, validate,
-WorkflowEngine, WorkflowState, scheduler_graph}`. A `session-ledger` convenience adapter may
-wrap `tinyagents_session::run_ledger` with a caller-supplied workspace path;
-the host still chooses that path. Safety tier admission, agent lookup, tool
-visibility and worktree choice are inputs already authorized by the host, not
-crate decisions.
-
-## Cargo files and graph
-
-Add `crates/tinyagents-orchestration/Cargo.toml`, register it in
-`vendor/tinyagents/Cargo.toml` default members, and use direct dependencies on
-`anyhow`, `serde`, `serde_json`, `tokio`, `uuid`,
-`tinyagents-harness`, `tinyagents-graph`, and `tinyagents-session`. Forward a
-single optional `tracing` feature to the three TinyAgents crates. Do not add
-`tinytools` unless a public signature needs it, and do not enable graph SQLite
-for ordinary workflow state.
-
-## File map
-
-| OpenHuman source | Destination / action |
-| --- | --- |
-| `agent/orchestration/workflow_runs/{types,graph}.rs`, pure `ops.rs` | Move to `src/workflow/{types,validate,graph}.rs`. Built-in host catalog and schema wiring stay. |
-| `workflow_runs/engine/{state,scheduler,cancel}.rs` | Move to `src/workflow/`. |
-| `workflow_runs/engine/{phase_exec,lifecycle}.rs` | Split generic bounded fanout/state machine to crate; keep `Config`, `AgentOrchestrationSession`, origin propagation, root parent, spawn and host persistence adapter. |
-| `spawn_parallel_graph/request.rs` | Move only typed request validation to `src/parallel/request.rs`; do not move tool JSON parsing unless it becomes a typed boundary. |
-| `spawn_parallel_graph/graph.rs` | Keep only a callback coordinator if it adds value; otherwise delete it and call graph `parallel::map_reduce` directly. |
-| `spawn_parallel_graph/{types,staging,dispatch,workers,collect,run}.rs` | Keep OpenHuman: definition/tool-policy inspection, worktree prep, execution, AgentProgress and file-state projection. |
-| `worktree.rs` aliases | Delete aliases and import `tinyagents_harness::workspace::{create_git_worktree, GitWorktreeBaseRef, ...}` directly. Keep only OpenHuman's BUS/policy-id adapter and schemas. |
-| `ops.rs`, `types.rs`, `delegation.rs`, `parent_context/**`, `running_subagents/**`, `subagent_sessions/**`, `background_*`, `run_ledger_finalize.rs`, `subagent_events.rs`, `command_center/**`, `subagent_control.rs`, all `tools/**`, all RPC schemas | Keep in OpenHuman. |
-
-## TDD slices
-
-### O1 — crate skeleton and architecture gate
-
-**RED:** Add a dependency-boundary test proving the new crate has no OpenHuman
-dependency and no reverse edge from graph/harness/session. Add a compilation
-test importing its empty public modules.
-
-**GREEN:** Add the manifest, `lib.rs`, documentation and feature forwarding.
-Verify `cargo metadata --manifest-path vendor/tinyagents/Cargo.toml --no-deps`
-and `cargo test -p tinyagents-orchestration`.
-
-### O3 — workflow definitions and scheduler
-
-**RED:** Add fake-store/executor tests for duplicate/missing/cyclic/empty
-phases, invalid concurrency, deterministic dependency order, upstream context,
-synthesis fallback, scheduler topology and no-runnable failure.
-
-**GREEN:** Move workflow definitions, validation, state helpers and scheduler
-graph. Keep host safety-tier authorization outside the generic plan.
-
-### O4 — workflow engine fanout, cancel and resume
-
-**RED:** Port the behavior from `workflow_runs/engine_tests.rs`: bounded
-concurrency, global child-cap failure, partial-output failure, cancellation
-during a phase, terminal persistence, and resume skipping complete phases.
-
-**GREEN:** Implement `WorkflowEngine<S,E>` using graph `map_reduce` and a
-`CancellationToken`; it returns a future for the host to spawn in its own
-origin/parent context.
-
-### O5 — OpenHuman adapters and direct import cutover
-
-**RED:** Preserve OpenHuman integration tests for workflow policy denial,
-BUS/progress lifecycle, durable run rows and RPC wire shapes. Add
-grep/checker coverage rejecting moved API re-exports.
-
-**GREEN:** Implement minimal host adapters, migrate direct consumers and
-topology registration, delete moved code and aliases in the same change.
-
-### O6 — parallel/worktree cleanup
-
-**RED:** Preserve `spawn_parallel_agents` policy tests and dirty-worktree
-removal/refusal tests.
-
-**GREEN:** Move only typed neutral request logic; replace all worktree aliases
-with direct harness imports. Keep policy/worktree/BUS behavior host-side.
-
-## Verification and PR order
-
-For each TinyAgents slice run:
-
-```bash
-cargo test --manifest-path vendor/tinyagents/Cargo.toml -p tinyagents-orchestration
-cargo test --manifest-path vendor/tinyagents/Cargo.toml -p tinyagents-graph -p tinyagents-session
-cargo check --manifest-path vendor/tinyagents/Cargo.toml --workspace
-```
-
-For the host cutover run `pnpm debug rust workflow_run`,
-`pnpm debug rust spawn_parallel_agents`, `cargo check
---manifest-path Cargo.toml`, `pnpm rust:layout`, and `pnpm docs:check`. Use
-`scripts/ci-cancel-aware.sh` for long workspace gates and never export
-`CARGO_TARGET_DIR`.
-
-Land in order: (1) session migration PR where its API is needed; (2) TinyAgents
-new-crate PR; (3) OpenHuman gitlink update and direct-import cutover PR. Each
-submodule branch/PR is against canonical upstream before the parent gitlink is
-published; no nested worktrees, squashing, aliases or shims.
+The remaining OpenHuman orchestration module is documented in
+[`agent/orchestration/README.md`](../../crates/openhuman-core/src/agent/orchestration/README.md).
+TinyFlows remains the supported workflow product for building and running
+user-authored flows. The former graph workflow-run host and its RPC surface
+have been retired.