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
fix(subagent-storm): rename `planner` agent references to `presentation_agent`
Steven Enamakel6cfd782fe925
diff --git a/crates/openhuman-cli/src/bin/README.md b/crates/openhuman-cli/src/bin/README.mdindex dffdd6716e..5ecbb3b564 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 `planner` subagents in one instance: marginal RSS per subagent.+- `subagent-storm`: K parallel `presentation_agent` 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 9b18298f4f..2fa73d3800 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 `planner` subagents fanned out in the turn.+ /// (`subagent-storm`) K parallel `presentation_agent` 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 50488f17a9..abbc559025 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 `planner` subagents in one instance: marginal RSS per subagent.+//! - `subagent-storm`— K parallel `presentation_agent` 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 2dba5e7cd3..f074544a3c 100644--- a/crates/openhuman-cli/src/bin/library_profile/mock.rs+++ b/crates/openhuman-cli/src/bin/library_profile/mock.rs@@ -156,7 +156,7 @@ impl LatencyKnobs {}/// Orchestration mock: the first (orchestrator) turn emits a-/// `spawn_parallel_agents` tool call fanning out to **K** `planner` workers;+/// `spawn_parallel_agents` tool call fanning out to **K** `presentation_agent` workers;/// each worker turn returns its finding; the final merge turn returns plain/// text once all K findings are present.///@@ -207,18 +207,18 @@ impl SubagentMock {(1..=self.width).all(|i| joined.contains(&finding_text(i)))}- /// True when this call is a real `planner` worker turn: exactly one task+ /// True when this call is a real `presentation_agent` 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 planner agent's system- /// prompt names it `Planner`, so it matches neither header string.+ /// merge/echo turns also carry every marker). The presentation agent's system+ /// prompt names it the presentation 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 `planner` workers. Only+ /// Build the fan-out tool call delegating to K parallel `presentation_agent` 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 {@@ -226,7 +226,7 @@ impl SubagentMock {let tasks: Vec<serde_json::Value> = (1..=self.width).map(|i| {serde_json::json!({- "agent_id": "planner",+ "agent_id": "presentation_agent",// 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)),@@ -248,7 +248,7 @@ impl SubagentMock {}/// The subconscious's first turn: hand the task to the orchestrator (which- /// owns `spawn_parallel_agents` and allows the `planner` subagent).+ /// owns `spawn_parallel_agents` and allows the `presentation_agent` subagent).fn delegate_orchestrator_call(&self) -> ChatResponse {ChatResponse {text: Some("Delegating to the orchestrator for a parallel research fan-out.".into()),@@ -269,7 +269,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 planner workers → orchestrator merge →+ /// `spawn_parallel_agents(K)` → K presentation_agent 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 {@@ -292,7 +292,7 @@ impl SubagentMock {/// Agent-aware routing for the orchestrator-driven storm.fn reply_orchestrator_driven(&self, joined: &str) -> ChatResponse {- // Planner worker: return its finding.+ // presentation_agent 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 04fd3a5690..ac3d92ff10 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 `planner` subagents (all+//! One orchestrator turn fans out to **K** parallel `presentation_agent` 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/planner agent beforehand perturbs+//! merely *constructing* an orchestrator/presentation_agent agent beforehand perturbs//! the fan-out the same way. The only shape that reliably executes all K real-//! planner subagents is a single fan-out as the process's first agent+//! presentation_agent 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,12 +30,13 @@//!//! 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 planner child executions).-//! The workload asserts all K planner subagents actually executed.+//! `turn_latency_ms` (percentiles across the K presentation_agent child executions).+//! The workload asserts all K presentation_agent subagents actually executed.//!-//! The worker is `planner`: read-only, 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.+//! 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 closest surviving fit for the retired `researcher` archetype this+//! scenario used to fan out to.use anyhow::Result;use openhuman_core::agent::harness::AgentDefinitionRegistry;@@ -48,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 planner workers.+/// fans out to K presentation_agent workers.const STORM_PROMPT: &str = "Research every subsystem in parallel and merge the findings.";-/// Positive identity anchor for a planner *worker* turn — its own system-/// prompt (`agents/planner/prompt.md`) names it. Distinguishes a real worker+/// Positive identity anchor for a presentation_agent *worker* turn — its own+/// system prompt (`agents/presentation_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 **Planner** agent";+const WORKER_IDENTITY: &str = "You are the presentation specialist.";fn env_usize(key: &str, default: usize) -> usize {std::env::var(key)@@ -105,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 `planner` subagent (the chat-tier subconscious has+ // and allows the `presentation_agent` subagent (the chat-tier subconscious has// neither, and would reject the fan-out). One orchestrator turn fans out to- // K real planner subagents via the parallel graph. This fan-out MUST be+ // K real presentation_agent 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();@@ -118,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 planner subagents must have actually executed as+ // Every one of the K presentation_agent subagents must have actually executed as// its own worker turn: for each i there must be a prompt that carries the- // planner identity anchor AND that worker's task marker — not+ // presentation_agent 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 {@@ -128,7 +129,7 @@ pub async fn run() -> Result<ProfileResult> {prompts.iter().any(|p| p.contains(WORKER_IDENTITY) && p.contains(&subagent_marker(i))),- "planner subagent {i}/{width} never executed as its own worker turn"+ "presentation_agent 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 593ba30d1b..f12ea63096 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": "planner",+ "config": { "agent_ref": "presentation_agent","prompt": "Summarise the Phoenix migration status in one line." } }],"edges": [diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.mdindex e58aba757b..4349400ad6 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→planner (`plan`) delegation asserts ≥3 upstream calls, distinct planner 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→presentation_agent (`make_presentation`) 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 1f06d156a9..e1f9f25167 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: planner)+ --agent-id <id> Subagent id to request (default: presentation_agent)--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: "planner",+ agentId: "presentation_agent",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 "planner", 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 "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."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", "planner", "code_executor"]+allowlist = ["async_audit_worker", "presentation_agent", "code_executor"]`,);await writeFile(diff --git a/scripts/mock-api/routes/__tests__/llm.test.mjs b/scripts/mock-api/routes/__tests__/llm.test.mjsindex e38f3323ab..f5dbbd1e92 100644--- a/scripts/mock-api/routes/__tests__/llm.test.mjs+++ b/scripts/mock-api/routes/__tests__/llm.test.mjs@@ -399,7 +399,7 @@ test("records thread state for multi-turn mock LLM sessions", () => {// `worker_thread_id: (none)`, trailing instruction block).function subagentAwaitingUserEnvelope({taskId = "sub-abc123-fake-uuid",- agentId = "scheduler_agent",+ agentId = "task_manager_agent",workerThreadId = "(none)",question = "Which repo should I search?",} = {}) {@@ -421,7 +421,7 @@ test("renderDynamicPlaceholders substitutes task_id and agent_id from history",role: "tool",content: subagentAwaitingUserEnvelope({taskId: "sub-runtime-42",- agentId: "scheduler_agent",+ agentId: "task_manager_agent",}),},{ role: "user", content: "the main repo" },@@ -433,7 +433,7 @@ test("renderDynamicPlaceholders substitutes task_id and agent_id from history",);assert.equal(rendered,- '{"task_id":"sub-runtime-42","agent_id":"scheduler_agent","message":"the main repo"}',+ '{"task_id":"sub-runtime-42","agent_id":"task_manager_agent","message":"the main repo"}',);});@@ -518,7 +518,7 @@ test("llmKeywordRules substitute {{DYNAMIC_TASK_ID}} in continue_subagent tool_crole: "tool",content: subagentAwaitingUserEnvelope({taskId: "sub-realtime-777",- agentId: "scheduler_agent",+ agentId: "task_manager_agent",}),},{ role: "user", content: "here is my user answer" },@@ -531,7 +531,7 @@ test("llmKeywordRules substitute {{DYNAMIC_TASK_ID}} in continue_subagent tool_cconst args = body.choices[0].message.tool_calls[0].function.arguments;const parsed = JSON.parse(args);assert.equal(parsed.task_id, "sub-realtime-777");- assert.equal(parsed.agent_id, "scheduler_agent");+ assert.equal(parsed.agent_id, "task_manager_agent");assert.equal(parsed.message, "the main repo");// Placeholder text must be fully consumed.assert.ok(!args.includes("{{DYNAMIC_"), `args should not contain unresolved placeholders: ${args}`);