Skip to content

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

feat(toolpacks): add guide field to ToolPack and render it in skill output

Steven Enamakel9bb991510590
diff --git a/crates/openhuman-core/src/tools/toolpacks/tools.rs b/crates/openhuman-core/src/tools/toolpacks/tools.rs
index fece5d6d80..168b099fe7 100644
--- a/crates/openhuman-core/src/tools/toolpacks/tools.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/tools.rs
@@ -184,6 +184,10 @@ pub fn render_pack_filtered(
}
let mut out = format!("# Skill `{}`\n\n{}\n\n", pack.id, pack.summary);
+ if !pack.guide.trim().is_empty() {
+ out.push_str(pack.guide.trim());
+ out.push_str("\n\n");
+ }
out.push_str(&format!(
"Call these with `use_skill {{ \"skill\": \"{}\", \"tool\": \"<name>\", \"args\": {{ … }} }}`. \
`args` is the tool's own argument object, exactly as documented below.\n\n",
diff --git a/crates/openhuman-core/src/tools/toolpacks/types.rs b/crates/openhuman-core/src/tools/toolpacks/types.rs
index ec125675ca..c5a3cf91e0 100644
--- a/crates/openhuman-core/src/tools/toolpacks/types.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/types.rs
@@ -30,6 +30,18 @@ pub struct ToolPack {
/// `delegate_*` tools, which exist on the orchestrator alone. Packs over
/// raw tools do, and an owner list is the narrowest way to say so.
pub owners: &'static [&'static str],
+ /// The skill's playbook, printed when `use_skill` loads the pack, between
+ /// the summary and the tool schemas. Empty for a pack that is only a
+ /// schema bundle.
+ ///
+ /// This is what replaced most single-belt specialists: a sub-agent whose
+ /// whole value was a prompt over a handful of tools is a ~500-token guide
+ /// here plus `Deferred` tools the orchestrator reaches itself, instead of
+ /// a separate context, model call and hand-off envelope. Lookup detail
+ /// belongs in the guide; a rule that must bind before the model thinks to
+ /// load the skill (confirm before moving money) stays in the orchestrator
+ /// prompt. Kept under ~550 tokens by `toolpacks_tests.rs`.
+ pub guide: &'static str,
}
impl ToolPack {