From f83c0aa717834eabc28e93dbdb8a1a0c8c47b350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Fri, 15 May 2026 16:01:58 +0200 Subject: [PATCH] agent prompt: tell sub-agents they can ask manager for config changes --- hive-ag3nt/src/bin/hive-ag3nt.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hive-ag3nt/src/bin/hive-ag3nt.rs b/hive-ag3nt/src/bin/hive-ag3nt.rs index 406e661..fb993c3 100644 --- a/hive-ag3nt/src/bin/hive-ag3nt.rs +++ b/hive-ag3nt/src/bin/hive-ag3nt.rs @@ -217,6 +217,9 @@ fn emit_turn_end(bus: &Bus, outcome: &turn::TurnOutcome) { /// about it and the MCP tools, and is expected to drive any further /// recv/send itself. fn format_wake_prompt(label: &str, from: &str, body: &str) -> String { + // Manager broker name. Lifecycle calls it `hm1nd` (container), broker + // calls it `manager`. Sub-agents address the manager via `manager`. + let manager = hive_sh4re::MANAGER_AGENT; format!( "You are hyperhive agent `{label}` in a multi-agent system.\n\ \n\ @@ -231,6 +234,14 @@ fn format_wake_prompt(label: &str, from: &str, body: &str) -> String { - `mcp__hyperhive__send(to, body)` — message a peer (by their name) \ or the operator (recipient `operator`, surfaces in the dashboard).\n\ \n\ + Need new packages, env vars, or other NixOS config for yourself? \ + You can't edit your own config directly — message the manager \ + (recipient `{manager}`) describing what you need. The manager \ + edits `/agents/{label}/config/agent.nix` on your behalf, commits, \ + and submits an approval that the operator can accept on the \ + dashboard; on approve hive-c0re rebuilds your container with the \ + new config.\n\ + \n\ Handle the inbox, then stop. Don't narrate intent — act." ) }