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 Enamakel50b2cce8a41b
diff --git a/crates/openhuman-core/src/agent/tinyagents/README.md b/crates/openhuman-core/src/agent/tinyagents/README.md
index 0fe1af9c4e..3ebb247865 100644
--- a/crates/openhuman-core/src/agent/tinyagents/README.md
+++ b/crates/openhuman-core/src/agent/tinyagents/README.md
@@ -29,7 +29,7 @@ The **adapter seam** between OpenHuman and the vendored [`tinyagents`](../../../
| `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. |
| `reaper.rs` | `reap_orphaned_runs`: startup sweep that marks non-terminal runs `Cancelled` in the durable status store. The only writer over the status seam that `replay/` reads. |
-| `middleware.rs` + `middleware_part_01..07.rs` | The named OpenHuman middleware stack. `part_01`: `TurnContextMiddleware` (bundles config and installs the enabled hooks), `TranscriptSnapshotMiddleware`, `HandoffConfig`/`HandoffMiddleware` (oversized sub-agent results stashed for `extract_from_result`), `PromptCacheSegmentMiddleware`, `ToolOutputMiddleware` (per-result byte cap and optional payload summarizer). `part_02`: `ApprovalSecurityMiddleware`, `CliRpcOnlyMiddleware`. `part_03`: the `ToolPolicyMiddleware` impl (records blocks into `crate::tools::registry::denials`), `ToolOutcomeCaptureMiddleware`, `EmbedderToolHooksMiddleware`, `ArgRecoveryMiddleware`, `MemoryProtocolMiddleware`. `part_04`: `CostBudgetMiddleware`, `RepeatedToolFailureMiddleware`, `TerminalInferenceFailure`. `part_05`: inference/delegation failure-envelope markers, `RepeatProgressMiddleware`, `ImageAwareMessageTrimMiddleware`. `part_06`: `FinalCallWrapUpMiddleware` and `ArtifactIndexTocMiddleware` (issue #6014). `part_07`: `CredentialScrubMiddleware` (issue #4453) and the `ToolPolicyMiddleware` struct. |
+| `middleware.rs` + `middleware/` | The named OpenHuman middleware stack. `turn_context.rs`: `TurnContextMiddleware` (bundles config and installs the enabled hooks), `TranscriptSnapshotMiddleware`/`TranscriptSnapshotSink`, `HandoffConfig`/`HandoffMiddleware` (oversized sub-agent results stashed for `extract_from_result`). `prompt_cache.rs`: `PromptCacheSegmentMiddleware`. `tool_output.rs`: `ToolOutputMiddleware` (per-result byte cap and optional payload summarizer). `approval.rs`: `ApprovalSecurityMiddleware`. `cli_rpc_only.rs`: `CliRpcOnlyMiddleware`. `tool_policy.rs`: the `ToolPolicyMiddleware` struct and impl (records blocks into `crate::tools::registry::denials`). `tool_outcome_capture.rs`: `ToolOutcomeCaptureMiddleware`. `embedder_hooks.rs`: `EmbedderToolHooksMiddleware`. `arg_recovery.rs`: `ArgRecoveryMiddleware`. `memory_protocol.rs`: `MemoryProtocolMiddleware`. `cost_budget.rs`: `CostBudgetMiddleware`. `repeated_failure.rs`: `RepeatedToolFailureMiddleware`. `loop_guards.rs`: `TerminalInferenceFailure`. `repeat_progress.rs`: `RepeatProgressMiddleware`. `message_trim.rs`: `ImageAwareMessageTrimMiddleware`. `final_call_wrap_up.rs`: `FinalCallWrapUpMiddleware`. `artifact_index_toc.rs`: `ArtifactIndexTocMiddleware` (issue #6014). `credential_scrub.rs`: `CredentialScrubMiddleware` (issue #4453). |
| `model.rs` | Helpers and wrappers over native crate `ChatModel` values: message/response translation, usage merging, stream-delta forwarding, `MaxTokensModel`, `ProfileOverrideModel`, `RouteRecordingModel`. |
| `convert.rs` | `spec_to_schema`: OpenHuman `ToolSpec` → crate `ToolSchema`. Message conversion lives in `crate::agent::message_convert`. |
| `tools.rs` | `SharedToolAdapter` / `ToolAdapter`: wrap `Arc<dyn crate::tools::Tool>` as a crate `Tool`; `EarlyExitHook` for `ask_user_clarification`-style pauses; `execute_openhuman_tool`. |