Hermes Agent Command Interface and Background Sessions

Summary

The Hermes Agent Command Interface is the primary interaction layer for users on messaging platforms (Telegram, WhatsApp, Slack, Discord). It provides a suite of slash commands for session management, model configuration, and the execution of asynchronous background tasks that run independently of the main conversation thread.

Details

Command System

The Hermes Agent utilizes a comprehensive set of slash commands to manage the lifecycle of an AI session and control agent behavior. These commands are processed by the gateway before being passed to the underlying LLM or tool execution engine.

CommandFunction
/newResets the current conversation, clearing short-term memory.
/model [provider:model]Switches the active LLM (e.g., openrouter:z-ai/glm-5-turbo).
/statusDisplays current session metadata, including active model and token usage.
/approve / /denyPart of the security boundary; used to authorize or reject “dangerous” tool calls (e.g., filesystem writes or network requests).
/personality [name]Switches the agent’s persona based on defined SOUL.md profiles.
`/voice [onoff
/rollback [number]Interacts with the NixOS-backed filesystem checkpoints to restore previous states.
/reload-mcpForces a refresh of Model Context Protocol (MCP) servers without restarting the systemd service.

Background Sessions

A core feature of the Hermes architecture is the ability to spawn Background Sessions. When a user issues the /background <prompt> command, the gateway initializes a separate, isolated agent instance.

  • Isolation: The background agent operates with its own conversation history and has no access to the context of the main chat. This prevents “context pollution” during long-running tasks.
  • Non-blocking Execution: The main chat remains fully interactive. Users can continue to prompt the agent while the background task processes in the backend.
  • Inheritance: Background sessions inherit the configuration of the parent session, including model selection, provider routing, and tool access levels.
  • Result Delivery: Upon completion or failure, the background agent pushes a notification back to the original channel. If the task involves long-running processes (e.g., a software build), the agent uses terminal(background=true) to track progress.

Configuration and UI Feedback

The level of detail provided during tool execution is configurable via the ~/.hermes/config.yaml file. This allows users to balance between “clean” chat interfaces and “verbose” debugging outputs.

display:
  tool_progress: all              # Options: off, new, all, verbose
  tool_progress_command: false    # Enables/disables the /verbose command in-chat
  background_process_notifications: all # Options: all, result, error, off

When tool_progress is enabled, Hermes provides real-time visual feedback using emojis and code blocks to indicate which tool is currently active (e.g., 🔍 web_search, 🐍 execute_code).

Use Cases

The command interface is designed to support complex operational workflows:

  • Infrastructure Monitoring: Using /background to run health checks across the Sokrates-box fleet.
  • Context Management: Using /compress to manually trigger summarization of long threads to save on token costs.
  • Development: Using /rollback to undo accidental changes made by the agent during a coding session.