The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(agent): update harness README for parent context move
Steven Enamakel2607f8c822bc
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.mdindex 17be367f32..e598db8ca5 100644--- a/crates/openhuman-core/src/agent/harness/README.md+++ b/crates/openhuman-core/src/agent/harness/README.md@@ -3,8 +3,9 @@Product shell around the tinyagents tool loop. The model/tool iterationitself runs in `crate::agent::tinyagents` (via`TurnSpec::run`); this module owns everything OpenHuman-layers on top: sub-agent definitions, parent/child context plumbing, post-turn-memory/archival hooks, and oversized-tool-result handling.+layers on top: sub-agent definitions, post-turn memory/archival hooks, and+oversized-tool-result handling. Parent execution snapshots now live with the+sub-agent host in [`../subagent_host/fork_context.rs`](../subagent_host/fork_context.rs).`Agent`, its per-turn lifecycle, and transcript persistence live in[`../session_host/`](../session_host/), not here; this module supplies the definition/prompt data@@ -14,7 +15,7 @@ Cancellation is the tinyagents steering channel (`SteeringCommand` in`crate::agent::tinyagents`); there is no in-house interrupt fence orcancellation token owned here. The message queue that lets a caller steer orfollow up on an in-flight turn is `tinyagents_harness::run_queue::RunQueue`,-used here (not defined here) by [`fork_context.rs`](./fork_context.rs).+carried by the parent snapshot in [`../subagent_host/fork_context.rs`](../subagent_host/fork_context.rs).## Responsibilities@@ -24,11 +25,6 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).`../subagent_host/`, which implements the TinyAgents sub-agent lifecycletraits directly. This module does not export a compatibility runner of itsown.-- Define the parent snapshot a spawned tool receives on its run context- (`fork_context.rs`). Recursion facts come from TinyAgents’- public run context, including depth imported over MCP.- Sandbox mode is carried explicitly by `OpenHumanRunContext` into the typed- tool execution context.- Run the channel/CLI turn graph ([`graph.rs`](./graph.rs)); all sub-agents usethe shared sub-agent turn graph.- Offload oversized worker artifacts to the filesystem, and persist oversized@@ -39,7 +35,6 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).| Module | Role || --- | --- |-| `fork_context.rs` | The `ParentExecutionContext` snapshot a spawning agent hands to sub-agents, carried explicitly on the run context. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. || `graph.rs` | `run_channel_turn_via_graph` (`pub(crate)`): the channel/CLI turn graph, thin over `TurnSpec::run`; called by the `agent.run_turn` native-bus handler in [`agent/bus.rs`](../bus.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/` | 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. |@@ -53,9 +48,6 @@ What `harness/mod.rs` actually re-exports:- `AgentDefinition`, `AgentDefinitionRegistry`, `DefinitionSource`,`ModelSpec`, `PromptSource`, `SandboxMode`, `ToolScope`: the sub-agentarchetype data model.-- `ParentExecutionContext` and its accessors (`current_parent`,- `with_parent_context`, `AgentContextPreparedSource`):- parent runtime context for spawned tools.Sandbox policy lives on the explicit host operation context. Briefing taskrecency belongs to ``OpenHumanRunExt` (agent/tinyagents/host/run_context.rs)`.- `artifact_offload::{...}`: reached only via the `artifact_offload::` path@@ -86,12 +78,13 @@ turn lifecycle are in `../session_host/`; `OpenHumanSubagentHost`,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`.+ `subagent_host::ParentExecutionContext`.## Used by- `../session_host/` and `../subagent_host/` build turns from the- definitions, prompt data, and parent context types this module supplies.+ definitions and prompt data this module supplies; parent context types are+ owned by `../subagent_host/`.- `agent/bus.rs` serves the `agent.run_turn` native request through`run_channel_turn_via_graph`; channels reach the harness through that bus.- [`channels/runtime/dispatch/routing.rs`](../../channels/runtime/dispatch/routing.rs) consults@@ -99,8 +92,7 @@ turn lifecycle are in `../session_host/`; `OpenHumanSubagentHost`,- `agent/tinyagents/middleware/credential_scrub.rs` calls`harness::credentials::scrub_credentials` on every tool result.- `agent/orchestration/tools/*` (`spawn_subagent`)- call into `../subagent_host/` and take this module's parent context- explicitly.+ call into `../subagent_host/` and take its parent context explicitly.## Testsdiff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex 39cc1e09b0..2f7a6505d8 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -3,7 +3,7 @@//! Given an [`crate::agent_registry::host_definition::AgentDefinition`] and a task prompt, the//! runner://!-//! 1. Reads the [`super::fork_context::ParentExecutionContext`] the parent+//! 1. Reads the [`fork_context::ParentExecutionContext`] the parent//! [`crate::agent::OpenHumanSessionHost::turn`] attached to the run context//! (`OpenHumanRunContext::parent`).//! 2. Resolves the sub-agent's model name (inherit / hint / exact).