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
refactor(agent_registry): route specialist hand-offs through spawn_subagent
Steven Enamakelda9d535c6d35
diff --git a/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs b/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rsindex f49a834383..f157218ad4 100644--- a/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs+++ b/crates/openhuman-core/src/agent_registry/agents/fleet_prompt_tests.rs@@ -18,44 +18,27 @@ use tinytools_agent::dialect::ToolCallFormat;////// Each render gets its own workspace: building a prompt seeds identity files/// into it, and the tests here render in parallel.-fn visible_tool_names(def: &AgentDefinition, definitions: &[AgentDefinition]) -> HashSet<String> {+fn visible_tool_names(def: &AgentDefinition) -> HashSet<String> {let mut visible = match &def.tools {ToolScope::Wildcard => HashSet::new(),ToolScope::Named(names) => names.iter().cloned().collect(),};visible.extend(def.extra_tools.iter().cloned());- for subagent in &def.subagents {- let SubagentEntry::AgentId(agent_id) = subagent else {- continue;- };- if agent_id == "summarizer" {- continue;- }- let Some(target) = definitions- .iter()- .find(|candidate| candidate.id == *agent_id)- else {- continue;- };- visible.insert(- target- .delegate_name- .clone()- .unwrap_or_else(|| format!("delegate_{}", target.id)),- );+ if def.subagents.iter().any(|entry| matches!(entry, SubagentEntry::AgentId(_))) {+ visible.insert("spawn_subagent".to_string());}visible}-fn render(def: &AgentDefinition, definitions: &[AgentDefinition]) -> String {+fn render(def: &AgentDefinition, _definitions: &[AgentDefinition]) -> String {let (PromptSource::Dynamic(()), Some(build)) =(&def.system_prompt, def.extensions.prompt_builder)else {panic!("built-in `{}` must carry a dynamic prompt", def.id);};let workspace = tempfile::TempDir::new().expect("temp workspace");- let visible = visible_tool_names(def, definitions);+ let visible = visible_tool_names(def);let ctx = PromptContext {workspace_dir: workspace.path(),model_name: "test",diff --git a/crates/openhuman-core/src/agent_registry/agents/image_agent/agent.toml b/crates/openhuman-core/src/agent_registry/agents/image_agent/agent.tomlindex 65c8a21fca..6bcfde0ece 100644--- a/crates/openhuman-core/src/agent_registry/agents/image_agent/agent.toml+++ b/crates/openhuman-core/src/agent_registry/agents/image_agent/agent.toml@@ -1,6 +1,5 @@id = "image_agent"display_name = "Image Creator"-delegate_name = "create_image"when_to_use = "Image-generation specialist: create images from a prompt, or edit/restyle a reference image. Route make/generate/draw/edit-an-image requests here. Saves each result to the configured Files folder and returns its local path; paths from earlier media calls there can be reused as references."temperature = 0.6max_iterations = 8diff --git a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rsindex e3073b45e3..49b2bc02fc 100644--- a/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs+++ b/crates/openhuman-core/src/agent_registry/agents/loader_tests_specialist_agents_tests.rs@@ -26,7 +26,7 @@ fn workflow_builder_is_registered_worker_with_bounded_authoring_scope() {// through the single `memory` tool.let def = find("workflow_builder");assert_eq!(def.agent_tier, AgentTier::Worker);- assert_eq!(def.delegate_name.as_deref(), Some("build_workflow"));+ assert!(def.delegate_name.is_none());assert_eq!(def.sandbox_mode, SandboxMode::None);// Graph authoring is multi-step structured reasoning — reasoning tier.assert!(@@ -124,7 +124,7 @@ fn workflow_builder_is_registered_worker_with_bounded_authoring_scope() {.subagents.iter().any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "workflow_builder")),- "orchestrator must allow `workflow_builder` so build_workflow can spawn it"+ "orchestrator must allow `workflow_builder` for spawn_subagent");}@@ -139,7 +139,7 @@ fn flow_discovery_is_registered_readonly_reasoning_scout() {// foothold.let def = find("flow_discovery");assert_eq!(def.agent_tier, AgentTier::Reasoning);- assert_eq!(def.delegate_name.as_deref(), Some("discover_workflows"));+ assert!(def.delegate_name.is_none());assert_eq!(def.sandbox_mode, SandboxMode::ReadOnly);assert!(def.subagents.is_empty(),@@ -188,15 +188,14 @@ fn flow_discovery_is_registered_readonly_reasoning_scout() {ToolScope::Wildcard => panic!("flow_discovery must have a Named tool scope"),}- // Reachable by delegation from the orchestrator so `discover_workflows`- // can spawn it.+ // Reachable from the orchestrator through the shared spawn tool.let orchestrator = find("orchestrator");assert!(orchestrator.subagents.iter().any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "flow_discovery")),- "orchestrator must allow `flow_discovery` so discover_workflows can spawn it"+ "orchestrator must allow `flow_discovery` for spawn_subagent");}diff --git a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/agent.toml b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/agent.tomlindex 80046e3349..70188ace15 100644--- a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/agent.toml+++ b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/agent.toml@@ -1,6 +1,5 @@id = "presentation_agent"display_name = "Presentation Agent"-delegate_name = "make_presentation"when_to_use = "Presentation specialist: builds decks from supplied or retrieved evidence, and owns their grounding, citations and image verification. Use for make-slides, build-a-deck, or pitch-deck requests."temperature = 0.2max_iterations = 10diff --git a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/agent.toml b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/agent.tomlindex 934c276334..c73bdf27aa 100644--- a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/agent.toml+++ b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/agent.toml@@ -1,6 +1,5 @@id = "task_manager_agent"display_name = "Task Manager Agent"-delegate_name = "manage_tasks"when_to_use = "Task-source and artifact specialist: proactive feeds from GitHub/Linear/Notion/ClickUp, and workspace artifacts. Use when the user asks to add, preview, fetch, update, remove or summarize task sources or artifacts."temperature = 0.2max_iterations = 8diff --git a/crates/openhuman-core/src/agent_registry/agents/video_agent/agent.toml b/crates/openhuman-core/src/agent_registry/agents/video_agent/agent.tomlindex c7a6e54f99..9cb3fd9d27 100644--- a/crates/openhuman-core/src/agent_registry/agents/video_agent/agent.toml+++ b/crates/openhuman-core/src/agent_registry/agents/video_agent/agent.toml@@ -1,6 +1,5 @@id = "video_agent"display_name = "Video Creator"-delegate_name = "create_video"when_to_use = "Video-generation specialist: short clips from a prompt, or animate a supplied image. Route make/generate-a-video and animate-this-image requests here. Takes a few minutes, then saves the clip to the configured Files folder and returns its local path; paths from earlier media calls there can be reused as frames or references."temperature = 0.6max_iterations = 8diff --git a/crates/openhuman-core/src/agent_registry/agents/vision_agent/agent.toml b/crates/openhuman-core/src/agent_registry/agents/vision_agent/agent.tomlindex 756d9b4df1..6049eba6c3 100644--- a/crates/openhuman-core/src/agent_registry/agents/vision_agent/agent.toml+++ b/crates/openhuman-core/src/agent_registry/agents/vision_agent/agent.toml@@ -1,6 +1,5 @@id = "vision_agent"display_name = "Vision"-delegate_name = "analyze_image"when_to_use = "Image-understanding specialist: describe, OCR, read charts, compare images, or locate UI elements when the primary model cannot accept the image. Forward workspace images with image_paths. Read-only."temperature = 0.3max_iterations = 6diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rsindex 0b278123b3..b65e856738 100644--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs@@ -21,8 +21,6 @@ pub const PACKS: &[ToolPack] = &[id: "workflows",summary: "Saved automation workflows: build, discover, run, inspect runs.",tools: &[- "build_workflow",- "discover_workflows","run_workflow","await_workflow","describe_workflow",@@ -149,16 +147,10 @@ pub const PACKS: &[ToolPack] = &[},ToolPack {id: "skills",- // The install hand-off (`setup_skills`) is a member like the other- // packed hand-offs (`build_workflow`, `manage_tasks`): it cost ~270- // tokens on every orchestrator request for a family used a few times a- // week. Packed, it no longer closes this pack to the orchestrator- // (`ops::closed_by_direct_handoff` keys on UNPACKED hand-offs), so the- // listing offers the hand-off beside the raw registry tools. Running an- // installed skill is the orchestrator's own `run_workflow`.- summary: "Skills: install or find agent skills (setup_skills hands the whole request to the installer), browse registries, read resources.",+ // Skill installation and registry work are routed through+ // `spawn_subagent` to the `skill_setup` specialist.+ summary: "Skills: find and install agent skills, browse registries, read resources.",tools: &[- "setup_skills",// In the pack, not outside it. A search tool advertised while the// tool it hands off to (`describe_workflow`) stays// withheld would cost 748 B on every wildcard agent to produce an id@@ -200,11 +192,6 @@ pub const PACKS: &[ToolPack] = &[tools: &["generate_document","generate_presentation",- // The delegate, not just the leaf tools: an orchestrator that can- // see `make_presentation` pays its schema on every turn to route a- // request that arrives in a small minority of them, and the pack- // it would route into is already withheld.- "make_presentation",],owners: &["presentation_agent"],guide: "",@@ -352,7 +339,7 @@ pub const PACKS: &[ToolPack] = &[ToolPack {id: "tasks",summary: "Task sources, workflows, artifacts: add, preview, fetch, update, remove.",- tools: &["manage_tasks"],+ tools: &[],owners: &["task_manager_agent"],guide: "",},