Skip to content

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

docs(agent): add README for tinyagents module

Steven Enamakel45e65f39f790
diff --git a/crates/openhuman-core/src/agent/tinyagents/README.md b/crates/openhuman-core/src/agent/tinyagents/README.md
index 07b5b43eca..0fe1af9c4e 100644
--- a/crates/openhuman-core/src/agent/tinyagents/README.md
+++ b/crates/openhuman-core/src/agent/tinyagents/README.md
@@ -16,7 +16,15 @@ The **adapter seam** between OpenHuman and the vendored [`tinyagents`](../../../
| File / group | Role |
| --- | --- |
-| `mod.rs` + `mod_part_01..05.rs` | Module root (`include!`-assembled). `mod_part_01.rs`: imports and re-exports (`TurnContextMiddleware`, `HandoffConfig`, `TranscriptSnapshotSink`, `SubagentScope`, `resolved_route::*`), `ToolPolicyEnforcement`, `TinyagentsTurnOutcome`, run-policy and wall-clock helpers, and the `#[cfg(test)]`-only `run_turn_via_tinyagents`. `mod_part_02.rs`: `run_turn_via_tinyagents_shared`, the single entry point every production caller uses. `mod_part_03.rs`: `TurnModels` (primary + tier routes + summarizer) and `TurnModelSource`, whose `build`/`build_summarizer` construct crate-native models from `(role, config)` via `build_turn_models_crate`. `mod_part_04.rs`: `assemble_turn_harness`, which registers models, tools, and middleware in order. `mod_part_05.rs`: `record_unobserved_turn_usage`, the cost-tracker fallback for turns with no `on_progress` observer. |
+| `mod.rs` | Module root: declares submodules and re-exports (`TurnContextMiddleware`, `HandoffConfig`, `TranscriptSnapshotSink`, `SubagentScope`, `resolved_route::*`, `ToolPolicyEnforcement`, `TinyagentsTurnOutcome`, `TurnModelSource`/`TurnModels`, `run_turn_via_tinyagents_shared`). |
+| `turn_policy.rs` | `ToolPolicyEnforcement`, run-policy construction, and wall-clock-ceiling helpers (`agent_turn_wall_clock_ms` and friends). |
+| `turn_runner.rs` | `run_turn_via_tinyagents_shared`, the single entry point every production caller uses, plus the `#[cfg(test)]`-only `run_turn_via_tinyagents`. |
+| `turn_models.rs` | `TurnModels` (primary + tier routes + summarizer) and `TurnModelSource`, whose `build`/`build_summarizer` construct crate-native models from `(role, config)` via `build_turn_models_crate`. |
+| `harness_assembly.rs` | `assemble_turn_harness`, which registers models, tools, and middleware in order. |
+| `harness_tool_registration.rs` | Tool + agent capability-registry projection consumed by `assemble_turn_harness`. |
+| `turn_outcome.rs` | `TinyagentsTurnOutcome`, `HaltSummarySlot`, `ToolOutcomeSink`, and `record_unobserved_turn_usage`, the cost-tracker fallback for turns with no `on_progress` observer. |
+| `turn_run_error.rs` | Maps a failed harness run onto the typed OpenHuman error `run_turn_via_tinyagents_shared` returns. |
+| `turn_run_finalize.rs` | Turns a completed harness run into a `TinyagentsTurnOutcome` on the success path (journal completion, compaction diagnostics, the terminal `TurnCompleted` event). |
| `host/` | OpenHuman's implementations of the crate's ten host-capability traits: `agent_memory`, `budget_gate`, `context_composer`, `definition_registry`, `experience_store`, `learning_sink`, `model_resolver`, `progress_sink`, `security_gate`, `tool_outcome_classifier`. Each file adapts one trait onto the OpenHuman domain that implements it. |
| `replay/` | Read-only agent-run replay/status RPC (`mod.rs`, `ops.rs`, `schemas.rs`): three `agent`-namespace controllers over `journal.rs`. |
| `journal.rs` | `TurnJournal` and `FileStatusStore`: a crate `StoreEventJournal` over a JSONL append store plus a `HarnessStatusStore` writer under `{workspace}/tinyagents_store`. Attached alongside the live `observability` bridge as an independent `EventSink` subscriber, wrapped in `RedactingSink`; best-effort and non-fatal. |