Hermes Agent Tutorial Part 2: Multi-Role System & Skill Management

In Part 1, we covered the fundamentals of Hermes Agent—installation, basic commands, and file operations. In this second installment, we explore two of Hermes Agent’s most powerful features: its multi-role system and skill management framework. These capabilities transform Hermes from a single-purpose assistant into a collaborative team of specialized experts that adapt to your workflow.


Why Multi-Role Matters

Most AI assistants operate with a single, monolithic personality. Whether you are debugging Python, analyzing a startup pitch deck, or designing a robot control loop, you interact with the same generalist model. This one-size-fits-all approach often produces shallow responses that lack domain-specific depth. A generalist might give you a passable Python script, but it will not know the idiomatic patterns of ROS2 node design. It might summarize a financial statement, but it will not apply the rigorous framework of venture capital due diligence.

Hermes Agent solves this through a multi-role architecture. Instead of one generalist, you have access to multiple expert personas—each with specialized knowledge, default behaviors, and tailored skill sets. Switching between them is as simple as typing a command. This architecture mirrors how real teams operate: you do not ask your accountant to debug firmware, and you do not ask your robotics engineer to build a discounted cash flow model. Each expert stays in their lane, and the quality of output reflects that focus.

The benefits extend beyond accuracy. Specialized roles reduce token waste. When you ask the Robotics Expert about SLAM algorithms, it does not need to be reminded about ROS2 conventions every time—it already knows. This contextual awareness leads to faster, more precise interactions, especially in long-running sessions where context window limits matter.


Built-In Expert Roles

Hermes Agent ships with four pre-configured expert roles, each designed to handle a distinct domain with authority:

RoleExpertiseBest For
AI ExpertMachine learning, neural networks, MLOps, model fine-tuning, dataset curationResearch, experiments, pipeline design, paper reproduction
Robotics ExpertROS/ROS2, kinematics, sensor fusion, motion planning, embedded systemsRobot software, simulation, hardware integration, real-time control
Investment ExpertFinancial modeling, valuation, market analysis, portfolio theory, term sheetsStartup evaluation, investment memos, due diligence, cap table analysis
ProgrammerSoftware engineering, system design, debugging, DevOps, cloud architectureGeneral coding, architecture reviews, CI/CD, infrastructure as code

Each role maintains its own context window preferences, default tool access patterns, and recommended skills. When you switch to the Robotics Expert, for example, Hermes automatically prioritizes terminal commands for ROS workspaces and suggests relevant skills like ros2-nav or gazebo-sim. The AI Expert, by contrast, will default to Python notebooks and suggest skills like ml-pytorch or huggingface-transformers.

These roles are not just cosmetic labels. They carry embedded system prompts that shape how the model reasons. The Investment Expert will ask for revenue multiples and cohort retention data. The Programmer will ask about test coverage and dependency versions. This behavioral consistency is what makes the multi-role system genuinely useful rather than a gimmick.


Switching Roles

Role switching happens through natural conversation. Hermes offers two primary methods: explicit commands and implicit detection.

Method 1: Explicit Command

Use the /role command followed by the role name. This is the most reliable method when you know exactly which expert you need.

/role robotics

Hermes responds with a confirmation and loads the role’s default context:

[Switched to Robotics Expert]
Context: ROS2 Humble, Gazebo Ignition, Ubuntu 22.04
Active skills: ros2-basics, urdf-modeling
Default workspace: ~/ros2_ws

Notice that the response includes not just the role name, but also the active environment context and loaded skills. This transparency helps you confirm that the expert is operating with the right assumptions.

You can also switch back to a general mode if you want to step outside domain-specific reasoning:

/role default

Method 2: Natural Language

You can also switch implicitly by describing your task. Hermes uses lightweight intent detection to suggest the most appropriate role.

User: I need to tune the PID controller for my differential drive robot.

Hermes: [Auto-detected: Robotics Expert]
        I'll help you tune that PID. Are you using ros2_control 
        or a custom implementation? Also, do you have access to 
        the encoder tick data or just velocity estimates?

The auto-detection is not aggressive. If Hermes is uncertain, it will ask for confirmation rather than guessing. You can always override the suggestion or disable auto-detection in your ~/.hermes/config.yaml:

roles:
  auto_detect: false

Listing Available Roles

To see all configured roles and their current status:

/role list

Output:

Available roles:
  ai         ● active
  robotics   ○
  investment ○
  programmer ○

Custom roles:
  data-scientist ○ (user-defined)
  sre-engineer   ○ (user-defined)

The dot (●) indicates the currently active role. Custom roles appear in a separate section, making it easy to distinguish built-in capabilities from your own extensions.


The Skills System

Roles define who you are talking to. Skills define what they can do. A skill is the bridge between a role’s general expertise and the specific tools, templates, and knowledge required for a task.

