Skip to content

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

fix(agent): correct orchestrator prompt to avoid duplicate tool calls

Steven Enamakel2413b975b93c
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs
index 1b21543a5e..46fa4a50d3 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_orchestrator_tier_tests.rs
@@ -32,7 +32,7 @@ fn the_web3_skill_keeps_the_crypto_safety_contract() {
}
let prompt = include_str!("orchestrator/prompt.md");
assert!(
- prompt.contains("never move funds or execute a swap, bridge or contract call"),
+ prompt.contains("except moving funds and stopping"),
"the orchestrator prompt must bind money actions to explicit consent"
);
}
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
index a7509210c7..11d6b0c477 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md
@@ -27,7 +27,7 @@ Three or more steps? Track them on `todo` cards. Don't stop with a plan: execute
## Grounding and tool use
-- Your tools are this turn's tool list plus whatever `tool_search` returns. Read that list before claiming a capability is missing: `web_search_tool` and `web_fetch` are usually in it. Call only tools that are in it: an unlisted name fails as unknown every time, so never retry one. If a tool you need is not there, search once; if nothing comes back, say so (for web lookups, `web_fetch` is the fallback).
+- Your tools are this turn's tool list plus whatever `tool_search` returns. Read that list before claiming a capability is missing: `web_search_tool` and `web_fetch` are usually in it. Call only tools that are in it: an unlisted name fails as unknown every time, so never retry one. Missing one? See 1b.
- Never invent tool names, arguments, ids, paths, URLs, addresses, quotes or metrics; take them from a tool result or the user.
- Preserve numeric evidence exactly: copy numbers, dates, currencies and ids as observed; recompute only when asked, showing the working.
- A sub-agent's summary is claims: check it against its `Evidence used`, `Actions taken` and `Failed tool calls`. Do not introduce facts its evidence does not support. Output marked truncated, oversized, partial or unavailable is not complete: fetch more or say so.
diff --git a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
index 0f7874fbe6..5af18a67ef 100644
--- a/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt_tests.rs
@@ -344,15 +344,8 @@ fn build_keeps_code_work_direct_with_no_coding_hand_off() {
/// not against itself, so a rename on either side fails here.
#[test]
fn prompt_names_only_guided_skills_that_exist() {
- let section = ARCHETYPE
- .split("## Skills")
- .nth(1)
- .expect("orchestrator prompt must carry a `## Skills` section");
+ assert!(ARCHETYPE.contains("`use_skill` skill `coding`, `system`, `web3` or `docs` first"));
for skill in ["coding", "system", "web3", "docs"] {
- assert!(
- section.contains(&format!("skill `{skill}`")),
- "`## Skills` must route to skill `{skill}`"
- );
let pack = crate::tools::toolpacks::pack(skill)
.unwrap_or_else(|| panic!("prompt names skill `{skill}`, which is not a pack"));
assert!(!pack.guide.trim().is_empty(), "skill `{skill}` has no guide");
@@ -363,8 +356,9 @@ fn prompt_names_only_guided_skills_that_exist() {
/// prompt, not in a guide a model may never open.
#[test]
fn prompt_binds_money_and_service_actions_to_explicit_consent() {
- assert!(ARCHETYPE.contains("never move funds or execute a swap, bridge or contract call without the user's explicit yes"));
- assert!(ARCHETYPE.contains("never stop, shut down, uninstall or update OpenHuman's service without an explicit yes"));
+ assert!(ARCHETYPE.contains(
+ "except moving funds and stopping, uninstalling or updating OpenHuman's service: those need the user's explicit yes"
+ ));
}
#[test]