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
chore: files changed crates/openhuman-cli/src/bin/README.md,crates/openhuman-cli/src/bin/library_pro
Steven Enamakel4b864facb31c
diff --git a/crates/openhuman-cli/src/bin/README.md b/crates/openhuman-cli/src/bin/README.mdindex 5ecbb3b564..25459bea0f 100644--- a/crates/openhuman-cli/src/bin/README.md+++ b/crates/openhuman-cli/src/bin/README.md@@ -136,7 +136,7 @@ Scenarios (`library-profile <scenario>`, one module each under- `workflow`: a real flows trigger -> transform -> agent graph, end to end.- `fleet`: N live agents: marginal RSS, idle CPU, fd/thread growth, turn latency.- `skill-run`: a skill step executing on a real `node` child: process-tree RSS.-- `subagent-storm`: K parallel `presentation_agent` subagents in one instance: marginal RSS per subagent.+- `subagent-storm`: K parallel `agent_memory` subagents in one instance: marginal RSS per subagent.`memory-ingest` and `cold-phases` were removed with the in-process memoryengine (openhuman#6161); re-adding them means measuring the memory modulediff --git a/crates/openhuman-cli/src/bin/library_profile/harness.rs b/crates/openhuman-cli/src/bin/library_profile/harness.rsindex 2fa73d3800..304d2019f9 100644--- a/crates/openhuman-cli/src/bin/library_profile/harness.rs+++ b/crates/openhuman-cli/src/bin/library_profile/harness.rs@@ -114,7 +114,7 @@ pub struct ProfileResult {pub budget: Option<FleetBudget>,#[serde(skip_serializing_if = "Option::is_none")]pub checkpoints: Option<Vec<Checkpoint>>,- /// (`subagent-storm`) K parallel `presentation_agent` subagents fanned out in the turn.+ /// (`subagent-storm`) K parallel `agent_memory` subagents fanned out in the turn.#[serde(skip_serializing_if = "Option::is_none")]pub subagents: Option<usize>,/// (`skill-run`) process-tree RSS including interpreter child processes.diff --git a/crates/openhuman-cli/src/bin/library_profile/main.rs b/crates/openhuman-cli/src/bin/library_profile/main.rsindex abbc559025..edc37ab526 100644--- a/crates/openhuman-cli/src/bin/library_profile/main.rs+++ b/crates/openhuman-cli/src/bin/library_profile/main.rs@@ -10,7 +10,7 @@//! - `workflow` — a real flows trigger->transform->agent graph, end to end.//! - `fleet` — N live agents: marginal RSS, idle CPU, fd/thread growth, turn latency.//! - `skill-run` — a skill step executing on a real `node` child: process-tree RSS.-//! - `subagent-storm`— K parallel `presentation_agent` subagents in one instance: marginal RSS per subagent.+//! - `subagent-storm`— K parallel `agent_memory` subagents in one instance: marginal RSS per subagent.//!//! `memory-ingest` and `cold-phases` were removed with the in-process memory//! engine (openhuman#6161); see `scenarios/mod.rs`.diff --git a/crates/openhuman-cli/src/bin/library_profile/mock.rs b/crates/openhuman-cli/src/bin/library_profile/mock.rsindex 32a198162a..9894c13cc3 100644--- a/crates/openhuman-cli/src/bin/library_profile/mock.rs+++ b/crates/openhuman-cli/src/bin/library_profile/mock.rs@@ -158,7 +158,7 @@ impl LatencyKnobs {}/// Orchestration mock: the first (orchestrator) turn emits a-/// `spawn_parallel_agents` tool call fanning out to **K** `presentation_agent` workers;+/// `spawn_parallel_agents` tool call fanning out to **K** `agent_memory` workers;/// each worker turn returns its finding; the final merge turn returns plain/// text once all K findings are present.///@@ -209,18 +209,18 @@ impl SubagentMock {(1..=self.width).all(|i| joined.contains(&finding_text(i)))}- /// True when this call is a real `presentation_agent` worker turn: exactly one task+ /// True when this call is a real `agent_memory` worker turn: exactly one task/// marker is present and the executing agent is neither the orchestrator nor/// the subconscious (their Tool Policy Boundary headers name them, and their- /// merge/echo turns also carry every marker). The presentation agent's system- /// prompt names it the presentation specialist, so it matches neither header.+ /// merge/echo turns also carry every marker). The memory agent's system+ /// prompt names it a memory retrieval specialist, so it matches neither header.fn is_worker_turn(&self, joined: &str) -> bool {self.worker_index(joined).is_some()&& !joined.contains("Agent: orchestrator")&& !joined.contains("Agent: subconscious")}- /// Build the fan-out tool call delegating to K parallel `presentation_agent` workers. Only+ /// Build the fan-out tool call delegating to K parallel `agent_memory` workers. Only/// valid on an **orchestrator** turn — the subconscious has no/// `spawn_parallel_agents` tool, so we `delegate_orchestrator` there first.fn spawn_call(&self) -> ChatResponse {@@ -228,7 +228,7 @@ impl SubagentMock {let tasks: Vec<serde_json::Value> = (1..=self.width).map(|i| {serde_json::json!({- "agent_id": "presentation_agent",+ "agent_id": "agent_memory",// The nonce keeps each fan-out's tasks byte-distinct so the// parallel-graph result cache can't short-circuit a re-spawn."prompt": format!("{} [spawn {nonce}]: inspect subsystem {i}", subagent_marker(i)),@@ -250,7 +250,7 @@ impl SubagentMock {}/// The subconscious's first turn: hand the task to the orchestrator (which- /// owns `spawn_parallel_agents` and allows the `presentation_agent` subagent).+ /// owns `spawn_parallel_agents` and allows the `agent_memory` subagent).fn delegate_orchestrator_call(&self) -> ChatResponse {ChatResponse {text: Some("Delegating to the orchestrator for a parallel research fan-out.".into()),@@ -271,7 +271,7 @@ impl SubagentMock {/// Classify the turn by the *executing agent* (from the Tool Policy Boundary/// header) and script the real delegation chain:/// subconscious → `delegate_orchestrator` → orchestrator →- /// `spawn_parallel_agents(K)` → K presentation_agent workers → orchestrator merge →+ /// `spawn_parallel_agents(K)` → K agent_memory workers → orchestrator merge →/// subconscious final. No latency/recording here — the async `chat` wrappers/// handle sleeping + latency capture around this.fn reply(&self, joined: &str) -> ChatResponse {@@ -294,7 +294,7 @@ impl SubagentMock {/// Agent-aware routing for the orchestrator-driven storm.fn reply_orchestrator_driven(&self, joined: &str) -> ChatResponse {- // presentation_agent worker: return its finding.+ // agent_memory worker: return its finding.if self.is_worker_turn(joined) {let i = self.worker_index(joined)diff --git a/crates/openhuman-cli/src/bin/library_profile/scenarios/subagent_storm.rs b/crates/openhuman-cli/src/bin/library_profile/scenarios/subagent_storm.rsindex ac3d92ff10..62d4cf8803 100644--- a/crates/openhuman-cli/src/bin/library_profile/scenarios/subagent_storm.rs+++ b/crates/openhuman-cli/src/bin/library_profile/scenarios/subagent_storm.rs@@ -1,6 +1,6 @@//! `subagent-storm`: fuzz the *width* of delegation inside ONE core instance.//!-//! One orchestrator turn fans out to **K** parallel `presentation_agent` subagents (all+//! One orchestrator turn fans out to **K** parallel `agent_memory` subagents (all//! in-process tokio tasks, not child processes) via `spawn_parallel_agents`.//! K comes from `OPENHUMAN_PROFILE_SUBAGENTS` (default 8; tested up to 32), and//! each worker carries per-subagent mock latency drawn from the shared@@ -14,9 +14,9 @@//! machinery is effectively one-shot per process. Once a fan-out's run ledger is//! finalized, a second `spawn_parallel_agents` returns an empty result and the//! orchestrator just re-calls the tool without re-running the workers. Worse,-//! merely *constructing* an orchestrator/presentation_agent agent beforehand perturbs+//! merely *constructing* an orchestrator/agent_memory agent beforehand perturbs//! the fan-out the same way. The only shape that reliably executes all K real-//! presentation_agent subagents is a single fan-out as the process's first agent+//! agent_memory subagents is a single fan-out as the process's first agent//! activity.//!//! So this scenario measures exactly that: one cold width-K fan-out. `retained_delta_kib`@@ -30,11 +30,11 @@//!//! Reported fields: `subagents = K`, `marginal_rss_kib_per_agent` (retained/K,//! upper bound), `checkpoints` (baseline → storm-turn-done), and-//! `turn_latency_ms` (percentiles across the K presentation_agent child executions).-//! The workload asserts all K presentation_agent subagents actually executed.+//! `turn_latency_ms` (percentiles across the K agent_memory child executions).+//! The workload asserts all K agent_memory subagents actually executed.//!-//! The worker is `presentation_agent`: a worker-tier agent with a web tool-//! surface, no spawn tools, and in the orchestrator's `[subagents] allowlist` —+//! The worker is `agent_memory`: a read-only worker-tier agent with a small+//! memory tool surface, no spawn tools, and in the orchestrator's `[subagents] allowlist` —//! the closest surviving fit for the retired `researcher` archetype this//! scenario used to fan out to.@@ -49,14 +49,14 @@ use crate::mock::{subagent_marker, SubagentMock};const DEFAULT_SUBAGENTS: usize = 8;/// The orchestrator's top-level task. The mock ignores the wording and always-/// fans out to K presentation_agent workers.+/// fans out to K agent_memory workers.const STORM_PROMPT: &str = "Research every subsystem in parallel and merge the findings.";-/// Positive identity anchor for a presentation_agent *worker* turn — its own-/// system prompt (`agents/presentation_agent/prompt.md`) names it. Distinguishes a real worker+/// Positive identity anchor for a agent_memory *worker* turn — its own+/// system prompt (`memory/agent/agent/prompt.md`) names it. Distinguishes a real worker/// from the orchestrator turns that also echo every task marker in the fan-out/// tool call / result.-const WORKER_IDENTITY: &str = "You are the presentation specialist.";+const WORKER_IDENTITY: &str = "You are a memory retrieval specialist.";fn env_usize(key: &str, default: usize) -> usize {std::env::var(key)@@ -106,9 +106,9 @@ pub async fn run() -> Result<ProfileResult> {eprintln!("[library-profile] subagent-storm: width={width} — single cold width-K fan-out");// We drive the `orchestrator` agent directly: it owns `spawn_parallel_agents`- // and allows the `presentation_agent` subagent (the chat-tier subconscious has+ // and allows the `agent_memory` subagent (the chat-tier subconscious has// neither, and would reject the fan-out). One orchestrator turn fans out to- // K real presentation_agent subagents via the parallel graph. This fan-out MUST be+ // K real agent_memory subagents via the parallel graph. This fan-out MUST be// the process's first agent activity — see the module docs for why prewarming// is not possible here.let config = fixture.config.clone();@@ -119,9 +119,9 @@ pub async fn run() -> Result<ProfileResult> {let reply = agent.run_single(STORM_PROMPT).await?;rec.checkpoint("storm-turn-done")?;anyhow::ensure!(!reply.trim().is_empty(), "empty storm-turn response");- // Every one of the K presentation_agent subagents must have actually executed as+ // Every one of the K agent_memory subagents must have actually executed as// its own worker turn: for each i there must be a prompt that carries the- // presentation_agent identity anchor AND that worker's task marker — not+ // agent_memory identity anchor AND that worker's task marker — not// merely an orchestrator turn echoing every marker in the fan-out call.let prompts = mock_for_workload.prompts.lock().expect("mock prompt lock");for i in 1..=width {@@ -129,7 +129,7 @@ pub async fn run() -> Result<ProfileResult> {prompts.iter().any(|p| p.contains(WORKER_IDENTITY) && p.contains(&subagent_marker(i))),- "presentation_agent subagent {i}/{width} never executed as its own worker turn"+ "agent_memory subagent {i}/{width} never executed as its own worker turn");}Ok(())diff --git a/crates/openhuman-cli/src/bin/library_profile/scenarios/workflow.rs b/crates/openhuman-cli/src/bin/library_profile/scenarios/workflow.rsindex f12ea63096..da37f86366 100644--- a/crates/openhuman-cli/src/bin/library_profile/scenarios/workflow.rs+++ b/crates/openhuman-cli/src/bin/library_profile/scenarios/workflow.rs@@ -28,7 +28,7 @@ pub async fn run() -> Result<ProfileResult> {{ "id": "prep", "kind": "transform", "name": "Prep","config": { "set": { "topic": "Phoenix migration" } } },{ "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "presentation_agent",+ "config": { "agent_ref": "agent_memory","prompt": "Summarise the Phoenix migration status in one line." } }],"edges": [diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.mdindex 1f191bcba8..8c63707956 100644--- a/docs/TEST-COVERAGE-MATRIX.md+++ b/docs/TEST-COVERAGE-MATRIX.md@@ -213,7 +213,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ------ | --------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |-| 4.4.1 | Subagent Delegation | RI+WD | `tests/agent_harness_e2e.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts` | ✅ | Orchestrator→presentation_agent (`make_presentation`) delegation asserts ≥3 upstream calls, distinct subagent persona, no "Unknown tool:" |+| 4.4.1 | Subagent Delegation | RI+WD | `tests/agent_harness_e2e.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts` | ✅ | Orchestrator→agent_memory (`retrieve_memory`) delegation asserts ≥3 upstream calls, distinct subagent persona, no "Unknown tool:" || 4.4.2 | Subagent Clarification (input-required) | RI+WD | `tests/agent_harness_e2e.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts`, `chat-harness-subagent-continue.spec.ts` | ✅ | Subagent question surfaced + reply completes turn; full `continue_subagent` resume covered by the continue spec || 4.4.3 | Approval Gate — Approve | RI+WD | `tests/agent_harness_e2e.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts` | ✅ | `approval_request` event → approve → tool executes (timeline `success`, file written) || 4.4.4 | Approval Gate — Deny | RI+WD | `tests/agent_harness_e2e.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts` | ✅ | Deny → tool not executed (timeline `error`, file unchanged), agent explains gracefully |diff --git a/scripts/debug/harness-subagent-rpc-audit.mjs b/scripts/debug/harness-subagent-rpc-audit.mjsindex e1f9f25167..a8e8832217 100755--- a/scripts/debug/harness-subagent-rpc-audit.mjs+++ b/scripts/debug/harness-subagent-rpc-audit.mjs@@ -32,7 +32,7 @@ Options:--token <token> RPC bearer (default: OPENHUMAN_CORE_TOKEN or <workspace>/core.token)--workspace <path> Workspace containing .openhuman/subagent_sessions.json--task-key <key> Durable task key (default: audit-subagent-rpc-<timestamp>)- --agent-id <id> Subagent id to request (default: presentation_agent)+ --agent-id <id> Subagent id to request (default: agent_memory)--model <model> Optional model_override for openhuman.agent_chat--provider-mode <mode> Isolated provider config: openhuman-backend or direct-openai (default: openhuman-backend)--rpc-timeout-ms <n> Parent agent_chat timeout (default: 600000)@@ -60,7 +60,7 @@ function parseArgs(argv) {token: process.env.OPENHUMAN_CORE_TOKEN || "",workspace: process.env.OPENHUMAN_WORKSPACE || "",taskKey: `audit-subagent-rpc-${Date.now().toString(36)}`,- agentId: "presentation_agent",+ agentId: "agent_memory",model: "",providerMode: "openhuman-backend",rpcTimeoutMs: 600_000,@@ -489,7 +489,7 @@ Do not call wait_subagent.`;function parallelPrompt(opts) {return `Harness parallel subagent audit.Call spawn_parallel_agents exactly once with these two tasks:-1. agent_id "presentation_agent", ownership "website research", prompt "Research https://example.com and return a concise factual note with the page title or domain purpose. Include one short evidence phrase. Do not browse unrelated sites."+1. agent_id "agent_memory", ownership "website research", prompt "Research https://example.com and return a concise factual note with the page title or domain purpose. Include one short evidence phrase. Do not browse unrelated sites."2. agent_id "code_executor", ownership "code draft", prompt "Write a small Python function normalize_title(title: str) -> str that trims whitespace, collapses internal whitespace, and title-cases the result. Include one tiny assert-style example. Return only the code block; do not modify files."After spawn_parallel_agents returns, reply with one concise sentence summarizing that both parallel workers completed.Audit marker: ${opts.taskKey}.`;@@ -570,7 +570,7 @@ After the requested tool call or calls return, provide one concise sentence. Donamed = ["spawn_subagent", "spawn_parallel_agents", "wait_subagent"][subagents]-allowlist = ["async_audit_worker", "presentation_agent", "code_executor"]+allowlist = ["async_audit_worker", "agent_memory", "code_executor"]`,);await writeFile(diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 9479f73515..566f01dc94 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -1677,27 +1677,27 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {.get("definitions").and_then(Value::as_array).expect("agent_list_definitions should return definitions array");- let presentation = definitions+ let memory_agent = definitions.iter().find(|definition| {- definition.get("id").and_then(Value::as_str) == Some("presentation_agent")+ definition.get("id").and_then(Value::as_str) == Some("agent_memory")})- .expect("safe agent library should include presentation_agent");+ .expect("safe agent library should include agent_memory");assert_eq!(- presentation.get("display_name").and_then(Value::as_str),- Some("Presentation Agent")+ memory_agent.get("display_name").and_then(Value::as_str),+ Some("Memory Agent"));- assert!(presentation+ assert!(memory_agent.get("when_to_use").and_then(Value::as_str).is_some());- assert!(presentation.get("system_prompt").is_none());- assert!(presentation.get("tools").is_some());- assert!(presentation+ assert!(memory_agent.get("system_prompt").is_none());+ assert!(memory_agent.get("tools").is_some());+ assert!(memory_agent.get("direct_tool_count").and_then(Value::as_u64).is_some());- assert!(presentation+ assert!(memory_agent.get("can_run_as_user_facing_worker").and_then(Value::as_bool).is_some());@@ -1719,13 +1719,13 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {286_211,"openhuman.agent_registry_update",json!({- "id": "presentation_agent",- "name": "Deck Specialist",- "description": "Workspace-specific presentation specialist.",+ "id": "agent_memory",+ "name": "Recall Specialist",+ "description": "Workspace-specific memory recall specialist.","model": "hint:reasoning","tool_allowlist": ["tools.web_search", "memory.search"],"tool_denylist": ["wallet.execute_prepared"],- "tags": ["presentation", "workspace"],+ "tags": ["memory", "workspace"],"metadata": { "pinned_by": "json_rpc_e2e" }}),)@@ -1736,7 +1736,7 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {.expect("update default should return agent");assert_eq!(update_default_agent.get("name").and_then(Value::as_str),- Some("Deck Specialist")+ Some("Recall Specialist"));assert_eq!(update_default_agent@@ -1952,7 +1952,7 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {"system_prompt": "Write concise updates with citations when available.","tool_allowlist": ["memory.search"],"tool_denylist": ["shell"],- "subagents": ["presentation_agent"],+ "subagents": ["agent_memory"],"tags": ["writing", "custom", "disabled"],"metadata": { "updated_by": "json_rpc_e2e" }}),@@ -1977,7 +1977,7 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {.and_then(Value::as_array).and_then(|allowlist| allowlist.first()).and_then(Value::as_str),- Some("presentation_agent")+ Some("agent_memory"));let reenabled_custom = post_json_rpc(@@ -2136,7 +2136,7 @@ async fn json_rpc_agent_registry_manages_defaults_and_custom_agents() {&rpc_base,286_221,"openhuman.agent_registry_remove",- json!({ "id": "presentation_agent" }),+ json!({ "id": "agent_memory" }),).await;assert_eq!(@@ -13079,8 +13079,8 @@ async fn json_rpc_agent_team_live_member_run_roundtrip_inner() {"leadAgentId": "lead","summary": "live run e2e","members": [- { "name": "alice", "agentId": "presentation_agent" },- { "name": "bob", "agentId": "presentation_agent" }+ { "name": "alice", "agentId": "agent_memory" },+ { "name": "bob", "agentId": "agent_memory" }]}),)