Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(orchestrator): defer rarely-used tools and pack setup_skills hand-off

Steven Enamakelf6bffc219f5c
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
index 24d5ab5e6b..13d8480a51 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml
@@ -86,6 +86,31 @@ omit_memory_md = false
#
# `archivist` is not listed either: memory archiving runs on its own
# post-commit hook (`runtime_session.rs`), not on request.
+# Named tools this agent reaches through `tool_search` instead of its wire:
+# still registered, found by a search, and callable by their own name (the
+# harness admits a deferred tool by name without a prior search, so the
+# `file_read {"path": …}` line in an oversized-result preview keeps working).
+# Other agents that name these keep them advertised. Each one here is a
+# schema the model reaches for on a small share of turns, or a second route to
+# work a belt tool already does:
+# * `mcp_registry_*`: MCP servers are named in the prompt and their own tools
+# are deferred; the registry tools are the fallback, not the route.
+# * `file_read` / `file_write`: `shell` and `apply_patch` are on the belt.
+# * `http_request`: `web_fetch` covers GET.
+# * `current_time`: every turn carries the date line; `resolve_time` converts.
+# * `composio_list_toolkits`: the connectable catalogue, asked for rarely.
+deferred_tools = [
+ "mcp_registry_status",
+ "mcp_registry_list_tools",
+ "mcp_registry_connect",
+ "mcp_registry_tool_call",
+ "file_read",
+ "file_write",
+ "http_request",
+ "current_time",
+ "composio_list_toolkits",
+]
+
[subagents]
allowlist = [
# Task-source/workflow/artifact specialist. Route any request to add,
diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rs
index ea616924b1..b523cba647 100644
--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs
@@ -103,9 +103,10 @@ pub const PACKS: &[ToolPack] = &[
"mcp_registry_tool_call",
"mcp_registry_uninstall",
],
- // The orchestrator owns it so the four registry tools on its belt stay
- // advertised; the catalogue readers are `Deferred` and reached through
- // `tool_search` or this skill.
+ // The orchestrator owns it so the four registry tools it names are not
+ // withheld; its `deferred_tools` then takes them off its wire, so they
+ // are found through `tool_search` like the catalogue readers (which are
+ // `Deferred` for every agent) and stay callable by name.
owners: &["orchestrator", "planner"],
guide: include_str!("guides/mcp.md"),
},
@@ -145,12 +146,16 @@ pub const PACKS: &[ToolPack] = &[
},
ToolPack {
id: "skills",
- // The install hand-off (`setup_skills`) is not a member: it is the
- // orchestrator's direct route into this family. See
- // `DELIBERATELY_UNPACKED_HANDOFFS`. Running an installed skill is the
- // orchestrator's own `run_workflow`.
- summary: "Skills: search installed, browse and install from registries, read resources.",
+ // 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.",
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
@@ -446,7 +451,7 @@ pub(crate) const DELIBERATELY_UNPACKED_FLEET_TOOLS: &[&str] = &[
/// token-cost decision, and the same closing rule takes effect for any of them
/// as soon as it is unpacked and listed here.
#[cfg(test)]
-pub(crate) const DELIBERATELY_UNPACKED_HANDOFFS: &[&str] = &["setup_skills"];
+pub(crate) const DELIBERATELY_UNPACKED_HANDOFFS: &[&str] = &[];
pub fn pack(id: &str) -> Option<&'static ToolPack> {
PACKS.iter().find(|p| p.id == id)