Skip to content

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

docs: add README files for agent harness and toolpacks modules

Steven Enamakel9ac05e3f0e47
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.md
index dbcd4ee881..ce7169dfd8 100644
--- a/crates/openhuman-core/src/agent/harness/README.md
+++ b/crates/openhuman-core/src/agent/harness/README.md
@@ -45,7 +45,7 @@ used here (not defined here) by `agent_graph.rs` and `fork_context.rs`.
| `agent_graph.rs` | `AgentGraph` (`Default`/`Custom`), `AgentTurnRequest`, `AgentTurnResult`, `AgentTurnUsage`: per-agent sub-agent turn-graph selection consumed by `../subagent_host/`. Every built-in agent currently selects `Default`. |
| `archivist/` | `ArchivistHook` (`types.rs`, `PostTurnHook` impl in `hook_impl.rs`): post-turn episodic insert, segment boundary detection and lifecycle, LLM recap with heuristic fallback, lesson extraction from tool failures, and raw-prose ingestion into the memory tree when `config.learning.chat_to_tree_enabled` (`boundary.rs`, `lifecycle.rs`, `recap.rs`, `resummarise.rs`, `store.rs`, `tree_ingest.rs`, `events_heuristic.rs`). |
| `artifact_offload/` | The `outputs/` / `workspace/` convention under `action_dir`: prompt half (`contract.rs`) and host policy half (`policy.rs`); mechanics (thresholds, path resolution, pointer rendering, the writer) live in `tinyagents_harness::artifacts` and are re-exported here. |
-| `tool_result_artifacts/` | Persists oversized individual and aggregate tool outputs under `action_dir/artifacts/tool-results/`, replacing them with a bounded `[tool_result_preview]` envelope pointing at the full, redacted file. |
+| `tool_result_artifacts/` | Wiring only: `new_tool_result_store` hands `tinyagents_harness::artifacts::tool_results` OpenHuman's redactor (`SanitizingRedactor`), `file_read`/`use_skill` names and `FileReadTool::MAX_FILE_SIZE_BYTES`. The store, `[tool_result_preview]` envelope, budgets and paged reads live in the crate. |
| `memory_context.rs`, `memory_context_safety.rs`, `memory_protocol.rs` | Working-memory and `[Cross-chat context]` lines surfaced into the prompt (capped by `WORKING_MEMORY_LIMIT`); trust-tier wrapping of recalled entries that came from connectors (`wrap_untrusted_for_agent`); and the read-index, dedupe, write, update-index enforcement state machine for memory-mutating tools (issue #4116). |
| `required_output.rs` | Pure validate/repair/synthesize primitives (issue #4117) that guarantee a required structured-output block (for example a `thoughts` JSON block) on every accepted turn. The orchestration that calls these lives on the session in `../session_host/turn/`. |
| `parse_wire_tests.rs` | Test-only fixtures for OpenHuman's own wire vocabulary (`inference::provider::ToolCall`, native-history JSON, OpenAI function-calling payloads). The actual `<tool_call>` parsing (tags, fenced blocks, bare JSON, `<invoke>` XML, GLM grammar, p-format) moved to the vendored `tinytools_agent` crate; nothing about recovering a tool call from model text stayed here. |
@@ -79,8 +79,8 @@ turn lifecycle are in `../session_host/`; `run_subagent`,
- `tinyagents_harness` (vendored via `vendor/tinyagents/`): the tool loop
itself (`run_turn_via_tinyagents_shared`), the `run_queue` and `artifacts`
- primitives this module wraps, and the `Store` trait implemented by
- `tool_result_artifacts::ToolResultArtifactIndexStore`.
+ primitives this module wraps, and the `InMemoryStore` used as the
+ tool-result artifact index.
- `tinytools_agent` (also vendored): the tool-call parsers themselves
(`<tool_call>` tags, fenced blocks, bare JSON, `<invoke>` XML, GLM grammar,
p-format). This crate is a test-only dependency of `harness/`; the parsers
@@ -90,7 +90,7 @@ turn lifecycle are in `../session_host/`; `run_subagent`,
- `crate::security::SecurityPolicy`: workspace containment policy plumbed
into `artifact_offload::new_artifact_offload`.
- `crate::memory`: context injection (`memory_context*`) and text
- sanitization (`tool_result_artifacts` uses `memory::safety::sanitize_text`).
+ sanitization (`artifact_offload::SanitizingRedactor` wraps `memory::safety::sanitize_text` for both artifact stores).
- `crate::config::AgentConfig`, `crate::skills::Workflow`,
`crate::tools::{Tool, ToolSpec}`: runtime context carried through
`fork_context::ParentExecutionContext`.
diff --git a/crates/openhuman-core/src/tools/toolpacks/README.md b/crates/openhuman-core/src/tools/toolpacks/README.md
index d4058bba36..15c026ade4 100644
--- a/crates/openhuman-core/src/tools/toolpacks/README.md
+++ b/crates/openhuman-core/src/tools/toolpacks/README.md
@@ -35,13 +35,17 @@ constructed and executable but unadvertised: the agent sees one small tool,
session-scoped listing (`render_pack_filtered` + `route_sentence`) is
produced by the tinyagents policy middleware, which is the only layer that
holds the session (see below).
-- `tools::PackRegistryHandle` is the late-bound, non-owning (`Weak`) view the
+- `tinyagents_harness::tool::packs::PackRegistryHandle` is the late-bound, non-owning (`Weak`) view the
proxy dispatches through. It holds two registries: the durable tool `Arc`
and the agent's `synthesized_tools` `Arc`, where every `delegate_*` tool
lives. Each must be rebound after its `Arc` is replaced, or packed
tools degrade to "skill unavailable" / "no tool in skill". The handle rides
on `Tool::host_extension` and is read back by
- `tools::host_extensions::pack_registry_handle`.
+ `tools::host_extensions::pack_registry_handle`. The proxy itself
+ (`UseSkillTool`, `PackCatalog`, `ToolPack`, the listing/scoping renderers) lives in
+ `tinyagents_harness::tool::packs`; this module keeps the pack table
+ (`registry::PACKS`, handed over as `registry::CATALOG`), the group posture and the
+ registry binding.
- `ops::strip_packed_from_visible` does the actual compression: it removes a
pack's tool names from an agent's advertised `visible` set (only those whose
group is `Withheld`) and adds `use_skill` back in only if something was