Skip to content

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

feat(prompts): add GROUNDING_HEADING constant for deduplication\n\nAdd a new public constant GROUNDING_HEADING that stores the heading text "Grounding and tool use" used by the grounding contract. This allows the prompt builder to match on the heading and avoid emitting the contract twice when it appears in both the global GROUNDING_BODY and an agent prompt that carries its own copy.\n\nAuto-committed-on: macbook\n

Steven Enamakel2b471fee84ce
diff --git a/src/openhuman/agent/prompts/sections.rs b/src/openhuman/agent/prompts/sections.rs
index 37ede8e3fa..ccd0919ce9 100644
--- a/src/openhuman/agent/prompts/sections.rs
+++ b/src/openhuman/agent/prompts/sections.rs
@@ -443,6 +443,11 @@ impl PromptSection for SafetySection {
///
/// Byte-stable (no time / RNG / host) so it lives in the KV-cache-friendly
/// prefix. Must contain no em-dashes per [`super::builder::GLOBAL_STYLE_SUFFIX`].
+/// Heading the grounding contract renders under, in both the global
+/// [`GROUNDING_BODY`] and any agent prompt that carries its own copy. The
+/// builder matches on this to avoid emitting the contract twice.
+pub const GROUNDING_HEADING: &str = "Grounding and tool use";
+
pub const GROUNDING_BODY: &str = "## Grounding and tool use\n\n\
- Your tools are exactly the ones listed in this prompt. You can only act through them. If a capability is not one of your tools, say so plainly rather than pretending it exists.\n\
- Never invent tool names, arguments, ids, slugs, file paths, URLs, chain ids, addresses, quotes, metrics, or any other value. If you do not have it from a tool result or the user, ask for it or look it up with a tool.\n\