A skill in Hermes Agent is a reusable, versioned module that encapsulates domain knowledge, tool configurations, prompt templates, and automation scripts. Skills live in the ~/.hermes/skills/ directory and follow a standardized structure that makes them portable and shareable.

Directory Structure

~/.hermes/skills/
├── ros2-basics/
│   ├── skill.yaml          # Metadata, dependencies, and activation rules
│   ├── prompts/
│   │   └── system.txt      # Role-specific system prompt additions
│   ├── scripts/
│   │   └── workspace_init.sh
│   └── knowledge/
│       └── common_nodes.md
├── ml-pytorch/
│   ├── skill.yaml
│   ├── prompts/
│   │   └── training_best_practices.txt
│   ├── scripts/
│   │   └── train_template.py
│   └── knowledge/
│       └── loss_functions_cheatsheet.md
└── finance-valuation/
    ├── skill.yaml
    ├── prompts/
    │   └── dcf_system_prompt.txt
    ├── scripts/
    │   └── valuation_model.py
    └── knowledge/
        └── dcf_guide.md

This structure separates concerns cleanly. The skill.yaml defines the contract. The prompts/ directory shapes behavior. The scripts/ directory provides executable utilities. The knowledge/ directory stores reference material that the expert can cite during conversations.

Skill Metadata (skill.yaml)

Every skill requires a skill.yaml file. This file is the source of truth for Hermes when deciding whether to load a skill, what dependencies to resolve, and which roles are permitted to use it.

name: ros2-basics
version: 1.2.0
description: Essential ROS2 commands, workspace patterns, and node templates
author: hermes-team
roles:
  - robotics
dependencies:
  - docker-ros2
  - colcon-utils
tools:
  - terminal
  - file_manager
prompt_injection: prompts/system.txt
auto_activate: true
context_budget: 800

Key fields explained:


Managing Skills

Hermes provides two built-in functions for skill management: skill_view() and skill_manage(). These functions are available in any role and operate on the global skill registry.

Viewing Skills with skill_view()

The skill_view() function inspects skill metadata, documentation, and usage examples. It is your first stop when exploring what a skill offers.

View a specific skill:

skill_view(name="ros2-basics")

Output:

Skill: ros2-basics
Version: 1.2.0
Status: Active (auto-loaded for Robotics Expert)
Description: Essential ROS2 commands, workspace patterns, and node templates
Author: hermes-team
License: MIT

Documentation:
  - Workspace setup with colcon
  - Common launch file patterns
  - Topic/Service/Action CLI reference
  - Debugging with ros2 doctor

Scripts available:
  - workspace_init.sh: Bootstrap a new ROS2 workspace with colcon
  - package_scaffold.sh: Generate a new package with standard layout

Knowledge base:
  - 12 common node patterns (publisher, subscriber, service, action)
  - 5 launch file templates (Python, XML, YAML)
  - Parameter handling best practices

Dependencies:
  - docker-ros2 (installed)
  - colcon-utils (installed)

List all available skills:

skill_view()

This displays a table of installed skills, their versions, associated roles, and activation status. It also flags outdated skills and suggests updates.

Search for skills by keyword:

skill_view(search="navigation")

This is useful when you know what you want to accomplish but are not sure which skill covers it.

Managing Skills with skill_manage()

The skill_manage() function handles installation, updates, removal, and configuration. It is the administrative interface to your skill ecosystem.

Install a skill from the official registry:

skill_manage(action="install", name="gazebo-sim")

Hermes resolves dependencies, downloads the skill package, validates the skill.yaml, and places it in ~/.hermes/skills/. If a dependency is missing, it will prompt you to install it or abort.

Install from a Git repository:

skill_manage(
    action="install",
    source="https://github.com/hermes-skills/gazebo-advanced.git",
    version="v2.1.0"
)

This is the primary method for community-contributed skills. You can pin a specific tag or branch using the version parameter.

Update all skills:

skill_manage(action="update")

This checks the registry for newer versions of all installed skills and presents a diff of changes before applying them. You can review breaking changes and decide whether to proceed.

Update a single skill:

skill_manage(action="update", name="ros2-basics")

Remove a skill:

skill_manage(action="remove", name="legacy-ros1")

Hermes warns you if other skills depend on the one you are removing, preventing accidental breakage.

Enable or disable auto-activation:

skill_manage(action="configure", name="ros2-basics", auto_activate=False)

This is useful when you have many skills installed but only want a subset to load automatically. Manually activate niche skills when needed:

skill_manage(action="activate", name="gazebo-sim")

Export and import skills:

# Export a skill for sharing or backup
skill_manage(action="export", name="finance-valuation", path="./finance-valuation.tar.gz")

# Import a skill from an archive
skill_manage(action="import", path="./finance-valuation.tar.gz")

