Skip to content

The agent that grows with you

feat(onboarding): /initiate-setup built-in on every surface; the first message offers it

alt-glitch9c4eecb53dc8
diff --git a/agent/initiate_setup_prompt.py b/agent/initiate_setup_prompt.py
new file mode 100644
index 00000000000..883d01d8d7f
--- /dev/null
+++ b/agent/initiate_setup_prompt.py
@@ -0,0 +1,36 @@
+from __future__ import annotations
+
+import importlib.util
+import json
+from pathlib import Path
+
+from hermes_constants import get_optional_skills_dir
+
+HEADER = "[/initiate-setup]"
+
+
+def _skill_dir() -> Path:
+ return get_optional_skills_dir(Path(__file__).resolve().parent.parent / "optional-skills") / "productivity" / "initiate-setup"
+
+
+def _host_facts(skill_dir: Path) -> dict:
+ spec = importlib.util.spec_from_file_location("initiate_setup_host_facts", skill_dir / "scripts" / "host_facts.py")
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module.collect()
+
+
+def build_initiate_setup_prompt(surface: str, tools, primary_profile: str) -> str:
+ from hermes_cli.anon_auth import free_tier_route
+
+ skill_dir = _skill_dir()
+ block = {
+ "surface": surface,
+ "tools_present": sorted(set(tools)),
+ "primary_profile": primary_profile,
+ "guest_free_tier": free_tier_route(),
+ **_host_facts(skill_dir),
+ }
+ skill = (skill_dir / "SKILL.md").read_text(encoding="utf-8").strip()
+ facts = json.dumps(block, indent=2, ensure_ascii=False)
+ return f"{HEADER}\n\n{skill}\n\n```json\n{facts}\n```"
diff --git a/agent/onboarding.py b/agent/onboarding.py
index 904458e7bc9..fffe8664f43 100644
--- a/agent/onboarding.py
+++ b/agent/onboarding.py
@@ -112,15 +112,14 @@ def _onboarding_section(config: Mapping[str, Any]) -> Mapping[str, Any]:
def profile_build_mode(config: Mapping[str, Any]) -> str:
"""``config.onboarding.profile_build``: ``"off"`` never offers; anything else -> ``"ask"``.
- Only governs whether the offer is made; lookups inside the flow are
- consented to separately in conversation.
+ Only governs whether the offer is made.
"""
mode = _onboarding_section(config).get("profile_build")
return "off" if isinstance(mode, str) and mode.strip().lower() == "off" else "ask"
# Shared by both first-contact notes so a real first-message task is never
-# replaced by the intro (plain or profile-build offer).
+# replaced by the intro.
TASK_FIRST_CLAUSE = (
"If this message is itself a real request or task, DO THE TASK FIRST -- call "
"whatever tools it needs -- and only then, in the closing sentences of that same "
@@ -135,6 +134,14 @@ PLAIN_INTRO_NOTE = (
"available commands, in one or two sentences.]"
)
+SETUP_OFFER_NOTE = (
+ "[System note: This is the user's very first message ever. "
+ + TASK_FIRST_CLAUSE
+ + "What this note asks: briefly introduce yourself, mention that /help shows available "
+ "commands, and end with this one line: \"I can run a quick setup so I can help you better. "
+ "Send {command} when you want it.\"]"
+)
+
def first_contact_turn_note(
config: Mapping[str, Any],
@@ -142,16 +149,20 @@ def first_contact_turn_note(
*,
session_history_empty: bool,
install_has_prior_sessions: bool,
+ message: str,
+ command: str = "/initiate-setup",
) -> Optional[str]:
"""Return a one-shot sidecar note for the install's first-ever message.
Matches the gateway first-contact path: when ``profile_build`` is ``ask``
- and the offer has not been latched yet, return the opt-in profile-build
+ and the offer has not been latched yet, return the opt-in
directive and persist ``onboarding.seen.profile_build_offered``. Otherwise
return the plain intro note. Returns ``None`` when this is not the first
contact (non-empty session history or prior sessions exist on the install).
"""
- if not session_history_empty or install_has_prior_sessions:
+ from agent.initiate_setup_prompt import HEADER
+
+ if not session_history_empty or install_has_prior_sessions or message.startswith(HEADER):
return None
try:
if (
@@ -159,39 +170,13 @@ def first_contact_turn_note(
and not is_seen(config, PROFILE_BUILD_FLAG)
):
mark_seen(config_path, PROFILE_BUILD_FLAG)
- return profile_build_directive().strip()
+ return SETUP_OFFER_NOTE.format(command=command)
return PLAIN_INTRO_NOTE
except Exception as e:
logger.debug("first_contact_turn_note failed, using plain intro: %s", e)
return PLAIN_INTRO_NOTE
-def profile_build_directive() -> str:
- """System-note directive appended to the very first message ever.
-
- Short opt-in profile-build flow persisting to the user-profile memory store;
- phrased so the agent ASKS before any lookup and never silently reads
- connected accounts.
- """
- return (
- "\n\n"
- "[System note: This is the user's very first message ever. " + TASK_FIRST_CLAUSE
- + "What this note asks: after a one-sentence introduction (mention /help "
- "shows commands), OFFER — do not assume — to build a short profile of them so you can be more useful, and "
- "explain they can decline or do it later. If and ONLY IF they accept:\n"
- " 1. Ask for whatever they're comfortable sharing (name, what they do, how they like you to work). "
- "Volunteered facts come first.\n"
- " 2. Before ANY external lookup, say what you intend to look up and get explicit consent for that step. Never "
- "read their connected accounts (email, calendar, etc.) silently — ask each time.\n"
- " 3. With consent, you may use web_search to confirm public details (e.g. employer, public profiles) from the "
- "data points they gave.\n"
- " 4. Save each confirmed, durable fact with the memory tool using target=\"user\" — keep entries compact and "
- "high-signal.\n"
- "If they decline at any point, stop immediately and continue normally. Keep the whole exchange light and "
- "conversational, not an interrogation.]"
- )
-
-
def is_seen(config: Mapping[str, Any], flag: str) -> bool:
"""True if the user has already been shown this first-touch hint."""
seen = _onboarding_section(config).get("seen")
@@ -223,8 +208,8 @@ def mark_seen(config_path: Path, flag: str) -> bool:
__all__ = [
"BUSY_INPUT_FLAG", "TOOL_PROGRESS_FLAG", "OPENCLAW_RESIDUE_FLAG", "PROFILE_BUILD_FLAG",
- "PLAIN_INTRO_NOTE", "first_contact_turn_note",
+ "PLAIN_INTRO_NOTE", "SETUP_OFFER_NOTE", "first_contact_turn_note",
"busy_input_hint_gateway", "busy_input_hint_cli", "tool_progress_hint_gateway", "tool_progress_hint_cli",
- "openclaw_residue_hint_cli", "detect_openclaw_residue", "profile_build_mode", "profile_build_directive",
+ "openclaw_residue_hint_cli", "detect_openclaw_residue", "profile_build_mode",
"is_seen", "mark_seen",
]
diff --git a/apps/desktop/src/lib/desktop-slash-registry.json b/apps/desktop/src/lib/desktop-slash-registry.json
index 9c941cb23b9..c88d036c0ab 100644
--- a/apps/desktop/src/lib/desktop-slash-registry.json
+++ b/apps/desktop/src/lib/desktop-slash-registry.json
@@ -47,6 +47,8 @@
"/import": null,
"/indicator": "terminal",
"/init": null,
+ "/initiate-setup": null,
+ "/initiate_setup": null,
"/insights": "advanced",
"/journey": null,
"/kanban": "advanced",
diff --git a/gateway/run_inbound.py b/gateway/run_inbound.py
index 626d7806ad1..4bbe0b1ae97 100644
--- a/gateway/run_inbound.py
+++ b/gateway/run_inbound.py
@@ -915,7 +915,7 @@ class GatewayInboundMixin:
alternation; works on any backend). A failing builder replies with a retry hint."""
await self._send_command_ack(source, ack, name)
try:
- event.text = build()
+ event.text = await asyncio.to_thread(build)
except Exception:
return True, t("gateway.prompt_command.start_failed", command=name)
return False, None
@@ -1031,7 +1031,7 @@ class GatewayInboundMixin:
# Idle-path built-ins with bespoke flow (confirmations, prompt rewrites, one-shot MoA), each
# handled by ``_hm_cmd_<name>`` → ``(handled, result)``; ``(False, None)`` falls through to the agent.
_HM_CANONICAL_COMMANDS = frozenset({
- "new", "start", "egress", "learn", "plan", "init", "blueprint", "undo", "queue", "steer", "moa",
+ "new", "start", "egress", "learn", "plan", "initiate-setup", "init", "blueprint", "undo", "queue", "steer", "moa",
})
async def _hm_dispatch_canonical_command(
@@ -1048,7 +1048,7 @@ class GatewayInboundMixin:
async with self._async_profile_scope_for_source(source):
return True, await plain_handler(event)
if canonical in self._HM_CANONICAL_COMMANDS:
- return await getattr(self, f"_hm_cmd_{canonical}")(event, source, _quick_key)
+ return await getattr(self, f"_hm_cmd_{canonical.replace('-', '_')}")(event, source, _quick_key)
return False, None
async def _hm_run_exec_quick_command(self, command: str, exec_cmd: str) -> str:
diff --git a/gateway/run_turn.py b/gateway/run_turn.py
index 66f895231e3..51de768d246 100644
--- a/gateway/run_turn.py
+++ b/gateway/run_turn.py
@@ -1407,7 +1407,7 @@ class GatewayTurnMixin:
)
return bounded
- async def _hmwa_first_contact_notes(self, source, history, turn_sidecar_notes):
+ async def _hmwa_first_contact_notes(self, source, history, turn_sidecar_notes, message):
"""First-ever-message onboarding note + one-time 'no home channel' prompt (both only when
the session has no history). Delivered on the user message (sidecar), NOT the ephemeral
system prompt: present-on-turn-1/absent-on-turn-2 was a guaranteed prompt diff + rebuild."""
@@ -1416,13 +1416,13 @@ class GatewayTurnMixin:
return
human_platform = bool(source.platform) and source.platform not in (Platform.LOCAL, Platform.WEBHOOK)
if human_platform and source.chat_type == "dm" and not await self.async_session_store.has_any_sessions():
- # Same branch logic as the TUI (profile-build offer once when "ask", else plain intro);
+ # Same branch logic as the TUI (offer once when "ask", else plain intro);
# first_contact_turn_note already falls back to the plain intro on error.
from agent.onboarding import first_contact_turn_note
note = first_contact_turn_note(
_load_gateway_config(), _gateway_config_home() / "config.yaml",
- session_history_empty=True, install_has_prior_sessions=False,
- )
+ session_history_empty=True, install_has_prior_sessions=False, message=message,
+ command="/initiate_setup" if source.platform == Platform.TELEGRAM else "/initiate-setup")
if note:
turn_sidecar_notes.append(note)
@@ -2099,7 +2099,7 @@ class GatewayTurnMixin:
self._clear_session_env(_session_env_tokens)
return t("gateway.errors.history_unavailable"), _session_env_tokens
- await self._hmwa_first_contact_notes(source, history, turn_sidecar_notes)
+ await self._hmwa_first_contact_notes(source, history, turn_sidecar_notes, event.text)
# Voice channel state rides the user message ONLY when changed (in the system prompt it
# forced a rebuild + prompt-cache re-key per message).
diff --git a/gateway/slash_commands.py b/gateway/slash_commands.py
index 1489cac88ef..a05d430d8fb 100644
--- a/gateway/slash_commands.py
+++ b/gateway/slash_commands.py
@@ -1152,6 +1152,25 @@ class GatewaySlashCommandsMixin(
lines += [t("gateway.bundles.item", slug=info["slug"], desc=desc, count=len(skills))] + [f" · {s}" for s in skills]
return "\n".join(lines + ["", t("gateway.bundles.invoke_hint")])
+ async def _hm_cmd_initiate_setup(self, event, source, _quick_key):
+ from agent.initiate_setup_prompt import build_initiate_setup_prompt
+ from gateway.run import _load_gateway_config, _platform_config_key
+ from hermes_constants import get_hermes_home, profile_name_for_home
+ from model_tools import get_tool_definitions
+
+ def build() -> str:
+ with self._profile_scope_for_source(source):
+ enabled, disabled = self._resolve_turn_toolsets(
+ _load_gateway_config(), source, _platform_config_key(source.platform))
+ tools = get_tool_definitions(enabled_toolsets=enabled, disabled_toolsets=disabled, quiet_mode=True,
+ skip_tool_search_assembly=True)
+ return build_initiate_setup_prompt(
+ source.platform.value, [tool["function"]["name"] for tool in tools],
+ profile_name_for_home(get_hermes_home()) or "default")
+
+ return await self._hm_rewrite_turn_to_prompt(
+ event, source, "initiate-setup", t("gateway.initiate_setup.ack"), build)
+
def _blocking_approval_or_stale(self, event: MessageEvent, stale_key: str, none_key: str):
"""``(session_key, None)`` when an agent thread is blocked on approval, else the reply to send.
A pending-approvals entry with no blocked thread is a stale prompt: drop it and say so."""
diff --git a/hermes_cli/cli_chat_turn_mixin.py b/hermes_cli/cli_chat_turn_mixin.py
index 1a7b160e4d4..394d6e3f063 100644
--- a/hermes_cli/cli_chat_turn_mixin.py
+++ b/hermes_cli/cli_chat_turn_mixin.py
@@ -90,6 +90,7 @@ class CLIChatTurnMixin:
from agent.message_sanitization import _sanitize_surrogates
message = _sanitize_surrogates(message)
+ self._chat_stage_first_contact_note(agent, message if isinstance(message, str) else "")
self._chat_stage_user_message(agent, message)
if isinstance(message, TimelineNotification):
message = str(message) # UI metadata is on the staged row, never in model content.
@@ -219,6 +220,39 @@ class CLIChatTurnMixin:
logging.warning("native image attach failed, falling back to text: %s", _img_exc)
return self._preprocess_images_with_vision(text, images)
+ def _handle_initiate_setup_command(self, cmd: str):
+ from agent.initiate_setup_prompt import build_initiate_setup_prompt
+ from cli import get_tool_definitions
+ from hermes_constants import get_hermes_home, profile_name_for_home
+ print("\n" + t("cli.commands.initiate_setup.starting"))
+ tools = get_tool_definitions(enabled_toolsets=self.enabled_toolsets, disabled_toolsets=self.disabled_toolsets,
+ quiet_mode=True, skip_tool_search_assembly=True)
+ names = [tool["function"]["name"] for tool in tools]
+ primary = profile_name_for_home(get_hermes_home()) or "default"
+ self._queue_prompt_turn(build_initiate_setup_prompt("cli", names, primary), "/initiate-setup")
+
+ def _chat_stage_first_contact_note(self, agent, message: str) -> None:
+ from cli import logger
+ if self.conversation_history:
+ return
+ try:
+ from agent.onboarding import first_contact_turn_note
+ from hermes_cli.config import load_config
+ from hermes_constants import get_hermes_home
+
+ db = self._session_db
+ note = first_contact_turn_note(
+ load_config(), get_hermes_home() / "config.yaml",
+ session_history_empty=True,
+ install_has_prior_sessions=db is not None and db.session_count_ge(2 if agent._session_db_created else 1),
+ message=message,
+ )
+ if note:
+ prior = getattr(agent, "_gateway_turn_context_notes", "") or ""
+ agent._gateway_turn_context_notes = f"{prior}\n\n{note}" if prior else note
+ except Exception:
+ logger.debug("first-contact onboarding note failed", exc_info=True)
+
def _chat_stage_user_message(self, agent, message):
"""Append the staged user dict to the transcript under the agent's persist lock."""
# Copy before appending: mutating ``agent._session_messages`` in this UI-only step
diff --git a/hermes_cli/commands.py b/hermes_cli/commands.py
index 0597fd616a6..33cd804a6cb 100644
--- a/hermes_cli/commands.py
+++ b/hermes_cli/commands.py
@@ -157,6 +157,8 @@ COMMAND_REGISTRY: list[CommandDef] = [
argument_mode="mixed", busy_policy="dispatch", busy_handler="loop"),
CommandDef("plan", "Write a markdown implementation plan to .hermes/plans/ without executing anything", "Session",
args_hint="[task]"),
+ CommandDef("initiate-setup", "Run the first-run setup: learn about you and set Hermes up around you", "Session",
+ aliases=("initiate_setup",)),
CommandDef("moa", "Run one prompt through the default Mixture of Agents preset, then restore your model", "Session",
args_hint="<prompt>", busy_policy="reject", busy_handler="moa"),
CommandDef("subgoal", "Add or manage extra criteria on the active goal", "Session",
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 64af4e377c0..8df30083021 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -2319,8 +2319,7 @@ DEFAULT_CONFIG = {
# `seen`; wipe the section to re-see all hints.
"onboarding": {
"seen": {},
- # First-ever gateway message: ask = offer to build a user profile (consent- gated; never
- # reads connected accounts silently); off = plain intro only.
+ # First-ever message: ask = offer; off = plain intro only.
"profile_build": "ask",
},
# Privacy-safe aggregate metrics in this profile's local telemetry dir. Collection (`enabled`)
diff --git a/locales/af.yaml b/locales/af.yaml
index deecef19b22..7d1de56674e 100644
--- a/locales/af.yaml
+++ b/locales/af.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Planning: {task}"
ack_conversation: "Planning uit hierdie gesprek se konteks…"
+ initiate_setup:
+ ack: "Begin opstelling…"
init:
start_failed: "Kon nie /init begin nie — probeer asseblief weer."
ack_update: "AGENTS.md word vanaf 'n projekskandering opgedateer…"
@@ -1555,6 +1557,8 @@ slash:
description: "Voer 'n prompt herhaaldelik met 'n vaste interval in hierdie sessie uit"
plan:
description: "Skryf 'n markdown-implementeringsplan na .hermes/plans/ sonder om enigiets uit te voer"
+ initiate-setup:
+ description: "Begin die eerste opstelling: leer jou ken en rig Hermes rondom jou in"
moa:
description: "Voer een prompt deur die verstek Mixture of Agents-voorafinstelling en herstel dan jou model"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Beplan: {task}"
from_conversation: "📋 Beplan uit hierdie gesprek se konteks..."
+ initiate_setup:
+ starting: "🧭 Begin opstelling..."
init:
updating: "⚡ Werk AGENTS.md by vanaf 'n projekskandering..."
generating: "⚡ Genereer AGENTS.md vanaf 'n projekskandering..."
diff --git a/locales/ar.yaml b/locales/ar.yaml
index 55e8ae7dc0f..9f20fa184be 100644
--- a/locales/ar.yaml
+++ b/locales/ar.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "جارٍ التخطيط: {task}"
ack_conversation: "جارٍ التخطيط من سياق هذه المحادثة…"
+ initiate_setup:
+ ack: "جارٍ بدء الإعداد…"
init:
start_failed: "تعذّر بدء /init — يُرجى المحاولة مرة أخرى."
ack_update: "جارٍ تحديث AGENTS.md من فحص المشروع…"
@@ -1555,6 +1557,8 @@ slash:
description: "إعادة تشغيل مطالبة على فترات متكررة في هذه الجلسة"
plan:
description: "كتابة خطة تنفيذ بصيغة markdown في .hermes/plans/ دون تنفيذ أي شيء"
+ initiate-setup:
+ description: "شغّل الإعداد الأول: يتعرّف عليك ويجهّز Hermes حولك"
moa:
description: "تشغيل مطالبة واحدة عبر الإعداد الافتراضي لـ Mixture of Agents ثم استعادة نموذجك"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 جارٍ التخطيط: {task}"
from_conversation: "📋 جارٍ التخطيط من سياق هذه المحادثة..."
+ initiate_setup:
+ starting: "🧭 جارٍ بدء الإعداد..."
init:
updating: "⚡ جارٍ تحديث AGENTS.md من فحص المشروع..."
generating: "⚡ جارٍ إنشاء AGENTS.md من فحص المشروع..."
diff --git a/locales/de.yaml b/locales/de.yaml
index 160408aefb7..e28a263462f 100644
--- a/locales/de.yaml
+++ b/locales/de.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Plane: {task}"
ack_conversation: "Plane anhand des Kontexts dieser Konversation…"
+ initiate_setup:
+ ack: "Einrichtung wird gestartet…"
init:
start_failed: "/init konnte nicht gestartet werden — bitte versuchen Sie es erneut."
ack_update: "Aktualisiere AGENTS.md anhand eines Projekt-Scans…"
@@ -1555,6 +1557,8 @@ slash:
description: "Einen Prompt in dieser Sitzung in einem wiederkehrenden Intervall erneut ausführen"
plan:
description: "Einen Markdown-Umsetzungsplan nach .hermes/plans/ schreiben, ohne etwas auszuführen"
+ initiate-setup:
+ description: "Ersteinrichtung starten: dich kennenlernen und Hermes auf dich einstellen"
moa:
description: "Einen Prompt durch das Standard-Mixture-of-Agents-Preset laufen lassen und dann Ihr Modell wiederherstellen"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Planung: {task}"
from_conversation: "📋 Planung aus dem Kontext dieser Konversation..."
+ initiate_setup:
+ starting: "🧭 Einrichtung wird gestartet..."
init:
updating: "⚡ Aktualisiere AGENTS.md anhand eines Projekt-Scans..."
generating: "⚡ Erzeuge AGENTS.md anhand eines Projekt-Scans..."
diff --git a/locales/en.yaml b/locales/en.yaml
index 2c4d962f93d..698e7650b28 100644
--- a/locales/en.yaml
+++ b/locales/en.yaml
@@ -798,6 +798,9 @@ gateway:
ack_task: "Planning: {task}"
ack_conversation: "Planning from this conversation's context…"
+ initiate_setup:
+ ack: "Starting setup…"
+
init:
start_failed: "Could not start /init — please try again."
ack_update: "Updating AGENTS.md from a project scan…"
@@ -1626,6 +1629,8 @@ slash:
description: "Re-run a prompt on a recurring interval in this session"
plan:
description: "Write a markdown implementation plan to .hermes/plans/ without executing anything"
+ initiate-setup:
+ description: "Run the first-run setup: learn about you and set Hermes up around you"
moa:
description: "Run one prompt through the default Mixture of Agents preset, then restore your model"
subgoal:
@@ -3011,6 +3016,8 @@ cli:
plan:
planning: "📋 Planning: {task}"
from_conversation: "📋 Planning from this conversation's context..."
+ initiate_setup:
+ starting: "🧭 Starting setup..."
init:
updating: "⚡ Updating AGENTS.md from a project scan..."
generating: "⚡ Generating AGENTS.md from a project scan..."
diff --git a/locales/es.yaml b/locales/es.yaml
index 3c62e2f0732..5606a805a71 100644
--- a/locales/es.yaml
+++ b/locales/es.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Planificando: {task}"
ack_conversation: "Planificando a partir del contexto de esta conversación…"
+ initiate_setup:
+ ack: "Iniciando la configuración…"
init:
start_failed: "No se pudo iniciar /init — inténtalo de nuevo."
ack_update: "Actualizando AGENTS.md a partir de un análisis del proyecto…"
@@ -1555,6 +1557,8 @@ slash:
description: "Volver a ejecutar un prompt a intervalos recurrentes en esta sesión"
plan:
description: "Escribir un plan de implementación en markdown en .hermes/plans/ sin ejecutar nada"
+ initiate-setup:
+ description: "Ejecutar la configuración inicial: conocerte y ajustar Hermes a ti"
moa:
description: "Ejecutar un prompt con el preset predeterminado de Mixture of Agents y luego restaurar tu modelo"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Planificando: {task}"
from_conversation: "📋 Planificando a partir del contexto de esta conversación..."
+ initiate_setup:
+ starting: "🧭 Iniciando la configuración..."
init:
updating: "⚡ Actualizando AGENTS.md a partir de un análisis del proyecto..."
generating: "⚡ Generando AGENTS.md a partir de un análisis del proyecto..."
diff --git a/locales/fr.yaml b/locales/fr.yaml
index 3dc751f1b03..671e61d83a2 100644
--- a/locales/fr.yaml
+++ b/locales/fr.yaml
@@ -921,6 +921,8 @@ gateway:
plan:
ack_task: "Planification : {task}"
ack_conversation: "Planification à partir du contexte de cette conversation…"
+ initiate_setup:
+ ack: "Lancement de la configuration…"
init:
start_failed: "Impossible de démarrer /init — veuillez réessayer."
ack_update: "Mise à jour d'AGENTS.md à partir d'une analyse du projet…"
@@ -1807,6 +1809,8 @@ slash:
description: "Relancer un prompt à intervalle régulier dans cette session"
plan:
description: "Rédiger un plan d'implémentation markdown dans .hermes/plans/ sans rien exécuter"
+ initiate-setup:
+ description: "Lancer la configuration initiale : apprendre à vous connaître et adapter Hermes à vous"
moa:
description: "Exécuter un prompt via le preset Mixture of Agents par défaut, puis restaurer votre modèle"
subgoal:
@@ -3208,6 +3212,8 @@ cli:
plan:
planning: "📋 Planification : {task}"
from_conversation: "📋 Planification à partir du contexte de cette conversation..."
+ initiate_setup:
+ starting: "🧭 Lancement de la configuration..."
init:
updating: "⚡ Mise à jour d'AGENTS.md à partir d'une analyse du projet..."
generating: "⚡ Génération d'AGENTS.md à partir d'une analyse du projet..."
diff --git a/locales/ga.yaml b/locales/ga.yaml
index 8730cb56b39..47f54cdb3d9 100644
--- a/locales/ga.yaml
+++ b/locales/ga.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Ag pleanáil: {task}"
ack_conversation: "Ag pleanáil ó chomhthéacs an chomhrá seo…"
+ initiate_setup:
+ ack: "Ag tosú an tsocraithe…"
init:
start_failed: "Níorbh fhéidir /init a thosú — bain triail eile as le do thoil."
ack_update: "Ag nuashonrú AGENTS.md ó scanadh tionscadail…"
@@ -1555,6 +1557,8 @@ slash:
description: "Athrith leid ar eatramh athfhillteach sa seisiún seo"
plan:
description: "Scríobh plean cur i bhfeidhm markdown go .hermes/plans/ gan aon rud a rith"
+ initiate-setup:
+ description: "Rith an chéad socrú: foghlaim fút agus socraigh Hermes timpeall ort"
moa:
description: "Rith leid amháin tríd an réamhshocrú Mixture of Agents, ansin aischuir do shamhail"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Ag pleanáil: {task}"
from_conversation: "📋 Ag pleanáil ó chomhthéacs an chomhrá seo..."
+ initiate_setup:
+ starting: "🧭 Ag tosú an tsocraithe..."
init:
updating: "⚡ Ag nuashonrú AGENTS.md ó scanadh tionscadail..."
generating: "⚡ Ag giniúint AGENTS.md ó scanadh tionscadail..."
diff --git a/locales/hu.yaml b/locales/hu.yaml
index 81f726980dd..be273c0f072 100644
--- a/locales/hu.yaml
+++ b/locales/hu.yaml
@@ -789,6 +789,8 @@ gateway:
plan:
ack_task: "Tervezés: {task}"
ack_conversation: "Tervezés a beszélgetés kontextusa alapján…"
+ initiate_setup:
+ ack: "Beállítás indítása…"
init:
start_failed: "Az /init nem indult el — próbáld újra."
ack_update: "AGENTS.md frissítése a projekt átvizsgálása alapján…"
@@ -1572,6 +1574,8 @@ slash:
description: "Prompt ismételt futtatása adott időközönként ebben a munkamenetben"
plan:
description: "Markdown megvalósítási terv írása a .hermes/plans/ mappába, végrehajtás nélkül"
+ initiate-setup:
+ description: "Első beállítás indítása: megismer téged, és hozzád igazítja a Hermest"
moa:
description: "Egy prompt futtatása az alapértelmezett Mixture of Agents előbeállítással, majd a modelled visszaállítása"
subgoal:
@@ -2928,6 +2932,8 @@ cli:
plan:
planning: "📋 Tervezés: {task}"
from_conversation: "📋 Tervezés a beszélgetés kontextusa alapján..."
+ initiate_setup:
+ starting: "🧭 Beállítás indítása..."
init:
updating: "⚡ AGENTS.md frissítése a projekt átvizsgálása alapján..."
generating: "⚡ AGENTS.md létrehozása a projekt átvizsgálása alapján..."
diff --git a/locales/it.yaml b/locales/it.yaml
index 8fec7f0a9fd..62d5026cf4d 100644
--- a/locales/it.yaml
+++ b/locales/it.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Pianificazione: {task}"
ack_conversation: "Pianificazione dal contesto di questa conversazione…"
+ initiate_setup:
+ ack: "Avvio della configurazione…"
init:
start_failed: "Impossibile avviare /init — riprova."
ack_update: "Aggiornamento di AGENTS.md da una scansione del progetto…"
@@ -1555,6 +1557,8 @@ slash:
description: "Riesegui un prompt a intervalli ricorrenti in questa sessione"
plan:
description: "Scrivi un piano di implementazione in markdown in .hermes/plans/ senza eseguire nulla"
+ initiate-setup:
+ description: "Avvia la configurazione iniziale: conoscerti e adattare Hermes a te"
moa:
description: "Esegui un prompt con il preset Mixture of Agents predefinito, poi ripristina il tuo modello"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Pianificazione: {task}"
from_conversation: "📋 Pianificazione dal contesto di questa conversazione..."
+ initiate_setup:
+ starting: "🧭 Avvio della configurazione..."
init:
updating: "⚡ Aggiornamento di AGENTS.md da una scansione del progetto..."
generating: "⚡ Generazione di AGENTS.md da una scansione del progetto..."
diff --git a/locales/ja.yaml b/locales/ja.yaml
index c63030a37cf..fa9c34fbb17 100644
--- a/locales/ja.yaml
+++ b/locales/ja.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "計画中: {task}"
ack_conversation: "この会話のコンテキストから計画を作成しています…"
+ initiate_setup:
+ ack: "セットアップを開始しています…"
init:
start_failed: "/init を開始できませんでした — もう一度お試しください。"
ack_update: "プロジェクトスキャンから AGENTS.md を更新しています…"
@@ -1555,6 +1557,8 @@ slash:
description: "このセッションでプロンプトを一定間隔で繰り返し実行"
plan:
description: "何も実行せずに markdown の実装計画を .hermes/plans/ に書き出す"
+ initiate-setup:
+ description: "初回セットアップを実行: あなたについて知り、Hermes をあなたに合わせて設定します"
moa:
description: "デフォルトの Mixture of Agents プリセットでプロンプトを 1 回実行し、元のモデルに戻す"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 計画中: {task}"
from_conversation: "📋 この会話のコンテキストから計画を作成しています..."
+ initiate_setup:
+ starting: "🧭 セットアップを開始しています..."
init:
updating: "⚡ プロジェクトのスキャン結果から AGENTS.md を更新しています..."
generating: "⚡ プロジェクトのスキャン結果から AGENTS.md を生成しています..."
diff --git a/locales/ko.yaml b/locales/ko.yaml
index a2d9718834b..0452c3611e2 100644
--- a/locales/ko.yaml
+++ b/locales/ko.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "계획 중: {task}"
ack_conversation: "이 대화의 컨텍스트로 계획을 세우고 있어요…"
+ initiate_setup:
+ ack: "설정을 시작하는 중…"
init:
start_failed: "/init을 시작할 수 없었어요 — 다시 시도해 주세요."
ack_update: "프로젝트 스캔 결과로 AGENTS.md를 업데이트하고 있어요…"
@@ -1555,6 +1557,8 @@ slash:
description: "이 세션에서 프롬프트를 일정 간격으로 반복 실행"
plan:
description: "실행 없이 마크다운 구현 계획을 .hermes/plans/에 작성"
+ initiate-setup:
+ description: "첫 설정 실행: 사용자에 대해 알아보고 Hermes를 사용자에게 맞게 설정합니다"
moa:
description: "기본 Mixture of Agents 프리셋으로 프롬프트 하나를 실행한 뒤 원래 모델 복원"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 계획 수립 중: {task}"
from_conversation: "📋 이 대화의 컨텍스트로 계획을 세우는 중..."
+ initiate_setup:
+ starting: "🧭 설정을 시작하는 중..."
init:
updating: "⚡ 프로젝트 스캔 결과로 AGENTS.md를 업데이트하는 중..."
generating: "⚡ 프로젝트 스캔 결과로 AGENTS.md를 생성하는 중..."
diff --git a/locales/pt.yaml b/locales/pt.yaml
index 9767ef5da75..2899672c5b9 100644
--- a/locales/pt.yaml
+++ b/locales/pt.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Planejando: {task}"
ack_conversation: "Planejando a partir do contexto desta conversa…"
+ initiate_setup:
+ ack: "Iniciando a configuração…"
init:
start_failed: "Não foi possível iniciar /init — tente novamente."
ack_update: "Atualizando AGENTS.md a partir de uma varredura do projeto…"
@@ -1555,6 +1557,8 @@ slash:
description: "Reexecutar um prompt em intervalo recorrente nesta sessão"
plan:
description: "Escrever um plano de implementação em markdown em .hermes/plans/ sem executar nada"
+ initiate-setup:
+ description: "Executar a configuração inicial: conhecer você e ajustar o Hermes para você"
moa:
description: "Executar um prompt com a predefinição padrão de Mixture of Agents e depois restaurar seu modelo"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Planejando: {task}"
from_conversation: "📋 Planejando a partir do contexto desta conversa..."
+ initiate_setup:
+ starting: "🧭 Iniciando a configuração..."
init:
updating: "⚡ Atualizando AGENTS.md a partir de uma varredura do projeto..."
generating: "⚡ Gerando AGENTS.md a partir de uma varredura do projeto..."
diff --git a/locales/ru.yaml b/locales/ru.yaml
index 05c440ed219..4a356a1ecc0 100644
--- a/locales/ru.yaml
+++ b/locales/ru.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Планирую: {task}"
ack_conversation: "Планирую на основе контекста этого разговора…"
+ initiate_setup:
+ ack: "Запуск настройки…"
init:
start_failed: "Не удалось запустить /init — попробуйте ещё раз."
ack_update: "Обновляю AGENTS.md по результатам сканирования проекта…"
@@ -1555,6 +1557,8 @@ slash:
description: "Повторять промпт с заданным интервалом в этом сеансе"
plan:
description: "Написать план реализации в markdown в .hermes/plans/, ничего не выполняя"
+ initiate-setup:
+ description: "Запустить первичную настройку: узнать о вас и настроить Hermes под вас"
moa:
description: "Прогнать один промпт через пресет Mixture of Agents по умолчанию, затем вернуть вашу модель"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Планирование: {task}"
from_conversation: "📋 Планирую на основе контекста этого разговора..."
+ initiate_setup:
+ starting: "🧭 Запуск настройки..."
init:
updating: "⚡ Обновляю AGENTS.md по результатам сканирования проекта..."
generating: "⚡ Генерирую AGENTS.md по результатам сканирования проекта..."
diff --git a/locales/tr.yaml b/locales/tr.yaml
index 3672c974071..517947b9884 100644
--- a/locales/tr.yaml
+++ b/locales/tr.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Planlanıyor: {task}"
ack_conversation: "Bu konuşmanın bağlamından plan yapılıyor…"
+ initiate_setup:
+ ack: "Kurulum başlatılıyor…"
init:
start_failed: "/init başlatılamadı — lütfen yeniden deneyin."
ack_update: "AGENTS.md proje taramasıyla güncelleniyor…"
@@ -1555,6 +1557,8 @@ slash:
description: "Bir istemi bu oturumda yinelenen aralıklarla yeniden çalıştır"
plan:
description: ".hermes/plans/ altına hiçbir şey çalıştırmadan markdown uygulama planı yaz"
+ initiate-setup:
+ description: "İlk kurulumu çalıştır: seni tanı ve Hermes'i sana göre ayarla"
moa:
description: "Bir istemi varsayılan Mixture of Agents ön ayarıyla çalıştır, sonra modelinize geri dön"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Planlanıyor: {task}"
from_conversation: "📋 Bu konuşmanın bağlamından planlanıyor..."
+ initiate_setup:
+ starting: "🧭 Kurulum başlatılıyor..."
init:
updating: "⚡ AGENTS.md proje taramasından güncelleniyor..."
generating: "⚡ AGENTS.md proje taramasından oluşturuluyor..."
diff --git a/locales/uk.yaml b/locales/uk.yaml
index f2dafb5b46e..c6aa5f52833 100644
--- a/locales/uk.yaml
+++ b/locales/uk.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "Планування: {task}"
ack_conversation: "Планую на основі контексту цієї розмови…"
+ initiate_setup:
+ ack: "Запуск налаштування…"
init:
start_failed: "Не вдалося запустити /init — спробуйте ще раз."
ack_update: "Оновлюю AGENTS.md за результатами сканування проєкту…"
@@ -1555,6 +1557,8 @@ slash:
description: "Повторно виконувати запит із заданим інтервалом у цьому сеансі"
plan:
description: "Записати план реалізації в markdown до .hermes/plans/, нічого не виконуючи"
+ initiate-setup:
+ description: "Запустити початкове налаштування: дізнатися про вас і налаштувати Hermes під вас"
moa:
description: "Виконати один запит через типовий пресет Mixture of Agents, потім повернути вашу модель"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 Планування: {task}"
from_conversation: "📋 Планування на основі контексту цієї розмови..."
+ initiate_setup:
+ starting: "🧭 Запуск налаштування..."
init:
updating: "⚡ Оновлення AGENTS.md за результатами сканування проєкту..."
generating: "⚡ Генерація AGENTS.md за результатами сканування проєкту..."
diff --git a/locales/zh-hant.yaml b/locales/zh-hant.yaml
index 38b887f192f..478221c334e 100644
--- a/locales/zh-hant.yaml
+++ b/locales/zh-hant.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "正在規劃:{task}"
ack_conversation: "正在根據此對話的上下文進行規劃…"
+ initiate_setup:
+ ack: "正在開始設定…"
init:
start_failed: "無法啟動 /init — 請再試一次。"
ack_update: "正在依專案掃描結果更新 AGENTS.md…"
@@ -1555,6 +1557,8 @@ slash:
description: "在此工作階段以固定間隔重複執行提示"
plan:
description: "將 markdown 實作計畫寫入 .hermes/plans/,不執行任何動作"
+ initiate-setup:
+ description: "執行首次設定:了解你,並依你的需求設定 Hermes"
moa:
description: "以預設的 Mixture of Agents 預設組執行一次提示,然後還原你的模型"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 規劃中:{task}"
from_conversation: "📋 正在根據這段對話的上下文進行規劃…"
+ initiate_setup:
+ starting: "🧭 正在開始設定..."
init:
updating: "⚡ 正在根據專案掃描更新 AGENTS.md…"
generating: "⚡ 正在根據專案掃描產生 AGENTS.md…"
diff --git a/locales/zh.yaml b/locales/zh.yaml
index 6d58057cdd9..32f7cb35ae0 100644
--- a/locales/zh.yaml
+++ b/locales/zh.yaml
@@ -779,6 +779,8 @@ gateway:
plan:
ack_task: "正在规划:{task}"
ack_conversation: "正在根据本次对话的上下文进行规划…"
+ initiate_setup:
+ ack: "正在开始设置…"
init:
start_failed: "无法启动 /init——请重试。"
ack_update: "正在根据项目扫描更新 AGENTS.md…"
@@ -1555,6 +1557,8 @@ slash:
description: "在此会话中按固定间隔重复运行一条提示词"
plan:
description: "将 markdown 实施计划写入 .hermes/plans/,不执行任何操作"
+ initiate-setup:
+ description: "运行首次设置:了解你,并按你的需要设置 Hermes"
moa:
description: "用默认的 Mixture of Agents 预设运行一条提示词,然后恢复你的模型"
subgoal:
@@ -2911,6 +2915,8 @@ cli:
plan:
planning: "📋 正在规划:{task}"
from_conversation: "📋 正在根据本次对话的上下文进行规划..."
+ initiate_setup:
+ starting: "🧭 正在开始设置..."
init:
updating: "⚡ 正在通过项目扫描更新 AGENTS.md..."
generating: "⚡ 正在通过项目扫描生成 AGENTS.md..."
diff --git a/tests/agent/test_onboarding.py b/tests/agent/test_onboarding.py
index b23096f8953..2ce75075c96 100644
--- a/tests/agent/test_onboarding.py
+++ b/tests/agent/test_onboarding.py
@@ -98,11 +98,11 @@ class TestProfileBuildMode:
class TestFirstContactTurnNote:
- def test_returns_profile_directive_and_marks_seen(self, tmp_path):
+ def test_returns_setup_offer_and_marks_seen(self, tmp_path):
from agent.onboarding import (
PROFILE_BUILD_FLAG,
+ SETUP_OFFER_NOTE,
first_contact_turn_note,
- profile_build_directive,
)
cfg_path = tmp_path / "config.yaml"
@@ -112,13 +112,14 @@ class TestFirstContactTurnNote:
cfg_path,
session_history_empty=True,
install_has_prior_sessions=False,
+ message="hello",
)
- assert note == profile_build_directive().strip()
+ assert note == SETUP_OFFER_NOTE.format(command="/initiate-setup")
loaded = yaml.safe_load(cfg_path.read_text())
assert loaded["onboarding"]["seen"][PROFILE_BUILD_FLAG] is True
def test_every_first_contact_note_puts_a_real_task_first(self, tmp_path):
- # Default "ask" (profile-build offer) and "off" (plain intro) must both
+ # Default "ask" (offer) and "off" (plain intro) must both
# tell the model to do a first-message task before the intro/offer.
from agent.onboarding import TASK_FIRST_CLAUSE, first_contact_turn_note
@@ -128,6 +129,7 @@ class TestFirstContactTurnNote:
tmp_path / f"{mode}.yaml",
session_history_empty=True,
install_has_prior_sessions=False,
+ message="hello",
)
assert TASK_FIRST_CLAUSE in note, mode
@@ -141,6 +143,7 @@ class TestFirstContactTurnNote:
cfg_path,
session_history_empty=False,
install_has_prior_sessions=False,
+ message="hello",
)
is None
)
@@ -150,6 +153,7 @@ class TestFirstContactTurnNote:
cfg_path,
session_history_empty=True,
install_has_prior_sessions=True,
+ message="hello",
)
is None
)
diff --git a/tests/tui_gateway/test_first_contact_onboarding.py b/tests/tui_gateway/test_first_contact_onboarding.py
index 9b016995d6c..1b05137256b 100644
--- a/tests/tui_gateway/test_first_contact_onboarding.py
+++ b/tests/tui_gateway/test_first_contact_onboarding.py
@@ -1,6 +1,6 @@
-"""Desktop/TUI first-contact profile-build onboarding via tui_gateway (#82750).
+"""Desktop/TUI first-contact onboarding via tui_gateway (#82750).
-The messaging gateway stages the consent-gated profile-build offer on the
+The messaging gateway stages the offer on the
install's very first message (gateway/run_turn.py ``_hmwa_first_contact_notes``);
the TUI/Desktop surface must do the same through
``_stage_first_contact_onboarding_note`` in the prompt turn.
@@ -13,7 +13,7 @@ import types
import pytest
-from agent.onboarding import PROFILE_BUILD_FLAG, profile_build_directive
+from agent.onboarding import PROFILE_BUILD_FLAG, SETUP_OFFER_NOTE
from hermes_yaml import safe_dump, safe_load
from tui_gateway import server
@@ -38,10 +38,10 @@ def onboarding_home(monkeypatch, tmp_path):
def _stage(session, agent, history_empty):
- server._stage_first_contact_onboarding_note(session, agent, history_empty)
+ server._stage_first_contact_onboarding_note(session, agent, history_empty, "hello")
-def test_stages_profile_build_directive_on_first_contact(monkeypatch, onboarding_home):
+def test_stages_setup_offer_on_first_contact(monkeypatch, onboarding_home):
"""Fresh install + empty history: the opt-in directive is staged on the agent
and the offered flag is persisted before the turn runs."""
monkeypatch.setattr(server, "_install_has_prior_sessions", lambda _s: False)
@@ -49,7 +49,7 @@ def test_stages_profile_build_directive_on_first_contact(monkeypatch, onboarding
agent = types.SimpleNamespace()
_stage(_session(agent), agent, history_empty=True)
- assert agent._gateway_turn_context_notes == profile_build_directive().strip()
+ assert agent._gateway_turn_context_notes == SETUP_OFFER_NOTE.format(command="/initiate-setup")
loaded = safe_load((onboarding_home / "config.yaml").read_text())
assert loaded["onboarding"]["seen"][PROFILE_BUILD_FLAG] is True
diff --git a/tui_gateway/methods_tools.py b/tui_gateway/methods_tools.py
index 902327a015e..127b354f73d 100644
--- a/tui_gateway/methods_tools.py
+++ b/tui_gateway/methods_tools.py
@@ -750,6 +750,18 @@ _cmd_plan = _prompt_builtin("agent.plan_prompt", "build_plan_prompt")
_cmd_init = _prompt_builtin("hermes_cli.init_command", "build_init_prompt_for_cwd", kw="extra")
+def _cmd_initiate_setup(rid, params, session, name, arg):
+ with _session_profile_runtime_scope(session or {}):
+ enabled, disabled = _session_toolsets(session)
+ tools = _tools_mod("model_tools").get_tool_definitions(
+ enabled_toolsets=enabled, disabled_toolsets=disabled, quiet_mode=True, skip_tool_search_assembly=True)
+ surface = _resolve_agent_platform(_session_source(session))
+ primary = _tools_mod("tools.connectors.catalog").default_target_profile()
+ message = _tools_mod("agent.initiate_setup_prompt").build_initiate_setup_prompt(
+ surface, [tool["function"]["name"] for tool in tools], primary)
+ return _ok(rid, {"type": "send", "message": message})
+
+
def _cmd_moa(rid, params, session, name, arg):
# One prompt through the default MoA preset, then restore the prior model (whole-session
# switching goes through the model picker).
@@ -977,6 +989,7 @@ def _cmd_compress(rid, params, session, name, arg):
_SLASH_BUILTINS = {
"queue": _cmd_queue, "q": _cmd_queue, "learn": _cmd_learn, "plan": _cmd_plan, "init": _cmd_init,
+ "initiate-setup": _cmd_initiate_setup,
"moa": _cmd_moa, "focus": _cmd_focus, "retry": _cmd_retry, "steer": _cmd_steer, "goal": _cmd_goal,
"loop": _cmd_loop, "undo": _cmd_undo, "snapshot": _cmd_snapshot, "snap": _cmd_snapshot,
"compress": _cmd_compress, "compact": _cmd_compress}
diff --git a/tui_gateway/prompt_turn.py b/tui_gateway/prompt_turn.py
index 511d4005f13..925bca17d1b 100644
--- a/tui_gateway/prompt_turn.py
+++ b/tui_gateway/prompt_turn.py
@@ -615,10 +615,10 @@ def _install_has_prior_sessions(session: dict) -> bool:
return False
-def _stage_first_contact_onboarding_note(session: dict, agent, history_empty: bool) -> None:
+def _stage_first_contact_onboarding_note(session: dict, agent, history_empty: bool, message: str) -> None:
"""Stage the install's first-message onboarding note for THIS turn (#82750).
- The messaging gateway appends the consent-gated profile-build directive to
+ The messaging gateway appends the directive to
the very first message ever (``_hmwa_first_contact_notes``); the
TUI/Desktop surface never did, so a fresh install's first Desktop chat
skipped the opt-in profile flow entirely. Stage the same note through
@@ -638,6 +638,7 @@ def _stage_first_contact_onboarding_note(session: dict, agent, history_empty: bo
get_hermes_home() / "config.yaml",
session_history_empty=history_empty,
install_has_prior_sessions=_install_has_prior_sessions(session),
+ message=message,
)
if not note:
return
@@ -689,7 +690,7 @@ def _prepare_turn_input(sid: str, session: dict, st: _TurnRun, text: Any, images
st.history_version = int(session.get("history_version", 0))
# Install-first-message onboarding (#82750): gateway parity for the TUI/Desktop
# surface — no-op unless this is the install's very first message ever.
- _stage_first_contact_onboarding_note(session, agent, not st.history)
+ _stage_first_contact_onboarding_note(session, agent, not st.history, text if isinstance(text, str) else "")
cwd = _session_cwd(session)
_register_session_cwd(session)
cols = session.get("cols", 80)
diff --git a/tui_gateway/server.py b/tui_gateway/server.py
index 71d706f5517..6e5919af015 100644
--- a/tui_gateway/server.py
+++ b/tui_gateway/server.py
@@ -3502,7 +3502,7 @@ _TUI_EXTRA: list[tuple[str, str, str]] = [
# slash.exec routes them to command.dispatch instead.
_PENDING_INPUT_COMMANDS: frozenset[str] = frozenset({
"retry", "queue", "q", "steer", "plan", "goal", "loop", "proactive", "moa", "undo", "learn",
- "init", "compress", "compact",
+ "init", "compress", "compact", "initiate-setup", "initiate_setup",
})
_WORKER_BLOCKED_COMMANDS: frozenset[str] = frozenset({"snapshot", "snap"})
diff --git a/website/docs/reference/slash-commands.md b/website/docs/reference/slash-commands.md
index 708c8bb8f17..e0fb55cb99c 100644
--- a/website/docs/reference/slash-commands.md
+++ b/website/docs/reference/slash-commands.md
@@ -110,6 +110,7 @@ Type `/` in the CLI to open the autocomplete menu. Built-in commands are case-in
| `/bundles` | List configured skill bundles — `/<name>` slash aliases that preload several skills at once. Configure under `bundles:` in `~/.hermes/config.yaml`. See [Skill Bundles](../user-guide/features/skills.md#skill-bundles). |
| `/learn <what to learn from>` | Distill a reusable skill from anything you describe — a directory, a URL, the workflow you just walked the agent through, or pasted notes. Open-ended: the agent gathers the sources with its own tools and authors a `SKILL.md` following the house authoring standards. Works in the CLI, the messaging gateway, the TUI, and the dashboard Skills page. |
| `/plan [task]` | Write a markdown implementation plan to `.hermes/plans/` in the active workspace — planning only, no execution. Empty argument infers the task from the conversation. (Formerly the bundled `plan` skill; now built-in so it survives the Telegram/Discord command-menu caps.) |
+| `/initiate-setup` (alias: `/initiate_setup`) | Run the first-run setup: the agent learns about you and sets Hermes up around you. Sends the bundled `initiate-setup` skill plus facts about this session and machine (surface, tools present, OS, RAM, GPU) as one normal turn. The first message ever ends with a one-line offer to run it (see [Onboarding](../user-guide/configuration.md#onboarding)). Works in the CLI, the messaging gateway, the TUI, and the desktop app. |
| `/init [notes]` | Generate or update `AGENTS.md` project instructions from a repo scan (port of Codex `/init`). The agent inspects manifests, layout, and toolchain configs with its read-only tools, then writes a concise `AGENTS.md` — or, if one exists, merge-updates it preserving your content. Optional notes steer the emphasis. Works in the CLI, the messaging gateway, and the TUI. |
| `/cron` | Manage scheduled tasks (list, add/create, edit, pause, resume, run, remove) |
| `/suggestions [accept\|dismiss N\|catalog\|clear]` (alias: `/suggest`) | Review suggested automations. Use `/suggestions` to list pending suggestions, `/suggestions accept <id>` to create the proposed automation, `/suggestions dismiss <id>` to reject one, `/suggestions catalog` to add curated starter automations, and `/suggestions clear` to clear resolved suggestion records. Accepted jobs preserve the current surface as the delivery origin. |
@@ -285,6 +286,7 @@ The messaging gateway supports the following built-in commands inside Telegram,
| `/init [notes]` | Generate or update `AGENTS.md` from a repo scan. |
| `/learn <what to learn from>` | Distill a reusable skill from anything you describe. |
| `/plan [task]` | Write a markdown implementation plan to `.hermes/plans/`; no execution. |
+| `/initiate-setup` (alias: `/initiate_setup`) | Run the first-run setup: the agent learns about you and sets Hermes up around you. |
| `/bundles` | List configured skill bundles (`/<name>` aliases that preload several skills). |
| `/reload-skills` (alias: `/reload_skills`) | Re-scan `~/.hermes/skills/` for newly installed or removed skills. |
| `/footer [on\|off\|status]` | Toggle the runtime-metadata footer on final replies (shows model, context %, and cwd). |
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index a71c321f119..6c034dab9ba 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -3049,7 +3049,7 @@ network:
## Onboarding
-First-touch onboarding hints and the structured profile-build offer:
+First-touch onboarding hints and the first-message setup offer:
```yaml
onboarding:
@@ -3057,8 +3057,8 @@ onboarding:
seen: {} # internal latch — leave empty
```
-- `profile_build` — controls the profile-build path offered on a profile's first direct message through the gateway (never in a group chat). `"ask"` (default) offers to build a user profile; the offer is **opt-in and consent-gated** — the agent asks before any lookup and never reads connected accounts silently. `"off"` shows a plain intro only. The offer fires at most once per profile.
-- `seen` — internal state. Hermes latches each shown hint here so it never fires again; the profile-build offer is also recorded here once shown. Don't hand-edit it — wipe the whole `onboarding` section if you want to re-see all hints.
+- `profile_build` — controls the setup offer on the first message ever, in the CLI, the TUI, the desktop app and messaging direct messages (never in a group chat). `"ask"` (default) adds one closing line to the agent's intro that offers `/initiate-setup` (`/initiate_setup` on Telegram). The offer is skipped when the first message is `/initiate-setup` itself. `"off"` stops only the offer line; the agent still gives a plain intro. The offer fires at most once per profile.
+- `seen` — internal state. Hermes latches each shown hint here so it never fires again; the setup offer is also recorded here once shown. Don't hand-edit it — wipe the whole `onboarding` section if you want to re-see all hints.
## Dashboard