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): document agent harness and subagent host
Steven Enamakel3e0e59cbc703
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.mdindex e7c49caa95..627181ae47 100644--- a/crates/openhuman-core/src/agent/README.md+++ b/crates/openhuman-core/src/agent/README.md@@ -187,7 +187,7 @@ target `AgentDefinition` and call `subagent_host::run_subagent_with_parent`.| tool call: spawn_subagent { agent_id, prompt }vorchestration/tools/spawn_subagent.rs- | read ParentExecutionContext (task-local, harness/fork_context.rs)+ | read ParentExecutionContext (run context `parent`, harness/fork_context.rs)vsubagent_host::run_subagent_with_parent| resolve definition, model, narrowed tools, narrowed prompt,@@ -342,8 +342,8 @@ Persistence, setup and RPC:deltas, cost updates and the `Subagent*` family.- `AgentDefinition`, `AgentDefinitionRegistry`, `ToolScope`, `SandboxMode`(`harness/host_definition.rs` + `tinyagents-definition`): what an agent is.-- `ParentExecutionContext` ([`harness/fork_context.rs`](./harness/fork_context.rs)): task-local parent- state a sub-agent reads; `orchestration::parent_context::build_root_parent`+- `ParentExecutionContext` ([`harness/fork_context.rs`](./harness/fork_context.rs)): explicit parent+ state a sub-agent reads from the run context (`parent`); `orchestration::parent_context::build_root_parent`builds one for runs with no parent turn.- `run_subagent`, `run_subagent_with_parent`, `SubagentRunOptions`([`subagent_host/lifecycle.rs`](./subagent_host/lifecycle.rs), [`subagent_host/types.rs`](./subagent_host/types.rs)).diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.mdindex 828319848f..bb75eb211c 100644--- a/crates/openhuman-core/src/agent/harness/README.md+++ b/crates/openhuman-core/src/agent/harness/README.md@@ -40,7 +40,7 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).| Module | Role || --- | --- || [`host_definition.rs`](./host_definition.rs), [`builtin_definitions.rs`](./builtin_definitions.rs) | The host side of agent definitions: `AgentExt` (prompt omissions, TokenJuice profile, MCP flag, prompt builder) over `tinyagents_definition::AgentDefinition<X>`, plus `AgentDefinitionRegistry` (a `DefinitionSet<AgentExt>` with the process/context singleton) and user-definition path resolution. The vocabulary (`ModelSpec`, `ToolScope`, `SandboxMode`, `AgentTier`, `PromptSource`, ...) and the TOML directory loader live in `tinyagents-definition`. Built-ins come from `crate::agent::registry::agents`. |-| `fork_context.rs` | Parent-handle context for direct host dispatch. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. |+| `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. |diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex 64c43c5ca5..b3ecf424ea 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -3,8 +3,9 @@//! Given an [`crate::agent::harness::host_definition::AgentDefinition`] and a task prompt, the//! runner://!-//! 1. Reads the [`super::fork_context::ParentExecutionContext`] task-local-//! set by the parent [`crate::agent::OpenHumanSessionHost::turn`].+//! 1. Reads the [`super::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).//! 3. Filters the parent's tool registry per `definition.tools`,//! `disallowed_tools`, and `skill_filter` (or, in `fork` mode,