Multi-Expert Collaboration

One of Hermes Agent’s most innovative features is multi-expert collaboration. You are not limited to a single role for an entire conversation. You can invoke multiple experts to work together on complex, cross-domain tasks. This is where Hermes truly distinguishes itself from conventional assistants.

Delegation Mode

In delegation mode, you act as a project manager and assign subtasks to different experts. Hermes coordinates the handoffs and maintains a shared context board that all participants can read and write to.

Example: Building an AI-Powered Trading Robot

User: I want to build a robot that uses computer vision to identify 
      trading opportunities on a physical dashboard.

Hermes: This involves robotics, AI, and investment expertise. 
        I'll assemble a team and initialize a shared workspace.

[AI Expert]       → Design the CV pipeline (YOLOv8 + OCR)
                    Deliverable: pipeline_architecture.md

[Robotics Expert] → Build the pan-tilt camera mount and control loop
                    Deliverable: hardware_specs.md, control_node.py

[Investment Expert] → Define the signal extraction rules and risk thresholds
                    Deliverable: signal_logic.md, risk_framework.yaml

Shared context: /tmp/project_trading_bot/context.md

Each expert works within their domain, and their outputs are aggregated into a unified project context. You can review each expert’s contribution and request revisions before proceeding. The shared context board prevents duplication and ensures that the Robotics Expert knows the camera resolution requirements defined by the AI Expert.

To start delegation mode explicitly:

/collaborate start

To review the status of all active experts:

/collaborate status

To finalize and merge all contributions:

/collaborate finalize

Inline Expert Invocation

For simpler cross-domain questions, you can invoke an expert inline without switching your primary role. This is faster than full delegation mode and ideal for quick consultations.

User: [Robotics Expert] What's the best camera for low-light OCR?

[Robotics Expert]: For low-light OCR on a physical dashboard, I recommend 
                   the Sony IMX477 with a motorized IR-cut filter. It offers 
                   12.3 MP resolution and excellent low-light sensitivity 
                   at around 1.5 lux. 
                   
                   [AI Expert adds]: Pair this with a YOLOv8n model 
                   fine-tuned on synthetic low-light dashboard images. 
                   Use data augmentation with Gaussian noise and random 
                   brightness shifts to improve robustness.

The primary role remains unchanged, but the invoked expert contributes their specialized knowledge. You can chain multiple experts in a single query:

User: [Investment Expert] Is this DCF reasonable? 
      [Programmer] Can you build a sensitivity table for it?

Context Isolation and Sharing

Hermes maintains isolated context per role to prevent knowledge pollution. The Investment Expert does not need to know about your ROS2 workspace paths, and the Programmer does not need your DCF model assumptions. This isolation improves focus and reduces the risk of hallucinations caused by irrelevant context.

However, you can explicitly share context between roles when cross-domain awareness is required:

# Share the current file context with the AI Expert
share_context(to="ai", files=["/root/project/model.py"])

# Share a summary of the robotics expert's findings
share_context(from="robotics", to="investment", summary_only=True)

# Broadcast a message to all active roles
share_context(broadcast=True, message="The project deadline moved to Friday.")

The summary_only flag is particularly useful when you want to share conclusions without overwhelming another expert with raw technical details.


Creating Custom Roles

If the built-in roles do not fit your workflow, you can define custom roles. This is one of the most powerful extensibility features in Hermes.

Create a role configuration file:

mkdir -p ~/.hermes/roles/
cat > ~/.hermes/roles/data-scientist.yaml << 'EOF'
name: data-scientist
description: Specialized in data engineering, ETL, and statistical analysis
base_model: claude-sonnet-4
system_prompt: |
  You are a senior data scientist with 10 years of experience.
  You prioritize reproducibility, statistical rigor, and clean pipelines.
  Default to Python, pandas, and scikit-learn unless otherwise specified.
  When discussing experiments, always mention sample size, effect size,
  and confidence intervals. Avoid making causal claims from observational data.
default_skills:
  - python-data
  - sql-optimization
  - viz-matplotlib
tool_preferences:
  terminal: true
  file_manager: true
  code_interpreter: true
context_window:
  preferred: 16000
  min: 8000
EOF

Activate your custom role:

/role data-scientist

Custom roles inherit all skill management capabilities and can participate in multi-expert collaboration just like built-in roles. You can also share your custom roles with teammates by distributing the YAML file.

When designing a custom role, be specific in the system_prompt. The more precise your instructions, the more consistent the expert’s behavior. Include preferred libraries, coding standards, and communication style. If you work in a regulated industry, add compliance constraints directly into the role definition.


Practical Workflow Example

Let us walk through a realistic workflow that leverages multiple roles and skills. This example demonstrates how Hermes handles a complex, interdisciplinary project from start to finish.

Scenario: You are evaluating a robotics startup and need to build a due diligence memo with a technical appendix.

Step 1: Investment Expert evaluates the business

/role investment

User: Analyze this pitch deck for a warehouse robotics startup.
      Focus on unit economics and competitive positioning.

[Investment Expert]: I'll start by extracting the financial assumptions 
                     and building a DCF model. 
                     
                     Key findings so far:
                     - LTV/CAC ratio of 4.2x is healthy for the sector
                     - Gross margin at 62% suggests decent hardware/software split
                     - Customer concentration risk: 40% revenue from one anchor client
                     
                     I'll now run a comps analysis against 6AM, Locus, and Fetch.

Step 2: Robotics Expert validates the technical claims

/role robotics

User: The deck claims "sub-100ms path replanning in dynamic environments 
      with 50 concurrent AMRs." Is this realistic for a ROS2 Nav2 stack?

[Robotics Expert]: That claim requires careful parsing. Sub-100ms replanning 
                   is achievable with Nav2's Smac Planner on modern hardware 
                   (Intel i7 or Jetson AGX). However, 50 concurrent AMRs 
                   introduces significant inter-robot coordination overhead.
                   
                   Red flags:
                   1. No mention of fleet management middleware (e.g., Open-RMF)
                   2. Dynamic obstacle avoidance at scale requires predictive 
                      trajectory modeling, which Nav2 does not provide out-of-the-box
                   3. Compute requirements likely underestimated; 50 AMRs 
                      would need edge computing nodes, not just onboard CPUs
                   
                   Recommendation: Flag as "technically possible but unproven at scale."

Step 3: Programmer builds the memo template

/role programmer

User: Generate a LaTeX template for the due diligence memo 
      that includes sections for both financial and technical analysis.
      Use a professional style suitable for LP distribution.

[Programmer]: I'll create a two-column memo template with:
              - Executive Summary
              - Market Opportunity
              - Financial Analysis (with embedded tables)
              - Technical Validation
              - Risk Factors
              - Recommendation
              
              I'll also include a Makefile for compilation and a 
              GitHub Actions workflow for PDF generation on push.

Step 4: Share context and aggregate

share_context(from="investment", to="programmer", files=["./dcf_model.xlsx"])
share_context(from="robotics", to="programmer", summary_only=True)

Step 5: Finalize

User: /collaborate finalize

Hermes: Compiling contributions from Investment, Robotics, and Programmer experts...
        - Merged financial tables into LaTeX
        - Added technical risk appendix
        - Generated final PDF with version watermark
        
        Final memo saved to: ./dd_memo_warehouse_robotics.pdf
        Source files: ./dd_memo_warehouse_robotics/

Best Practices

  1. Start with the right role. Switching mid-conversation is easy, but starting with the correct expert reduces back-and-forth and preserves context quality.

  2. Keep skills lean. Install only the skills you actively use. Each active skill consumes a small amount of context window. A cluttered skill set leads to slower responses and occasional confusion.

  3. Use skill_view() before skill_manage(). Always inspect a skill’s documentation, dependencies, and context budget before installing. Avoid dependency bloat.

  4. Leverage auto-activation wisely. Set auto_activate: true for core skills that you use in every session, but disable it for niche skills to save context. Manually activate niche skills when needed.

  5. Share context explicitly. Do not assume experts know what others have discussed. Use share_context() to keep everyone aligned, especially in delegation mode.

  6. Version your custom skills. If you modify a skill’s prompt templates or scripts, bump the version in skill.yaml to avoid confusion. Use semantic versioning (MAJOR.MINOR.PATCH) to communicate breaking changes.

  7. Review delegation outputs. Multi-expert collaboration is powerful, but you remain the final editor. Always review merged outputs for consistency and accuracy before distribution.

  8. Define custom roles for your organization. If your team has unique standards—specific coding guidelines, compliance requirements, or preferred libraries—encode them in custom roles. This ensures consistency across all team members using Hermes.


Conclusion

Hermes Agent’s multi-role system and skill framework represent a fundamental shift from monolithic AI assistants to modular, collaborative intelligence. By matching the right expert to the right task—and equipping them with domain-specific skills—you unlock significantly higher quality outputs across complex, interdisciplinary projects.

The ability to switch roles, manage skills dynamically, and orchestrate multi-expert collaboration makes Hermes uniquely suited for professional workflows where depth matters more than breadth. Whether you are a solo founder wearing multiple hats or part of a large team with specialized functions, Hermes adapts to your structure rather than forcing you to adapt to it.

In Part 3, we will explore Hermes Agent’s advanced tool orchestration: chaining multiple tools in a single operation, building custom tool wrappers, and integrating external APIs into your workflows. We will also cover how to write your own skills from scratch and publish them to the community registry.


Have questions or want to share your custom roles? Join the discussion on GitHub Discussions.